-->
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: Code cant fail in Interceptor.beforeTransactionCompletion()?
PostPosted: Fri Mar 23, 2007 2:41 pm 
Newbie

Joined: Fri Mar 23, 2007 2:10 pm
Posts: 1
Hi' everybody,
We have implemented a custom org.hibernate.Interceptor for handling some tasks before transaction completion. We found that our code could fail and the Exception thrown were lost.

Examining hibernate's sources we found the reason:

SessiomImpl.class
Code:
public void beforeTransactionCompletion(Transaction tx) {
      log.trace( "before transaction completion" );
      if ( rootSession == null ) {
         try {
            interceptor.beforeTransactionCompletion(tx);
         }
         catch (Throwable t) {
            log.error("exception in interceptor beforeTransactionCompletion()", t);
         }
      }
   }


Hibernate is hiding our exception and we cannot handle it right. Is there any reason for this? How can we workaround this issue. (We need to know if code failed).

Thank you very much!

Hibernate version: 3.2.0 GA


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.