NHProof alert: implicit transaction

31 views
Skip to first unread message

Mauro Servienti

unread,
Oct 27, 2009, 2:55:08 PM10/27/09
to nhp...@googlegroups.com
Hi,

in an IpreInsertEventListener I'm using something like this:

var innerSession = evt.Session.GetSession( evt.Session.EntityMode )

in oder to have a child session. The parent session is used in this way:

using( var dc = factory.OpenSession() )
{
using( var tx = dc.BegingTransaction( IsolationLevel.Serializable )
)
{
dc.Insert( estimate );
dc.FlushChanges();

tx.Commit();
}
}

NHProof issue an alert, on the second session saying that: "the usage of
implicit transaction is discouraged", but as far as I can understand there
Is no implicit transaction here, the second session inherits (and the
debugger confirm this) all the parent session settings.

.m

Nick Aceves

unread,
Oct 27, 2009, 3:24:43 PM10/27/09
to nhp...@googlegroups.com
Can you actually see the transaction in NHProf?

Sounds like this could just be the way NH behaves, and not an issue with NHProf.

Ayende Rahien

unread,
Oct 27, 2009, 3:27:43 PM10/27/09
to nhp...@googlegroups.com
Yes, that is a known problem, NH doesn't currently outputs the information to tell that.

Ayende Rahien

unread,
Oct 27, 2009, 3:27:56 PM10/27/09
to nhp...@googlegroups.com
I need some time to see if I can deal with this.

Mauro Servienti

unread,
Oct 28, 2009, 12:18:08 AM10/28/09
to nhp...@googlegroups.com
No, no transaction displayed in nhproof

.m

Mauro Servienti

unread,
Oct 28, 2009, 12:19:13 AM10/28/09
to nhp...@googlegroups.com
Hi Ayende,

Ok, just to know that I'm not doing anything wrong in this case.

THanks
.m

From: nhp...@googlegroups.com [mailto:nhp...@googlegroups.com] On Behalf Of
Ayende Rahien
Sent: martedì 27 ottobre 2009 20:28
To: nhp...@googlegroups.com
Subject: Re: NHProof alert: implicit transaction

Mauro Servienti

unread,
Oct 28, 2009, 12:19:57 AM10/28/09
to nhp...@googlegroups.com
I can live with it in the meantime :-)

.m

From: nhp...@googlegroups.com [mailto:nhp...@googlegroups.com] On Behalf Of
Ayende Rahien
Sent: martedì 27 ottobre 2009 20:28
To: nhp...@googlegroups.com
Subject: Re: NHProof alert: implicit transaction

Reply all
Reply to author
Forward
0 new messages