-->
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.  [ 8 posts ] 
Author Message
 Post subject: Question about transactions
PostPosted: Thu Jan 22, 2004 5:36 am 
Newbie

Joined: Tue Oct 07, 2003 6:48 am
Posts: 10
Hello, I


Top
 Profile  
 
 Post subject: Re: Question about transactions
PostPosted: Thu Jan 22, 2004 8:37 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Code:
<property name="transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property>

Means: use JTA as a transaction provider instead of JDBC

Code:
<property name="jta.UserTransaction">java:comp/UserTransaction</property>


means: Where to find current transaction in the jndi.[/quote]

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 22, 2004 10:21 am 
Newbie

Joined: Wed Jan 21, 2004 10:09 am
Posts: 13
Hi Elroth,

I checked my cfg file - I don't have any specific setup for transactions there, and code similiar to yours is working for me.

Just to be clear, after you run that code, you don't have any data persisted to the database? Did you get an exception?

Cheers,

Mark


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 22, 2004 11:32 am 
Newbie

Joined: Tue Oct 07, 2003 6:48 am
Posts: 10
The scenario is the following:

* As I save the object when the transaction is committed, it is persisted in the database. The persisted object is saved in different tables of the database. One of those tables generates an error, so the transaction fails. It should be rolled back then, but the tables remain with the data that has been saved, so the rollback isn


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 22, 2004 11:48 am 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
What database(s) and AppServer are you using ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 22, 2004 11:54 am 
Newbie

Joined: Tue Oct 07, 2003 6:48 am
Posts: 10
The database I'm using is Oracle 8i and the application server is oc4j 9.0.2.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 22, 2004 12:24 pm 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
And you have access to your DB through a connection provided by the App server ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 22, 2004 12:27 pm 
Newbie

Joined: Tue Oct 07, 2003 6:48 am
Posts: 10
Yes, I use JNDI to get the connection.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 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.