You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by dgb714393701 <71...@qq.com> on 2012/07/25 10:55:49 UTC

how to create a component of camel for tuxedo?




--
View this message in context: http://camel.465427.n5.nabble.com/how-to-create-a-component-of-camel-for-tuxedo-tp5716442.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: how to create a component of camel for tuxedo?

Posted by Christian Müller <ch...@gmail.com>.
We love contributions (for Camel extra too) [1].
We have a Maven archetype to create new components [2].
Have a look into existing components "how it works".

[1] http://camel.apache.org/contributing.html
[2] http://camel.apache.org/camel-maven-archetypes.html

My 0,02$,
Christian

On Wed, Jul 25, 2012 at 9:21 PM, Hadrian Zbarcea <hz...@gmail.com> wrote:

> Actually it's not that easy, but very possible. The impl would be a bit
> different depending on what flavor you're using, the Java or C one (in the
> latter case you'd need a bit of jni as well and packaging is not trivial).
> There will likely be limitations, like running in an OSGi container for
> instance. You'll also have to deal with the data types.
>
> The idea is pretty straightforward though:
> * the Endpoint configuration is very simple (I don't think you need much
> more the Tux service)
> * your Tux service would become a Consumer (the event-driven one, not
> polling).
> * your Consumer and Producers would be Camel Services (already the
> default) so you'd call tpinit/tpdone (iirc) in doStart/doStop.
> * your Producer.process would invoke on tpcall or tpacall as appropriate
> * you have a couple of options of dealing with replies to async calls
> (tpacall).
>
> That's kinda the idea.
> Hadrian
>
>
>
> On 07/25/2012 11:17 AM, Willem Jiang wrote:
>
>> If you have third part jar which can do the tp_call, it could be easy to
>> write a camel-tuxedo component.
>>
>>
>> On Wed Jul 25 16:57:40 2012, dgb714393701 wrote:
>>
>>> how to create a component of camel for tuxedo? i want to communicate to
>>> TUXEDO use camel.
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://camel.465427.n5.nabble.**com/how-to-create-a-component-**
>>> of-camel-for-tuxedo-**tp5716442p5716443.html<http://camel.465427.n5.nabble.com/how-to-create-a-component-of-camel-for-tuxedo-tp5716442p5716443.html>
>>>
>>> Sent from the Camel Development mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>> --
>> Willem
>> ------------------------------**----
>> FuseSource
>> Web: http://www.fusesource.com
>> Blog:    http://willemjiang.blogspot.**com<http://willemjiang.blogspot.com>(English)
>>          http://jnn.javaeye.com (Chinese)
>> Twitter: willemjiang
>> Weibo: willemjiang
>>
>>

Re: how to create a component of camel for tuxedo?

Posted by Ashwin Karpe <ak...@fusesource.com>.
Hi,

Please check out this link. It should give you a Maven archetype to create
the skeletal structure for creating a camel component.

http://http://camel.apache.org/creating-a-new-camel-component.html
http://http://camel.apache.org/creating-a-new-camel-component.html 

Following this check out 4 core classes in org.apache.camel.impl
   - DefaultComponent
   - DefaultEndpoint
   - DefaultConsumer 
   - DefaultProducer

Extending and creating concrete versions of these classes should get you
well on your way to creating your own component.

This is a good starting point. I am sure, you will figure out the rest for
yourself.

Cheers,

Ashwin...



-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com 
---------------------------------------------------------
--
View this message in context: http://camel.465427.n5.nabble.com/how-to-create-a-component-of-camel-for-tuxedo-tp5716442p5716880.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: how to create a component of camel for tuxedo?

Posted by Hadrian Zbarcea <hz...@gmail.com>.
Actually it's not that easy, but very possible. The impl would be a bit 
different depending on what flavor you're using, the Java or C one (in 
the latter case you'd need a bit of jni as well and packaging is not 
trivial). There will likely be limitations, like running in an OSGi 
container for instance. You'll also have to deal with the data types.

The idea is pretty straightforward though:
* the Endpoint configuration is very simple (I don't think you need much 
more the Tux service)
* your Tux service would become a Consumer (the event-driven one, not 
polling).
* your Consumer and Producers would be Camel Services (already the 
default) so you'd call tpinit/tpdone (iirc) in doStart/doStop.
* your Producer.process would invoke on tpcall or tpacall as appropriate
* you have a couple of options of dealing with replies to async calls 
(tpacall).

That's kinda the idea.
Hadrian


On 07/25/2012 11:17 AM, Willem Jiang wrote:
> If you have third part jar which can do the tp_call, it could be easy to
> write a camel-tuxedo component.
>
>
> On Wed Jul 25 16:57:40 2012, dgb714393701 wrote:
>> how to create a component of camel for tuxedo? i want to communicate to
>> TUXEDO use camel.
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/how-to-create-a-component-of-camel-for-tuxedo-tp5716442p5716443.html
>>
>> Sent from the Camel Development mailing list archive at Nabble.com.
>>
>
>
>
> --
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>          http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
> Weibo: willemjiang
>

Re: how to create a component of camel for tuxedo?

Posted by Willem Jiang <wi...@gmail.com>.
If you have third part jar which can do the tp_call, it could be easy 
to write a camel-tuxedo component.


On Wed Jul 25 16:57:40 2012, dgb714393701 wrote:
> how to create a component of camel for tuxedo? i want to communicate to
> TUXEDO use camel.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/how-to-create-a-component-of-camel-for-tuxedo-tp5716442p5716443.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang


Re: how to create a component of camel for tuxedo?

Posted by dgb714393701 <71...@qq.com>.
how to create a component of camel for tuxedo? i want to communicate to
TUXEDO use camel.



--
View this message in context: http://camel.465427.n5.nabble.com/how-to-create-a-component-of-camel-for-tuxedo-tp5716442p5716443.html
Sent from the Camel Development mailing list archive at Nabble.com.