Hi Sahoo,

Am Dienstag, den 15.01.2008, 16:22 +0530 schrieb Sahoo:
> Thanks for warning me. Yes, I am already aware of the fact that 
> bootdelegation="*" is not a very good thing, but I have a requirement 
> that any jar in my product's library directory must be available to all 
> other applications running in the system. To implement this in OSGi, I 
> don't see any other alternative, do you?

I probably do not have a good solution to you problem.

But I have the guts feeling that the requirement is problematic: You
want to have a modularized and flexible framework such as OSGi and you
want to support "static" extensibility outside of the framework by
allowing people to just dump jars, which will become available on the
next framework restart.

It would probably be easier and better to give the users a way of
dropping bundles into your framework and also help them build bundles
(e.g. by providing a simple method of just exporting everything). This
way, you would not even require framework restarts.

Just my €.02 and guts feeling....

Regards
Felix

> 
> Thanks,
> Sahoo
> 
> Felix Meschberger wrote:
> > Hi Sahoo,
> >
> > While I agree, that this is probably a bug in the Felix framework, I
> > consider this use of the bootdelegation property very dangerous. The
> > reason for this is that you loose all control of where classes are
> > loaded from and thus let go off all the good modularization
> > functionality of OSGi.
> >
> > Consider for example, you have a bundle, which uses JDOM, which is
> > notable for not being backwards compatible between its later 0.x
> > versions. If a version of the JDOM library happens to be on the boot
> > class path, your bundle will ALLWAYS use that boot class path JDOM
> > library regardless of whether the bundle exports/imports it or uses it
> > from a private copy. This is probably not what you want - and would lead
> > to errors, which would be hard to track.
> >
> > Regards
> > Felix
> >
> > Am Dienstag, den 15.01.2008, 09:18 +0530 schrieb Sahoo:
> >   
> >> Hi,
> >>
> >> I am having trouble starting Felix when I use 
> >> -Dorg.osgi.framework.bootdelegation="*". When I run using the following 
> >> command:
> >> '/usr/bin/java -Dorg.osgi.framework.bootdelegation="*" -jar 
> >> bin/felix.jar', it fails like this:
> >>
> >> WARNING: *** Class 'org.apache.felix.shell.impl.Activator' was not 
> >> found. Bundle 1 does not import package 'org.apache.felix.shell.impl', 
> >> nor is the package exported by any other bundle or available from the 
> >> system class loader. *** (java.lang.ClassNotFoundException: *** Class 
> >> 'org.apache.felix.shell.impl.Activator' was not found. Bundle 1 does not 
> >> import package 'org.apache.felix.shell.impl', nor is the package 
> >> exported by any other bundle or available from the system class loader. 
> >> ***)ERROR: Error starting 
> >> file:bundle/org.apache.felix.shell-1.1.0-SNAPSHOT.jar 
> >> (org.osgi.framework.BundleException: Not found: 
> >> org.apache.felix.shell.impl.Activator)
> >> java.lang.ClassNotFoundException: org.apache.felix.shell.impl.Activator
> >>         at 
> >> org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3438)    
> >>     
> >> at org.apache.felix.framework.Felix._startBundle(Felix.java:1540)
> >>         at org.apache.felix.framework.Felix.startBundle(Felix.java:1479)
> >>         at 
> >> org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1074)   
> >>      
> >> at 
> >> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258)     
> >>    
> >> at java.lang.Thread.run(Thread.java:595)
> >>
> >> Section #3.8.4, Overall Search Order, of OSGi Service Platform Release 4 
> >> spec does not clearly (or I don't understand it well enough) state what 
> >> should be the behavior. Relevant portions of the spec is given below:
> >>
> >> /1 If the class or resource is in a java.* package, the request is 
> >> delegated to the parent class loader; otherwise, the search continues 
> >> with the next step. If the request is delegated to the parent class 
> >> loader and the class or resource is not found, then the search 
> >> terminates and the request fails.
> >> 2 If the class or resource is from a package included in the boot 
> >> delegation list (org.osgi.framework.bootdelegation), then the request is 
> >> delegated to the parent class loader. If the class or resource is found 
> >> there, the search ends.
> >> /
> >> Unlike point #1 above, point #2 does not mandate the search to 
> >> terminate. I can understand the search terminating for java.* packages, 
> >> but why for other packages? It seems Felix is terminating the search, 
> >> therefore I am seeing this failure. Can anyone please clarify this? I am 
> >> using "*, " because I want to see how I can make packages from some 
> >> library jars available to bundles without having to set 
> >> org.osgi.framework.system.packages property?
> >>
> >> I am hoping that if I add my library jars in system classpath and set 
> >> bootdelegation="*", the library jar's content will be automatically 
> >> available to other bundles even if I don't set 
> >> org.osgi.framework.system.packages property. Is this not going to work?
> >>
> >> Thanks,
> >> Sahoo
> >>
> >> ---------------------------------------------------------------------
> >> 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]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to