Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » dynamic installation of optionally required bundles
dynamic installation of optionally required bundles [message #43348] Mon, 14 June 2004 19:11 Go to next message
Eclipse UserFriend
Originally posted by: igorf.ca.ibm.com

I have two bundles A and B, A optionally requires B. B is installed
using BundleContext#installBundle after A had already been running. The
problem is, I have to restart Eclipse in order A to start see classes
available from B. I tried to "refresh" B as suggested by other posts in
this group. I tried to stop and restart A, refresh A, but nothing
worked. Am I missing something?

--
Regards,
Igor Fedorenko
Re: dynamic installation of optionally required bundles [message #43393 is a reply to message #43348] Tue, 15 June 2004 02:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pascal.ibm.canada

It is not because A is marked as "uninstalled" that its classloader has
been successfully garbage collected. If another plugin holds reference
to it A is still around.
To make sure everything works fine, you should try to make A and B as
simple as possible, and ensure that no other plugin depend on A.

PaScaL

Igor Fedorenko wrote:
> I have two bundles A and B, A optionally requires B. B is installed
> using BundleContext#installBundle after A had already been running. The
> problem is, I have to restart Eclipse in order A to start see classes
> available from B. I tried to "refresh" B as suggested by other posts in
> this group. I tried to stop and restart A, refresh A, but nothing
> worked. Am I missing something?
>
> --
> Regards,
> Igor Fedorenko
Re: dynamic installation of optionally required bundles [message #43423 is a reply to message #43393] Tue, 15 June 2004 14:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: igorf.ca.ibm.com

Sorry Pascal, but I am not sure I understood what you meant.

My plugin A is slightly modified "Hello, World" template plugin which
tried to reference classes provided by B. I am 100% sure that nothing
requires A. B is a trivial non-UI plugin that has only one jar file and
provides all packages from that jar.

The way I test this:

1. Press "Sample Action" toolbar button, get "class not found error"
2. From OSGI console
2.1 install/refresh B
2.2 tried all combinations of stop/start/refresh A
3. Press "Sample Action" again, same class not found error.

I do not see how I can make it simpler than that :-)

Pascal Rapicault wrote:
> It is not because A is marked as "uninstalled" that its classloader has
> been successfully garbage collected. If another plugin holds reference
> to it A is still around.
> To make sure everything works fine, you should try to make A and B as
> simple as possible, and ensure that no other plugin depend on A.
>
> PaScaL
>
> Igor Fedorenko wrote:
>
>> I have two bundles A and B, A optionally requires B. B is installed
>> using BundleContext#installBundle after A had already been running.
>> The problem is, I have to restart Eclipse in order A to start see
>> classes available from B. I tried to "refresh" B as suggested by other
>> posts in this group. I tried to stop and restart A, refresh A, but
>> nothing worked. Am I missing something?
>>
>> --
>> Regards,
>> Igor Fedorenko
Re: dynamic installation of optionally required bundles [message #43935 is a reply to message #43348] Mon, 28 June 2004 19:35 Go to previous message
Eclipse UserFriend
Originally posted by: jeff_mcaffer.REMOVE.ca.ibm.com

What you are doing did not work out of the box as once A's classloader is
created its dependency graph is set in stone (well it is somewhat
malleable). Refreshing A should have fixed this.

Jeff

"Igor Fedorenko" <igorf@ca.ibm.com> wrote in message
news:caksp5$30j$1@eclipse.org...
> I have two bundles A and B, A optionally requires B. B is installed
> using BundleContext#installBundle after A had already been running. The
> problem is, I have to restart Eclipse in order A to start see classes
> available from B. I tried to "refresh" B as suggested by other posts in
> this group. I tried to stop and restart A, refresh A, but nothing
> worked. Am I missing something?
>
> --
> Regards,
> Igor Fedorenko
Previous Topic:Starting Fresh - Do I Use OSGI?
Next Topic:Now that 3.0 is almost done and RCP is there, is there an equinox?
Goto Forum:
  


Current Time: Tue Apr 23 12:26:43 GMT 2024

Powered by FUDForum. Page generated in 0.02923 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top