Is it possible to use classes that are in a websphere application server shared library from within an OSGi bundle?
I did some research and found this http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/topic/com.ibm.iea.was_v8/was/8.5/ProgrammingModel/WAS85_LP_Class_Loading.pdf which indicates that it ispossible to load OSGi classes from standard java, however, there is no indication whether the opposite is possible. Any help would be appreciated!
This topic has been locked.
Pinned topic Load Classes from WAS shared library in OSGi bundle
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Re: Load Classes from WAS shared library in OSGi bundle2013-03-05T15:01:27ZThis is the accepted answer. This is the accepted answer.No, it isn't possible to access classes in a shared library from within an OSGi application. The shared library facility is for Java EE apps only.
There is a separate mechanism called the bundle repository for making code available to OSGi applications. You can read about that here: http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/twlp_dep_commonbundles.html
Unsurprisingly, the things in the bundle repository are bundles rather than just jars.
There is another approach that can be used to make code available to Java EE applications and to OSGi applications, but this is currently in beta only. If you are on the recent V8.5.Next beta you can try writing a user feature to house the shared function if you need something.
WebSphere Application Server Liberty Profile development
hampe98 2000003NCE12 Posts
Re: Load Classes from WAS shared library in OSGi bundle2013-03-06T09:14:42ZThis is the accepted answer. This is the accepted answer.
That sounds really interesting.
Do you mean that the user feature would implement the common function or are there any other ways of sharing modules between OSGi and JEE? We´re currently heavy on JEE modules but dependencies and different versions of dependencies are getting more and more complex so I would like to try the OSGi approach. The prolem is that there´s no way of doing a big bang switch so if there´s a way of starting with framework modules as OSGi bundles and then gradually move utility jars, EJBs and WEB apps? It would be like the JEE EARs would run on top of the OSGi runtime with access to classes loaded by the OSGi runtime (our framework bundles).
Re: Load Classes from WAS shared library in OSGi bundle2013-03-06T13:27:05ZThis is the accepted answer. This is the accepted answer.
Re: Load Classes from WAS shared library in OSGi bundle2013-03-08T22:34:35ZThis is the accepted answer. This is the accepted answer.
Re: Load Classes from WAS shared library in OSGi bundle2013-03-11T16:23:20ZThis is the accepted answer. This is the accepted answer.