dynamic installation of optionally required bundles [message #43348] |
Mon, 14 June 2004 15:11  |
Eclipse User |
|
|
|
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 #43423 is a reply to message #43393] |
Tue, 15 June 2004 10:42   |
Eclipse User |
|
|
|
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 15:35  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04700 seconds