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: Exceptions in version 3.1.2 behaving differently than 3.0.5
PostPosted: Thu Mar 16, 2006 9:21 am 
Newbie

Joined: Sat Jun 26, 2004 11:14 am
Posts: 6
We are using Weblogic server 8.1 for our EJB container and Weblogic portal 8.1 to implement our UI. We have a set of business services that are exposed as stateless session beans.

We are in the process of upgrading our hibernate version from 3.0.5 to 3.1.2.

We are using container managed transactions and each bean method runs in a JTA transaction.

Our hibernate session is scoped to the JTA transaction, hence the session is flushed and the database transaction committed when the bean method completes.

The client code needs to be able to react to hibernate ConstraintViolationException by examining the constraint name and generating an appropriate error for the user.

In 3.0.5 this all worked just fine. When we upgraded to 3.1.2, we no longer get the ConstraintViolationException. We now get an exception indicating that an application rollback has occurred.

This breaks the code in the EJB client that depends on the ConstraintViolationException.

I looked into the differences between 3.0.5 and 3.1.2 and noticed that the org.hibernate.transaction.CacheSynchronizer class has been modified to do a setRollbackOnly() if an exception is raised during the session flush. Hibernate 3.0.5 did not do this. If we remove this call to setRollbackOnly() in 3.1.2, we are able to see the ConstraintViolationException in the client.

Is this a Weblogic specific problem? Weblogic provides a version of setRollbackOnly() that takes a reason parameter, setRollbackOnly(java.lang.Throwable reason), would this method provide the desired behavior? Is there a known workaround for this issue?

Thanks for any assistance.


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.