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
This topic has been locked.
4 replies Latest Post - 2011-11-08T21:25:05Z by Kevan
Pinned topic Call OSGi service from EJB
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2011-11-08T21:25:05Z at 2011-11-08T21:25:05Z by Kevan
Continued: Call OSGi service from EJB2011-11-08T10:14:35Z in response to FrederikDeBacker... 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 PostsACCEPTED ANSWER
Re: Continued: Call OSGi service from EJB2011-11-08T12:08:41Z in response to FrederikDeBackerWhat does your deployment plan (e.g. geronimo-application.xml) look like? Do you have a deployment plan, at all?
Sounds like you could use an <import-package> for dexia.osgipoc.sedm3.service.