I am faced with the following problem: I have an OSGi service that exports a service and makes this service available in the OSGi registry. Now I would like to call this service from within an EJB method.
So in my EJB I do the following:
BankService bankService = (BankService) ctx.lookup("osgi:service/dexia.osgipoc.sedm3.service.BankService");
The lookup works ok, but the ca
Continued: Call OSGi service from EJB2011-11-08T10:14:35ZThis is the accepted answer. This is the accepted answer.... but the cast to BankService fails because the class is not found.
This class is exposed in my OSGi bundle but apparently the EJB cannot see it because the EJB is not OSGi aware. Is there a way to do this and define some sort of 'hybrid' application in Websphere (Glassfish and JBoss seem to have some support for this).
thx and kr,
Kevan 0600009FFB121 Posts
Re: Continued: Call OSGi service from EJB2011-11-08T12:08:41ZThis is the accepted answer. This is the accepted answer.
- FrederikDeBacker 270004S7T1
Sounds like you could use an <import-package> for dexia.osgipoc.sedm3.service.
Re: Continued: Call OSGi service from EJB2011-11-08T14:54:40ZThis is the accepted answer. This is the accepted answer.
- Kevan 0600009FFB
Thanks for the assistance. I did not have a deployment plan. I added one based on your response and it seems to work now.