-->
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: Getting new ISession w/connection w/Trans already started
PostPosted: Fri Nov 17, 2006 4:41 pm 
Beginner
Beginner

Joined: Sat Apr 17, 2004 1:11 am
Posts: 36
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
1.0.1

I have a situation where I'd like to get an ISession and pass it my own database connection (which we do for all new sessions because we do our own pooling with different database connection strings for different types of sessions) which already has a database transaction started. From what I can tell, the Transaction property on the ISession never gets set on the new session - it only gets set if you call BeginTransaction() on the session. Then the BatcherImpl only checks the Transaction property on the session to see if it needs to enlist each command with any current transaction. Therefore when I go to do anything with the new session I get a complaint that the SQL command is not enlisted in the current transaction because that property is not set.

If there was/is a way to get the transaction passed or otherwise set on a new session either from an existing session or another method signature then that would be great. Or if I've missed anything in the API that would be stellar as well...

Thx,

benster


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.