Enforcing Class Unloading

2010-11-30 Thread Nima Kaviani
Hello all, I have a ClassLoading issue with my bundles and I hope you can help me solve it. The problem is that I have two versions of a bundle ( let's name them A and A' ) exposing some services to other bundles in the application. Both versions have quite identical classes except for bundle A h

Re: Enforcing Class Unloading

2010-11-30 Thread John Bäckstrand
Would the other bundles not need to do something actively to swap out classes? You can't (as far as I know?) swap classes seamlessly from under running java code without the code doing its own classloading, getting new classloaders at the very least. I dont think OSGI tried to do what jrebel for in

Re: Enforcing Class Unloading

2010-11-30 Thread Nima Kaviani
Thanks John for the reply. you are right, I think OSGi supports dynamic swapping through enforcing a programming model that needs to be admitted to by both the service providers and the service consumers. In my particular case however, I am reluctant to assume that all other bundles need to follow

Re: Enforcing Class Unloading

2010-11-30 Thread Christopher Brind
After installing your replacement bundle make sure you refresh the packages. Cheers, Chris On 30 November 2010 09:53, Nima Kaviani wrote: > Hello all, > > I have a ClassLoading issue with my bundles and I hope you can help me > solve > it. > > The problem is that I have two versions of a bundl

Re: Enforcing Class Unloading

2010-11-30 Thread Richard S. Hall
On 11/30/10 5:03, Christopher Brind wrote: After installing your replacement bundle make sure you refresh the packages. This assumes that there is a code-related dependency among the bundles and there might not be. However, if there is, then this would be the correct thing to do. If there i

Re: Enforcing Class Unloading

2010-12-01 Thread Nima Kaviani
Thanks a lot Chris and Richard for the hints. I tried refreshing packages for the bundles that I initially assumed were affected. An immediate outcome was running into the "unresolved constraint violation" exception due to inconsistent class spaces. Digging into the previous posts and looking into

Re: Enforcing Class Unloading

2010-12-01 Thread Holger Hoffstätte
On 01.12.2010 09:04, Nima Kaviani wrote: > I have a question now. Is there a way to figure out these wirings > programmatically. This will be standardized in OSGi 4.3. You can take a peek at the EA spec at: http://www.osgi.org/Download/File?url=/download/osgi-4.3-early-draft2.pdf -h

Re: Enforcing Class Unloading

2010-12-01 Thread Nima Kaviani
This is exactly what I have been looking for. thanks a lot, -Nima 2010/12/1 Holger Hoffstätte > On 01.12.2010 09:04, Nima Kaviani wrote: > > I have a question now. Is there a way to figure out these wirings > > programmatically. > > This will be standardized in OSGi 4.3. You can take a peek at

Re: Enforcing Class Unloading

2010-12-01 Thread Richard S. Hall
On 12/01/2010 06:51 PM, Nima Kaviani wrote: This is exactly what I have been looking for. The wiring can already be determined using PackageAdmin, the new stuff just recasts and deprecates PackageAdmin. Or do you need more than just the wiring info? -> richard thanks a lot, -Nima 2010/12

Re: Enforcing Class Unloading

2010-12-02 Thread Nima Kaviani
Thanks a lot Richard. Let me have a deeper look into PackageAdmin and I will get back to you if it doesn't cover my needs. cheers, -Nima On Wed, Dec 1, 2010 at 4:28 PM, Richard S. Hall wrote: > On 12/01/2010 06:51 PM, Nima Kaviani wrote: > >> This is exactly what I have been looking for. >> > >