You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Newgro <pe...@gmx.ch> on 2008/09/05 12:24:58 UTC

Unit Tests hangs on getting connection

Hi *,

I have the following scenario. I'm testing my beans within eclipse. I use
openejb-core-3. MSSql Server 2000. Beans are EJB3. Everything works fine in
production so long.

Because we access a legacy system (db) and our additional tables - i use 2
datasources.

If i have a Unittest runing by usage of one datasource - everything is ok.
But if both are included the test hangs while getting a connection. I
couln't trace it exactly because the dbcp sources are not in repository. Is
this known behavior? Maybe this is related to this 
http://www.nabble.com/DataSource-configuration-for-production-td17695975.html
nabble-entry 

If it's related, when will 3.0.1 release be on air?

Thanks 4 your help
Per
-- 
View this message in context: http://www.nabble.com/Unit-Tests-hangs-on-getting-connection-tp19328527p19328527.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Unit Tests hangs on getting connection

Posted by David Blevins <da...@visi.com>.
On Sep 5, 2008, at 7:47 AM, Newgro wrote:

>
> Hi again,
>
> i solved it myself. I created multiple tables on @BeforeClass. But i  
> didn't
> closed the connection after
> table create statement was executed. It seems that i've got 10 pooled
> connections and then the manager was waiting for next free connection.
>
> I now close the connection after every create table and it works now.
>
> Sorry for annoying the list :-)

No worries.  It might help some future archive searcher.

-David


Re: Unit Tests hangs on getting connection

Posted by Newgro <pe...@gmx.ch>.
Hi again,

i solved it myself. I created multiple tables on @BeforeClass. But i didn't
closed the connection after
table create statement was executed. It seems that i've got 10 pooled
connections and then the manager was waiting for next free connection.

I now close the connection after every create table and it works now.

Sorry for annoying the list :-)
Cheers
Per
-- 
View this message in context: http://www.nabble.com/Unit-Tests-hangs-on-getting-connection-tp19328527p19332863.html
Sent from the OpenEJB User mailing list archive at Nabble.com.