-->
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: SessionFactory keeping an open connection
PostPosted: Thu Jun 17, 2010 11:04 am 
Newbie

Joined: Thu Jun 17, 2010 10:41 am
Posts: 3
Hi all,

I have a set of nunit-based integration/persistence tests that roughly go as follows:

SetUp Delete the existing database, create a new database, load NHibernate configuration, SchemaExport.Create(). This is done by our application object, which means that a SessionFactory is created as well even though I don't really use it in this step.

Test Put some data in the database, close the app (and nhibernate), open a new instance of the app, load data, compare data.

For each test, the first step is repeated. However, after the first test, the setup fails because the database is still in use and cannot be dropped. The SessionFactory seems to open a connection on creation and does not close this anymore, even SessionFactory.Close() and Dispose() do not close the connection.

Any pointers on how I can close this lingering connection?

Thanks,
Bert.


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.