users@glassfish.java.net

Re: Questions about new OSGI Features

From: Sahoo <Sahoo_at_Sun.COM>
Date: Wed, 04 Nov 2009 06:07:34 +0530

Jerome Dochez wrote:
>
>> - is it possible to have access to the ejb layer out of an osgi service?
>>
> you can do normal EJB lookup using the InitialContext. What more do
> you need ?
>
As Jerome said, you can get hold of an InitialContext and lookup an EJB
and call it. Or, if you register the EJB as a service in the OSGi
service registry, you can then use it from OSGi like any other OSGi
service. Here is an example of the same:

http://weblogs.java.net/blog/2009/06/16/our-second-hybrid-application-ejb-osgi-service

Thanks,
Sahoo