Packages are resolved on "resolved" phase just after "install" phase. Framework creates "wires" between bundles using "Import" and "Export" packages directives.

When exporting bundle goes away, importing bundle still holds references to loaded classes until "update" or "refresh" will be called.

If you want to get more deeper into this process, you need to check "OSGi Core Specification" chapters
3.7 "Resolving process",
4.4.6.3 "Restoring State After Refresh or Update"
4.4.9 "Updating Bundles".



On 12.08.2011 14:11, Jim Talbut wrote:
Yes, though the spring bundle is just the single XML file loaded via the 
fileinstaller.

I think my question should be the same for any two bundles that relate purely 
by Import/Export packages:
At what point are the packages resolved?
What happens to that resolving when the Exporting bundle goes away?

Thanks

Jim

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: 12 August 2011 10:14
To: [email protected]
Subject: Re: Help understanding OSGi class loading

Hello!

I didn't understand clearly your task. Do you have one bundle with classes and 
another bundle with spring xml file?

On 12.08.2011 12:03, Jim Talbut wrote:
Hi,

I've just been surprised by the behaviour of karaf/felix and I'd be grateful 
for some help understanding how this works.

My code is split into two chunks:

1.       A compiled bundle.

2.       A Spring XML file.
My intention is that the Spring file contains all the configuration relating to 
the piece of work, whilst the bundle contains the (more static) compiled code - 
with the intention of being able to update/replace the Spring file whenever I 
want.

I just found an error in the bundle and uninstalled it, but the bundle created 
for the Spring file is still running.

Does this mean that only OSGi services are dynamically removed, and if the 
Spring file directly references exported classes from a bundle then the classes 
are only resolved via OSGi when they are loaded?
In which case will restarting the Spring bundle clear it out adequately to 
ensure that it picks up a new compiled bundle?

Thanks

Jim





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to