You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by AbhishekSamuel <ab...@gmail.com> on 2013/04/11 20:45:49 UTC
JMS Component - Customized messageConverter
Hi,
I am trying to send a customized JMS MapMessage. I am using custom
MessageConverter to solve this purpose. However, i wish to send information
that is not specific to a route. Am using the syntax below
from("file://inbox/order").to("jms:queue:order?messageConverter=#myMessageConverter");
where myMessageConverter has been initialized in spring.
While constructing the route i wish to pass an object to its constructor, so
that the information can be used to send out the JMS. Could you please
advise on how to go about this ?
Thanks
Abhishek Samuel
--
View this message in context: http://camel.465427.n5.nabble.com/JMS-Component-Customized-messageConverter-tp5730725.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: JMS Component - Customized messageConverter
Posted by Christian Mueller <ch...@gmail.com>.
You must be subscribed to the mailing list as we mentioned at [1]. Otherwise
the post is not forwarded to the mailing list and recognized by most of the
users/contributors/committers.
[1] http://camel.apache.org/discussion-forums.html
Best,
Christian
--
View this message in context: http://camel.465427.n5.nabble.com/JMS-Component-Customized-messageConverter-tp5730725p5730728.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: JMS Component - Customized messageConverter
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
You can do it in the xml file using standard spring bean style, eg:
<bean id="myMessageConverter" class="com.foo.MyMessageConverter">
<property name="someName" value="someValue"/>
</bean>
On Sun, Apr 14, 2013 at 3:52 PM, AbhishekSamuel
<ab...@gmail.com> wrote:
> Hey Claus,
>
> Thanks for the reply. Am new to this configuration with spring. How do i go
> about calling the setter method for the myMessageConverter object given the
> syntax am using below ?
>
> from("file://inbox/order").to("jms:queue:order?messageConverter=#myMessageConverter");
>
>
> Thanks
> Abhishek Samuel
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JMS-Component-Customized-messageConverter-tp5730725p5730839.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Re: JMS Component - Customized messageConverter
Posted by AbhishekSamuel <ab...@gmail.com>.
Hey Claus,
Thanks for the reply. Am new to this configuration with spring. How do i go
about calling the setter method for the myMessageConverter object given the
syntax am using below ?
from("file://inbox/order").to("jms:queue:order?messageConverter=#myMessageConverter");
Thanks
Abhishek Samuel
--
View this message in context: http://camel.465427.n5.nabble.com/JMS-Component-Customized-messageConverter-tp5730725p5730839.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: JMS Component - Customized messageConverter
Posted by Claus Ibsen <cl...@gmail.com>.
Just add setter methods to your myMessageConverter class, and call the
setter method when you have the runtime information.
On Fri, Apr 12, 2013 at 6:37 AM, AbhishekSamuel
<ab...@gmail.com> wrote:
> Hey,
>
> I understand spring supports it out of the box, but the object information
> is not available at spring initialization time. I have the object
> information at run time and if i cant use the constructor method, at least
> if there is a way of accessing the setter method of myMessageConverter, that
> would help.
>
> Thanks
> Abhishek
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JMS-Component-Customized-messageConverter-tp5730725p5730746.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Re: JMS Component - Customized messageConverter
Posted by AbhishekSamuel <ab...@gmail.com>.
Hey,
I understand spring supports it out of the box, but the object information
is not available at spring initialization time. I have the object
information at run time and if i cant use the constructor method, at least
if there is a way of accessing the setter method of myMessageConverter, that
would help.
Thanks
Abhishek
--
View this message in context: http://camel.465427.n5.nabble.com/JMS-Component-Customized-messageConverter-tp5730725p5730746.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: JMS Component - Customized messageConverter
Posted by Willem jiang <wi...@gmail.com>.
Do you want to pass the object to the constructor of myMessageConverter?
Spring supports it out of box :)
--
Willem Jiang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On Friday, April 12, 2013 at 2:45 AM, AbhishekSamuel wrote:
> Hi,
>
> I am trying to send a customized JMS MapMessage. I am using custom
> MessageConverter to solve this purpose. However, i wish to send information
> that is not specific to a route. Am using the syntax below
>
> from("file://inbox/order").to("jms:queue:order?messageConverter=#myMessageConverter");
>
> where myMessageConverter has been initialized in spring.
>
> While constructing the route i wish to pass an object to its constructor, so
> that the information can be used to send out the JMS. Could you please
> advise on how to go about this ?
>
> Thanks
> Abhishek Samuel
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JMS-Component-Customized-messageConverter-tp5730725.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).