-
1. Re: Moving security from normal Java to OSGi
ranajitjana Oct 23, 2012 1:09 PM (in response to ranajitjana)I have put all the jars given by the provider to jre location i.e jre/lib/ext and compiling the bundles with these . This way jars are normal jar file and not OSGi bundle.
I hoped this could have resolved the issues as it will start behaving like normal java files without wiring or OSGi environment.
It is still not able to load the properties files as per the same code above.Error as below
(java.lang.NoClassDefFoundError: Could not initialize class com.ingrian.internal.config.Config)
I have no way to debug this code to know what is going on. I tried decompiling the jars and put it in the attach source in eclipse if it could help.
Jre classes are not loaded as bundles (at least what i see from web console) . Any idea how the JRE classes behaves in FUSEESB server. Is it like normal java or a wired environment.
These provider jars work perfectly ok from normal JVM or Tomcat etc. only does not run in OSGi environment
-
2. Re: Moving security from normal Java to OSGi
ranajitjana Oct 23, 2012 1:58 PM (in response to ranajitjana)Found that JRE packages are exposed by System Bundle (0) (org.apache.felix.framework) thus everything is wrapped in bundle in Karaf. That infers that all the path will be represened as Mvn:artifact:grp:version.
-
3. Re: Moving security from normal Java to OSGi
ffang Oct 23, 2012 9:54 PM (in response to ranajitjana)Hi,
For the security providers in OSGi/Karaf, please take a look at[1], the "Deploying security providers" chapter.
http://karaf.apache.org/manual/latest-2.3.x/users-guide/security.html
Freeman
-
4. Re: Moving security from normal Java to OSGi
ranajitjana Oct 24, 2012 7:23 AM (in response to ffang)Actually my question will be as simple as how do i pick up properties in OSGi bundle.
blueprint/OSGi/Spring properties gets picked by the container. If i have custom plain properties which I want to read . Is there a way?
On similar grounds how do i access any other resources in java code.
one way of putting that is put it in the etc directory and read via blueprint tags with the namespace(http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0) That way I just cannot run the bnd too to make the osgi bundle. There are other resources what are the key files . may be everything needs to go to etc folder.
I hope there was a easier solution for external jars
Regards
-
5. Re: Moving security from normal Java to OSGi
ffang Oct 24, 2012 9:02 PM (in response to ranajitjana)Hi,
Yeah, you hit the point, I'd say in OSGi world, using ConfigAdmin OSGi service to manage the properties is the standard and recommended way.
Freeman