Questions about new OSGI Features

View: New views
4 Messages — Rating Filter:   Alert me  

Questions about new OSGI Features

by Michael Szalay-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all

I'm very interested in the latest development of Glassfish v3,
especially concerning osgi.
I'm interested in building applications using OSGi (Declarative Services
in particular) as service layer, EJBs for security, JPA 2.0 for
persistence and JSF 2.0 as frontend layer.
Combining these technologies would provide the best platform for me ;-)

My questions:

- dochez writes in his Blog about @Resource annotation to get access to
osgi services. Will these annotations work in Managed Beans, JSR311
resources, Servlets, EJBs or are there any restrictions?
- is it possible to have access to the ejb layer out of an osgi service?

Best regards



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Questions about new OSGI Features

by Jerome Dochez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Nov 3, 2009, at 8:34 AM, Michael Szalay wrote:

> Hi all
>
> I'm very interested in the latest development of Glassfish v3,  
> especially concerning osgi.
> I'm interested in building applications using OSGi (Declarative  
> Services in particular) as service layer, EJBs for security, JPA 2.0  
> for persistence and JSF 2.0 as frontend layer.
> Combining these technologies would provide the best platform for  
> me ;-)
>
> My questions:
>
> - dochez writes in his Blog about @Resource annotation to get access  
> to osgi services. Will these annotations work in Managed Beans,  
> JSR311 resources, Servlets, EJBs or are there any restrictions?
anything that is Java EE injectable.

> - 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 ?

jerome

> Best regards
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Questions about new OSGI Features

by Sahoo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Questions about new OSGI Features

by Michael Szalay-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Great idea, thanks!


On Wed, Nov 4, 2009 at 1:37 AM, Sahoo <Sahoo@...> wrote:
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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...