-->
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: NHibernate and Enterprise Serviced Components transactions
PostPosted: Wed Sep 21, 2005 4:06 am 
Newbie

Joined: Fri Sep 16, 2005 12:10 pm
Posts: 3
Will an NHibernate transaction join an Enterprise Serviced Component transaction? So if I have an enterprise service component that creates a required transaction that invokes a method in another serviced component whose transaction supports the previous transaction and if in each of these methods we are invoking methods on NHibernate classes that begin and end their own transactions then will these NHibernate transactions join the serviced component transactions? So if there is a rollback in this process at the serviced component level will the NHibernate transaction be rolled back?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 4:45 am 
Newbie

Joined: Thu May 19, 2005 6:04 am
Posts: 14
Location: Glasgow, UK
I'm using it within the realms of SWC (Services Without Components) on Server 2003 (which basically allows you to enlist in COM+ without all the pre registering etc, still uses system.enterprise services etc). It works like a charm, I need to do this as we have to run transactions over both multiple dbs and multiple db engines (SQL Server and Oracle 9).

I haven't tried it under the older style COM+ component, but I'm fairly sure it will work fine.

Hope this helps

Mark


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 4:53 am 
Regular
Regular

Joined: Fri Jun 11, 2004 6:27 am
Posts: 81
Location: Yaroslavl, Russia
Currenlty NH's transaction is realized in only one flavor - as a wrapper for ADO.NET transaction. So if you will start distributed transaction and then try to open ADO.NET transaction you will most likely get an error.
From other hand, you are not obligated to use NH transaction at all. You just have to be aware of possible caching problems if your distributed transaction being rolled back. I mean, that your transaction could span several sessions (or session flushes) and each of them would think that flushing was completed successfully.
Another issue you have to know of - the connection to the database must be either opened after the start of a distributed transaction, or you have to manually enlist it in the transaction.

_________________
Best,
Andrew Mayorov // BYTE-force


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.