-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: I need to know when hibernate has completed it's transaction
PostPosted: Thu Nov 11, 2010 2:51 pm 
Newbie

Joined: Wed Jun 17, 2009 5:27 pm
Posts: 9
I have an entity that has a CallBackListener registered using postPersist and postUpdate. The listener takes the entity and submits the ID to a JMS queue which perform further processing. The message submission and consumption are so fast that they're occurring before the original session has completed it's transaction.

As a result the MDB either can't find the entity or the entity is stale. What I really want is a way to have the MDB check to verify that the original transaction is complete before consuming the message.

It's been suggested to use the Interceptor.afterTransactionCompletion method. However, is this any different than the postUpdate lifecycle event?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.