Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

@Transactional(propagation = Propagation.REQUIRES_NEW)

804785Aug 2 2011 — edited Aug 3 2011
Hi,

I have a current transaction going on.
In case I come across into an exception, I need to call another method which persists data. (I want it to be persisted no matter what!)

For that reason, I have called a new method from the exception marked as "@Transactional(propagation = Propagation.REQUIRES_NEW)".
But going through that method, flow gets hanged on a 'return query.getResultList();' statement.

I checked in the database at that point of time to find the concerned tables having a lock.

How do I get the persisting done and then continue with the original transaction?

Thanks in advance!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 31 2011
Added on Aug 2 2011
11 comments
2,633 views