camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DRy <dirk.rybin...@itellium.com>
Subject Can not consume JPA Object
Date Tue, 27 Oct 2009 07:50:09 GMT

Hi,

when I try to consume a database object (JPA - openJPA) within the following
route (RouteBuilder) ...

public void configure() {

    onException(Exception.class)
        .maximumRedeliveries(-1).redeliveryDelay(1000)
        .handled(true)
            .bean(LogExceptionBean.class,"logException")
        .rollback()
    .end();

   
from("jpa:com.itellium.eai.store.schema.entity.Customer?consumer.namedQuery=findAll&delay=10000&consumeLockEntity=true&consumeDelete=true")
        .id("jpaIn")
        .transacted()
            .bean(LogBean.class,"logMessage")
            .to("jms:jpaIn?jmsMessageType=Object")
    .end();
}

... the object is deleted in the database but never published to the
destination queue (JMS - ActiveMQ)! I've got no exception (loglevel is INFO)
but when I enable tracing for the route (in jconsole) I get the following
...

2009-10-27 08:31:54,906 [1: JpaComponent] INFO  Tracer                        
- 4c83b6d7-4cc0-48fa-b571-261a7b949c90 >>>
from(jpa://com.itellium.eai.store.schema.entity.Customer?consumeDelete=false&consumeLockEntity=true&consumer.namedQuery=findAll&delay=10000)
-->, Pattern:InOnly, Headers:{CamelRedelivered=true,
CamelRedeliveryCounter=29, CamelBeanMultiParameterArray=false,
CamelJpaTemplate=org.springframework.orm.jpa.JpaTemplate@1fba15d,
CamelBeanMethodName=logMessage},
BodyType:com.itellium.eai.store.schema.entity.Customer,
Body:com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1)
2009-10-27 08:31:54,909 [1: JpaComponent] INFO  Tracer                        
- 4c83b6d7-4cc0-48fa-b571-261a7b949c90 >>>
from(jpa://com.itellium.eai.store.schema.entity.Customer?consumeDelete=false&consumeLockEntity=true&consumer.namedQuery=findAll&delay=10000)
-->, Pattern:InOnly, Headers:{CamelRedeliveryCounter=29,
CamelBeanMethodName=logMessage, CamelBeanMultiParameterArray=false,
CamelRedelivered=true,
CamelJpaTemplate=org.springframework.orm.jpa.JpaTemplate@1fba15d},
BodyType:com.itellium.eai.store.schema.entity.Customer,
Body:com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1),
Exception: org.apache.camel.CamelExecutionException: Exception occurred
during execution on the exchange: Exchange[Message:
com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1)]
2009-10-27 08:31:55,913 [1: JpaComponent] INFO  Tracer                        
- 4c83b6d7-4cc0-48fa-b571-261a7b949c90 >>>  -->, Pattern:InOnly,
Headers:{CamelBeanMultiParameterArray=false, CamelRedeliveryCounter=30,
CamelRedelivered=true, CamelBeanMethodName=logMessage,
CamelJpaTemplate=org.springframework.orm.jpa.JpaTemplate@1fba15d},
BodyType:com.itellium.eai.store.schema.entity.Customer,
Body:com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1)
2009-10-27 08:31:55,914 [1: JpaComponent] INFO  Tracer                        
- 4c83b6d7-4cc0-48fa-b571-261a7b949c90 >>>  -->, Pattern:InOnly,
Headers:{CamelBeanMethodName=logMessage,
CamelJpaTemplate=org.springframework.orm.jpa.JpaTemplate@1fba15d,
CamelBeanMultiParameterArray=false, CamelRedelivered=true,
CamelRedeliveryCounter=30},
BodyType:com.itellium.eai.store.schema.entity.Customer,
Body:com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1),
Exception: org.apache.camel.CamelExecutionException: Exception occurred
during execution on the exchange: Exchange[Message:
com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1)]
2009-10-27 08:31:56,916 [1: JpaComponent] INFO  Tracer                        
- 4c83b6d7-4cc0-48fa-b571-261a7b949c90 >>>  -->, Pattern:InOnly,
Headers:{CamelRedelivered=true, CamelBeanMultiParameterArray=false,
CamelBeanMethodName=logMessage, CamelRedeliveryCounter=31,
CamelJpaTemplate=org.springframework.orm.jpa.JpaTemplate@1fba15d},
BodyType:com.itellium.eai.store.schema.entity.Customer,
Body:com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1)
2009-10-27 08:31:56,917 [1: JpaComponent] INFO  Tracer                        
- 4c83b6d7-4cc0-48fa-b571-261a7b949c90 >>>  -->, Pattern:InOnly,
Headers:{CamelRedeliveryCounter=31,
CamelJpaTemplate=org.springframework.orm.jpa.JpaTemplate@1fba15d,
CamelBeanMultiParameterArray=false, CamelBeanMethodName=logMessage,
CamelRedelivered=true},
BodyType:com.itellium.eai.store.schema.entity.Customer,
Body:com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1),
Exception: org.apache.camel.CamelExecutionException: Exception occurred
during execution on the exchange: Exchange[Message:
com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1)]
2009-10-27 08:31:57,918 [1: JpaComponent] INFO  Tracer                        
- 4c83b6d7-4cc0-48fa-b571-261a7b949c90 >>>  -->, Pattern:InOnly,
Headers:{CamelRedelivered=true, CamelBeanMultiParameterArray=false,
CamelBeanMethodName=logMessage,
CamelJpaTemplate=org.springframework.orm.jpa.JpaTemplate@1fba15d,
CamelRedeliveryCounter=32},
BodyType:com.itellium.eai.store.schema.entity.Customer,
Body:com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1)
2009-10-27 08:31:57,920 [1: JpaComponent] INFO  Tracer                        
- 4c83b6d7-4cc0-48fa-b571-261a7b949c90 >>>  -->, Pattern:InOnly,
Headers:{CamelBeanMultiParameterArray=false, CamelRedelivered=true,
CamelBeanMethodName=logMessage,
CamelJpaTemplate=org.springframework.orm.jpa.JpaTemplate@1fba15d,
CamelRedeliveryCounter=32},
BodyType:com.itellium.eai.store.schema.entity.Customer,
Body:com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1),
Exception: org.apache.camel.CamelExecutionException: Exception occurred
during execution on the exchange: Exchange[Message:
com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1)]
2009-10-27 08:31:58,922 [1: JpaComponent] INFO  Tracer                        
- 4c83b6d7-4cc0-48fa-b571-261a7b949c90 >>>  -->, Pattern:InOnly,
Headers:{CamelBeanMultiParameterArray=false,
CamelJpaTemplate=org.springframework.orm.jpa.JpaTemplate@1fba15d,
CamelRedelivered=true, CamelBeanMethodName=logMessage,
CamelRedeliveryCounter=33},
BodyType:com.itellium.eai.store.schema.entity.Customer,
Body:com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1)
2009-10-27 08:31:58,923 [1: JpaComponent] INFO  Tracer                        
- 4c83b6d7-4cc0-48fa-b571-261a7b949c90 >>>  -->, Pattern:InOnly,
Headers:{CamelRedelivered=true,
CamelJpaTemplate=org.springframework.orm.jpa.JpaTemplate@1fba15d,
CamelBeanMultiParameterArray=false, CamelBeanMethodName=logMessage,
CamelRedeliveryCounter=33},
BodyType:com.itellium.eai.store.schema.entity.Customer,
Body:com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1),
Exception: org.apache.camel.CamelExecutionException: Exception occurred
during execution on the exchange: Exchange[Message:
com.itellium.eai.store.schema.entity.Customer@1e335d7(oid=1,name=Name1,oversion=1)]

... and so on.

Any ideas ... ?


... DRy
-- 
View this message in context: http://www.nabble.com/Can-not-consume-JPA-Object-tp26073512p26073512.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message