You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "dhruv.sachdeva" <dh...@jktech.com> on 2013/05/23 10:48:40 UTC
JPA transaction roll back
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.
Re: JPA transaction roll back
Posted by Christian Müller <ch...@gmail.com>.
Please use the user mailing list for this kind of questions as we mention
here [1].
And please read [2] which information you should provide to get help. From
the code you provide it's not clear what you do with the camel-jpa
component...
[1] http://camel.apache.org/mailing-lists.html
[2] http://camel.apache.org/support.html
Best,
Christian
On Thu, May 23, 2013 at 10:48 AM, dhruv.sachdeva
<dh...@jktech.com>wrote:
> 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.
>