-->
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.  [ 3 posts ] 
Author Message
 Post subject: websphere always rolling back transactions
PostPosted: Tue Jun 08, 2004 4:36 am 
Newbie

Joined: Tue Jun 08, 2004 4:24 am
Posts: 1
Hi,
I'm using Hibernate 2.1 with websphere 5 and I have the following trouble:

When saving a new object, the transaction commits ok but then Websphere rolls back the transaction.

Here is the websphere log:
--------------------
[07/06/04 18:43:25:969 CEST] 2030b532 WebAppRequest d Checking UserTransaction for Incomplete transactions
[07/06/04 18:43:25:969 CEST] 2030b532 UserTransacti > com.ibm.ejs.jts.jta.UserTransactionImpl.getStatus
[07/06/04 18:43:25:969 CEST] 2030b532 CurrentImpl > get_status
[07/06/04 18:43:25:969 CEST] 2030b532 CoordinatorIm > get_status
[07/06/04 18:43:25:969 CEST] 2030b532 CoordinatorIm < get_status
0
[07/06/04 18:43:25:969 CEST] 2030b532 CurrentImpl < get_status:
0
[07/06/04 18:43:25:969 CEST] 2030b532 UserTransacti < com.ibm.ejs.jts.jta.UserTransactionImpl.getStatus
return=Active
[07/06/04 18:43:25:969 CEST] 2030b532 WebAppRequest d Status is not STATUS_NO_TRANSACTION so rollback
[07/06/04 18:43:25:969 CEST] 2030b532 WebAppRequest u Rolling back UserTransaction
[07/06/04 18:43:25:969 CEST] 2030b532 UserTransacti > com.ibm.ejs.jts.jta.UserTransactionImpl.rollback
[07/06/04 18:43:25:969 CEST] 2030b532 CurrentSet > getUOWCoord
[07/06/04 18:43:25:969 CEST] 2030b532 CurrentImpl > getUOWCoord
[07/06/04 18:43:25:969 CEST] 2030b532 CurrentImpl < getUOWCoord
com.ibm.ejs.jts.jts.CoordinatorImpl@1696789816#tid=8
-----------------

Here is an excerpt of my hibernate.cfg.xml file:
-------------
<session-factory>
<!-- properties -->
<property name="connection.datasource">java:comp/env/SPECTT_DataSourceAlias</property>
<property name="jndi.class">com.ibm.websphere.naming.WsnInitialContextFactory</property>
<property name="dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>
<property name="show_sql">true</property>
<property name="use_outer_join">true</property>
<property name="transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property>
<property name="jdbc.batch_size">0</property>
-------------

This does happen for one business object only, other objects are saved perfectly.
I make sure the hibernate session is closed before control returns back to the websphere servlet container. I also ensure the hibernate session is closed in every JSP.

Any help is very welcome.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 11, 2004 5:19 am 
Newbie

Joined: Tue Jun 15, 2004 10:45 am
Posts: 18
Location: Boston, USA
Is your DTO that you are pesisting implementing any of the Lifecycle events?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 12, 2004 6:20 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Does you EJB entry method has the appropriate tx strategy

_________________
Emmanuel


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

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.