On Fri, Jan 7, 2011 at 5:38 PM, Christian Schneider
<ch...@die-schneider.net> wrote:
> Hi all,
>
> I would like to send an object to a jms queue using camel.
> While I know I can do:
>
> �...@endpointinject(uri="jms:foo.bar")
>  ProducerTemplate producer;
>
> producer.sendBody(book);
>
> The problem with the above code is that I have camel in the business logic.
> So I would like to use an interface like:
>
> public interface BookListener {
>    void onBook(Book book);
> }
>
> @Produce("jms:foo.bar")
> BookListener bookListener;
>
> bookListener.onBook(book);
>
> When I do this I send a BeanInvocation to the jms queue. Is it possible to
> only send the jaxb serialized object ?
>

No its not possible currently. The BeanInvocation is a serialized
object and the JMS producer is capable of sending objects and thus
sends that. What we need is an option on the JMS producer to send the
parameter instead. In your case its okay as there is only 1 parameter.
But if the onBook method had 2+ parameters it wouldn't be possible, as
which parameter should it send?

Create a JIRA ticket and we can take a look at this.



> Thanks
>
> Christian
>
>
>
> --
> ----
> http://www.liquid-reality.de
>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to