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