Hi,
Is it possible to call OSGI service implemented in external bundle from EAR package? Is there a tutorial how this is implemented?
Regards
Yes, I see that you've answered your own question whilst looking into this. This thread can now be closed!
Yes, I see that you've answered your own question whilst looking into this. This thread can now be closed!
Thank you for the reply! Would you point me a tutorial with example how this can be implemented, please?
Oh okay, from what I found you can follow this tutorial creating a managed bean into the EAR file then implementing a java interface within the OSGI bundle:
http://netbeans.org/kb/docs/javaee/maven-osgiservice-cdi.html
Oh okay, from what I found you can follow this tutorial creating a managed bean into the EAR file then implementing a java interface within the OSGI bundle:
http://netbeans.org/kb/docs/javaee/maven-osgiservice-cdi.html
Thank you for the reply!
Unfortunately I use Netbeans 7.1 and JBoss 7.1.0. I already knew about this tutorial. He is made for glassfish server and he uses glassfish specific dependencies.
I created a WAR package with OSGI bundle and I tested it successfully. But still I can't find a solution for my problem. I tried to create EAR package with OSGI bundle but the problem is that every time when I try to deploy it into JBoss NullPoint Exeption occurs.
Maybe the problem is in JBoss, I use version 7.1.0.RC1B. Or maybe by design this is not allowed in JBoss? I don't know. I also have another problem - I can't use @Datasource into OSGI bundle and deploy it on JBoss.
I'm getting very angry from JBoss - it seems that I waste my time with this buggy software.
If you're interested I can provide you the simple source code of the EAR package and the OSGI bundle that I cannot deplot. I will really appreciate your help if you help me to fix the problem.
I don't have any other alternative except to switch to Glassfish.
Regards
You could post your code in case an OSGI expert comes along but there doesn't seem to be many, I don't really have the OSGI experience myself. IBM seem very knowledgable in this area, I would have a look at their libraries which contain a lot on OSGI (below), there is also an IBM'er on YouTube providing tutorials and also look into OSGI books like O'Reilly.
If none of that work, I would look into checking form more tutorials using something other than NetBeans...
The OSGI Alliance provides tutorials for OSGI with Eclipse Equinox, Knopflerfish and Apache Felix also:
OSGI Alliance - How To
http://www.osgi.org/About/HowOSGi
IBM OSGI Library:
YouTube:
www.youtube.com/watch?v=J2wqOY603-Q
OSGI Alliance Books:
Including OSGi Enteprise Specification, v4.2:
http://www.osgi.org/Links/Books
OSGi in Action (I'm helping write this)
http://manning.com/hall/
OSGi in Practice (Creative Commons)
http://neilbartlett.name/blog/osgibook/
Modular Java (OSGi + Spring DM)
http://www.pragprog.com/titles/cwosg/modular-java
Pro Spring Dynamic Modules for OSGi™ Service Platforms
http://www.apress.com/book/view/1430216123
Hope that helps.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.