You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by lekkie <le...@gmail.com> on 2010/05/17 09:41:39 UTC
Connecting Custom camel component to remote provider on-startup
Hi guys,
I have a custom component which I have written, I intend to connect to a
remote service provider over a protocol which I have implemented in my camel
component producer.
I connect to the remote service with the help of CustomProducer which
extends DefaultProducer.
I overruled the doStart function in the base class wherein I asked the
component to establish a connection to the remote provider.
However, I noticed that whenever I start the custom component, it never
connects to the remote entity until a message is sent to the custom
component's endpoint?
How do I make sure it connects at start up?
kr.
--
View this message in context: http://old.nabble.com/Connecting-Custom-camel-component-to-remote-provider-on-startup-tp28580304p28580304.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Connecting Custom camel component to remote provider on-startup
Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, May 18, 2010 at 12:41 PM, lekkie <le...@gmail.com> wrote:
>
> Here is a sample of camel applciation I wrote:
>
> <osgi:camelContext xmlns="http://camel.apache.org/schema/spring"
> trace="true">
> <endpoint id="myCustomEndpointRef"
> uri="customProtocol://${server-ip}:${server-port}/service"/>
> <route>
> <from uri="nmr:myCustomEndpoint"/>
> <to ref="myCustomEndpointRef"/>
> </route>
> </osgi:camelContext>
>
>
> This does not call start, because I purposely logged the function. (It is
> called when message is sent to the exchange).
>
Hi
I have created a ticket to track this
https://issues.apache.org/activemq/browse/CAMEL-2736
> kr.
>
>
>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> You can call start on your producer.
>> But Camel would normally do that for you if you use it from a Camel route.
>>
>> How do you use your custom component?
>>
>>
>>
>> On Mon, May 17, 2010 at 9:41 AM, lekkie <le...@gmail.com> wrote:
>>>
>>> Hi guys,
>>>
>>> I have a custom component which I have written, I intend to connect to a
>>> remote service provider over a protocol which I have implemented in my
>>> camel
>>> component producer.
>>>
>>> I connect to the remote service with the help of CustomProducer which
>>> extends DefaultProducer.
>>> I overruled the doStart function in the base class wherein I asked the
>>> component to establish a connection to the remote provider.
>>>
>>> However, I noticed that whenever I start the custom component, it never
>>> connects to the remote entity until a message is sent to the custom
>>> component's endpoint?
>>>
>>> How do I make sure it connects at start up?
>>>
>>> kr.
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Connecting-Custom-camel-component-to-remote-provider-on-startup-tp28580304p28580304.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: http://old.nabble.com/Connecting-Custom-camel-component-to-remote-provider-on-startup-tp28580304p28594199.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: Connecting Custom camel component to remote provider on-startup
Posted by lekkie <le...@gmail.com>.
Here is a sample of camel applciation I wrote:
<osgi:camelContext xmlns="http://camel.apache.org/schema/spring"
trace="true">
<endpoint id="myCustomEndpointRef"
uri="customProtocol://${server-ip}:${server-port}/service"/>
<route>
<from uri="nmr:myCustomEndpoint"/>
<to ref="myCustomEndpointRef"/>
</route>
</osgi:camelContext>
This does not call start, because I purposely logged the function. (It is
called when message is sent to the exchange).
kr.
Claus Ibsen-2 wrote:
>
> Hi
>
> You can call start on your producer.
> But Camel would normally do that for you if you use it from a Camel route.
>
> How do you use your custom component?
>
>
>
> On Mon, May 17, 2010 at 9:41 AM, lekkie <le...@gmail.com> wrote:
>>
>> Hi guys,
>>
>> I have a custom component which I have written, I intend to connect to a
>> remote service provider over a protocol which I have implemented in my
>> camel
>> component producer.
>>
>> I connect to the remote service with the help of CustomProducer which
>> extends DefaultProducer.
>> I overruled the doStart function in the base class wherein I asked the
>> component to establish a connection to the remote provider.
>>
>> However, I noticed that whenever I start the custom component, it never
>> connects to the remote entity until a message is sent to the custom
>> component's endpoint?
>>
>> How do I make sure it connects at start up?
>>
>> kr.
>> --
>> View this message in context:
>> http://old.nabble.com/Connecting-Custom-camel-component-to-remote-provider-on-startup-tp28580304p28580304.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
>
--
View this message in context: http://old.nabble.com/Connecting-Custom-camel-component-to-remote-provider-on-startup-tp28580304p28594199.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Connecting Custom camel component to remote provider on-startup
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
You can call start on your producer.
But Camel would normally do that for you if you use it from a Camel route.
How do you use your custom component?
On Mon, May 17, 2010 at 9:41 AM, lekkie <le...@gmail.com> wrote:
>
> Hi guys,
>
> I have a custom component which I have written, I intend to connect to a
> remote service provider over a protocol which I have implemented in my camel
> component producer.
>
> I connect to the remote service with the help of CustomProducer which
> extends DefaultProducer.
> I overruled the doStart function in the base class wherein I asked the
> component to establish a connection to the remote provider.
>
> However, I noticed that whenever I start the custom component, it never
> connects to the remote entity until a message is sent to the custom
> component's endpoint?
>
> How do I make sure it connects at start up?
>
> kr.
> --
> View this message in context: http://old.nabble.com/Connecting-Custom-camel-component-to-remote-provider-on-startup-tp28580304p28580304.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus