users@glassfish.java.net

Re: Apache CAMEL & GlassFish [Re: Java EE & OSGi [Re: GlassFish and Container]]

From: Sanjeeb Sahoo <sahoo_at_sun.com>
Date: Fri, 12 Nov 2010 10:12:34 +0530

On Friday 12 November 2010 02:06 AM, S. Ali Tokmen wrote:
> Hello again
>
> Well, the typical services I use in CAMEL routes would be:
>
> * HTTP service. Indeed, Glassfish does that one.
> * For camel-cxf, I need a CXF bus. AFAIK, Glassfish does not
> expose any CXF bus on the OSGi platform does it?
>
Where is the API for CXF bus service defined? I know it is an Apache
project, what I am asking you to help me understand what it would take
to make this available in GlassFish.
>
> * Similarly, I prefer to have OSGi services for things like the
> transaction manager or JDBC datasources (without having to rely
> on JNDI).
>
> Do you know if the latter two can be made available in Glassfish?
Oh yes. JTA artifacts like TransactionSynchronisationRegistry or
UserTransaction is available OSGi service registry following the rules
mentioned in OSGi/JTA spec. All datasources deployed in GlassFish are
also available as OSGi services of type javax.sql.DataSource. In fact,
this functionality is applicable to all kinds of Java EE resources -
thanks to Jagadish - GlassFish connector module lead. So, JMS Queues and
destinations, JavaMail connection factory, etc. are available in service
registry dynamically as well. I am sure with your knowledge of OSGi, you
can find more about them on your own by just browsing the service
registry using web console or some command line tool. These are now
available in the distribution by default if you take a look at the
latest promoted 3.1 builds.

Thanks,
Sahoo