ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oscar Picasso <oscgoo...@yahoo.com>
Subject RE: Ibatis and Junit tests
Date Fri, 02 Sep 2005 13:31:56 GMT
Thank you for your suggestion. 

I tried it but I get the same problem while trying to drop the db after the end
transaction in tearDown().

By the way, I don't understand how it could work. My understanding is that a
connection can be reused for several transactions.

What do I miss?

--- Jim Shea <jshea@traq.com> wrote:

> I always do a startTransaction() in setUp() and an endTransaction() in
> tearDown(). That way I don't leak connections.
> 
> Jim
> 
> -----Original Message-----
> From: Oscar Picasso [mailto:oscgoogle@yahoo.com] 
> Sent: Thursday, September 01, 2005 7:51 AM
> To: user-java@ibatis.apache.org
> Subject: Ibatis and Junit tests
> 
> 
> Hi,
> 
> I am testing an Ibatis application with Junit. 
> 
> I want to start each individual test method with a new database, so the
> Junit
> setup() method executes a script to create a new database and its schema
> and the Junit tearDown() method executes a shell script that drops the
> database.
> 
> The Ibatis application use a DaoManager.
> 
> The problem is that when tearDown() is executed there are still open
> connections so the shell script cannot drop the database. 
> 
> How can I close the connections opened by the framework?
> 
> Thanks 
> 
> Oscar
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Mime
View raw message