-->
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: Configuring AutoCommit property.
PostPosted: Mon Jan 31, 2005 5:44 am 
Newbie

Joined: Mon Jan 31, 2005 5:28 am
Posts: 1
Hibernate version:2.1.7

Session session = sessionFactory.openSession();
session.save(cd);
session.flush();
session.close();


Database: SQL Server2000

I executed the above code , but the data object (cd) did not get inserted inside the DB.

Then I tried with the below code,
session.connection().setAutoCommit(true);
to set AutoCommit to true for the connection used by the session instance.

Now I could able to see the inserted records inside the DB.

Is there is any provision to configure the autocommit property via a configuration file?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 31, 2005 6:02 am 
Expert
Expert

Joined: Tue Oct 05, 2004 9:45 am
Posts: 263
well i think you should take a look in the docs and transaction-handling.

gtx
curio


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 31, 2005 9:29 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
actually there is in HB3: hibernate.jdbc.autocommit

but thats not recommended


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.