-->
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: Passing IDbTransaction to NHibernate
PostPosted: Mon Feb 12, 2007 2:03 pm 
Newbie

Joined: Mon Feb 12, 2007 10:53 am
Posts: 6
Hi,

I have the following situation:

1) Create an OracleConnection (or an IDbConnection)
2) Create an OracleTransaction (or an IDbTransaction)
3) Execute a command in that transaction's context
4) Create an NHibernate ISession using the IDbConnection (ISessionFactory.OpenSession(IDbConnection))
5) Save some entity using NHibernate's Session (ISession.Save(Object))
6) Commit the transaction (IDbTransaction or NHibernate.ITransaction)

This doesn't work! I get an error (in step 5) complaining about a Transaction that's not associated with the Command object.

So, how can i create an IDbTransaction and share that transaction with NHibernate? This must be possible, right?

Regards...


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.