Thread:
 Regarding code from Andrew Mayorov 
 xor   15 Oct 2007, 11:41 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: xor (15 Oct 2007, 11:41) Replies: 0, Views: 934
Subject: Regarding code from Andrew Mayorov
I afraid, my code samples are a bit outdated for current version of NH.
I was trying to a) make session instance that could be easily used
across several unrelated parts of an application and b) make session
open and release connections for a short time, to play nicely with
connection pooling.

Now point "b" is already working as is. Point "a" became very doubtful
for me - looks like it's better to explicitly open a session and pass it
as argument to all necessary methods. Yes, it's a bit "not that
magical", but it removes magic-related bugs.

-- Andrew Mayorov
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]