users@glassfish.java.net

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

From: S. Ali Tokmen <java_at_alishomepage.com>
Date: Thu, 11 Nov 2010 21:36:27 +0100

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

Cheers

S. Ali Tokmen
http://ali.tokmen.com/

GSM (fr): +33 66 43 00 555 [Orange]
GSM (tr): +90 555 266 52 73 [Avea]

My AIM, ICQ, MSN Messenger and Yahoo IM
contact details are on http://contact.ali.tokmen.com


On 11.11.2010 18:11, Sanjeeb Sahoo wrote:
> Hi,
>
> Let me understand this better. What is required for camel-servlet or
> camel-cxf bundle to use GlassFish HTTP server? What are they looking
> for and how is that available in JOnAS? Are they looking for
> org.osgi.service.http.HttpService? GlassFish already implements this
> service. Honestly there are so many dependency injection framework out
> there that it is hard to distribute all of them. One can definitely
> drop in iPOJO bundles in glassfish and then have it take care of
> dependency injection. As you know, we use CDI as the dependency
> injection framework in GlassFish. We have extended it to do OSGi
> service injection as well.
>
> Thanks,
> Sahoo
>
> On Thursday 11 November 2010 09:20 PM, S. Ali Tokmen wrote:
>> Hello
>>
>> Apache CAMEL and Glassfish work pretty well: all CAMEL bundles deploy
>> on Glassfish, and if you create routes that use these bundles these
>> also work well.
>>
>> What doesn't work is an advanced configuration, where you would like
>> your routes to reuse existing Glassfish services (for example, having
>> the camel-servlet or camel-cxf bundle reuse the Glassfish HTTP
>> server). Some aspects of dynamism are also missing: what you can do
>> in Glassfish is only the BundleActivator thing, and you have to
>> manually manage the reuse of other OSGi services. In an OSGi
>> framework with for example iPOJO, you can have these dependencies
>> injected, your Camel route started; and in the case the dependent
>> service stops or gets updated your route also automatically stopped,
>> reinjected and restarted.
>>
>> Cheers
>>
>> S. Ali Tokmen
>> http://ali.tokmen.com/
>>
>> GSM (fr): +33 66 43 00 555 [Orange]
>> GSM (tr): +90 555 266 52 73 [Avea]
>>
>> My AIM, ICQ, MSN Messenger and Yahoo IM
>> contact details are on http://contact.ali.tokmen.com
>>
>> On 11.11.2010 15:07, Sanjeeb Sahoo wrote:
>>> On Thursday 11 November 2010 05:17 PM, S. Ali Tokmen wrote:
>>>>
>>>> 1. Tight integration of Java EE and OSGi as well as automated
>>>> service injection is currently only possible in JOnAS. I have
>>>> for example written an article that explains how to integrate
>>>> the Apache CAMEL lightweight ESB to the OW2 JOnAS Java EE
>>>> server, enhancing the lightweight ESB with centralized
>>>> configuration, management and deployment as well as advanced
>>>> Java EE services such as managed HTTP, XA, etc. You can read
>>>> more on
>>>> http://www.alishomepage.com/Articles/CAMEL_JONAS_5_OSGi/Article.pdf
>>>>
>>> I had a brief look at the article. I am wondering why this does not
>>> work in GlassFish. What services required by Apache CAMEL are
>>> missing in GlassFish? I can find out if I spend some time, but I am
>>> asking assuming you already know the answer.
>>>
>>> Thanks,
>>> Sahoo
>