-->
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.  [ 2 posts ] 
Author Message
 Post subject: Using custom connection settings across multiple calls
PostPosted: Mon Jan 30, 2006 12:08 am 
Beginner
Beginner

Joined: Wed Jul 21, 2004 6:50 pm
Posts: 27
Hi,

I am using Hibernate and Firebird (via Spring). I basically need a full table lock, and so need to grab the Connection object, cast it to a FirebirdConnection object, and set some Transaction settings on it as their mapping of Serializable Isolation does not include a full table lock (we are using Firebird Connection pool to allow us access to the actual Firebird connection).

I have successfully created a transaction with the right settings using JDBC correctly, and am having trouble using that single connection in a Hibernate transaction that spans numerous calls to read / write to the database. When I look at the Hibernate debug statements, it appears that multiple connections are being used.

I would be most grateful if someone could guide me to how to do this, as I am quite confused, and seem to be going in circles. Can I use hibernateTemplate? or do I need to use doInSession/doInTransaction? What settings should I use in the TransactionInterceptor? Using JDBC, the transaction is started when the first statement is executed - how does session.beginTransaction() affect this?

Many thanks,

David


Top
 Profile  
 
 Post subject: h
PostPosted: Mon Jan 30, 2006 12:57 am 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
http://sandbox.sourcelabs.com/kosta/hb- ... ation.html

I suggest not to use HibernateTemplate, it is wery ineffective.

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


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