On Tue, Nov 3, 2009 at 2:42 PM, DRy <[email protected]> wrote:
>
> Hi,
>
> if I try to get an object from my jpa-resource and pass it to jms, the
> jms-message body is always null! I use the following route dfinition:
>
>
> from("jpa:com.itellium.eai.camelexample.entity.Customer?consumer.namedQuery=findAll&delay=10000&consumeLockEntity=true&consumeDelete=false")
>            .routeId(JPAInRouteBuilder.ROUTE_ID)
>            .transacted()
>                .bean(messageLogBean)
>
> .to("jms:jpaIn?exchangePattern=InOnly&transacted=true&jmsMessageType=Object")
>        .end();
>
> If I look at the log, I can see that I get an object from the database (at
> the point of the bean-call):
>
> 2009-11-03 14:30:19,952 [1: JpaComponent] INFO  MessageLogBean
> - jpaIn,cadd73c8-edc5-4764-9ea2-bbeeb76bf9e8,Exchange[Message:
> com.itellium.eai.camelexample.entity.custo...@509bfc(oid=1,name=Name1,oversion=1)],body[com.itellium.eai.camelexample.entity.custo...@509bfc(oid=1,name=Name1,oversion=1)]
>
> I had tryed to use a route definition without any ben-call ... same effect
> ...
>
> Im not sure ... but this may be a problem in the latest snapshot?
>

I guess JPA has instrumented and all sorts to those objects so you
cant serialize them and send them over the remote network.
Maybe there is something in the JPA API to detach or what it may be
called from the JPA EntityFactory so you can send it over network.



>
> ... DRy
>
> --
> View this message in context: 
> http://old.nabble.com/JPA%3A-Could-not-pass-Object-from-jpa-to-jms-tp26160124p26160124.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

Reply via email to