camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dhruv.sachdeva" <dhruv.sachd...@jktech.com>
Subject JPA transaction roll back
Date Thu, 23 May 2013 08:48:40 GMT
Hi .I am implementing idempotent consumer pattern for filtering duplicate
message.
When i am creating a new record in database and when i run the service mix
container i get error on container something like this:--

Failed to commit.Jpa transaction rollback.

My logic:-
LOGGER.info("@@@@@@@@@processenter@@@@@@@");
					final Message in = exchange.getIn();
					LOGGER.info("@@@@@@@@@processenterrrrrrrrrrrr11111");
					
					final Customer message =in.getHeader(CUSTOMER_NUMBER, Customer.class);

					
					  //final Customer message = in.getBody(Customer.class);
					LOGGER.info("@@@@@@@@@processenterrrrrrrrrrrrrrrrrrrrrrrrrrrrrr22222");
					message.setCustomerUpdatedDate(DateUtils.getCurrentDate());
					LOGGER.info("message got");
					
					exchange.getOut().setBody(message,Customer.class);

Container is printing 2 log processenter and process enter 1 and after then
container is breaking and no log message is coming.I have flushed the
template also.

Please can  u advice me on this.




--
View this message in context: http://camel.465427.n5.nabble.com/JPA-transaction-roll-back-tp5733006.html
Sent from the Camel Development mailing list archive at Nabble.com.

Mime
View raw message