ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baldur Norddahl <bbn-iba...@inaphone.com>
Subject ibatis2 postgresql / orion trouble
Date Wed, 22 Dec 2004 15:50:42 GMT
Hi,

We are using iBatis together with Orion and Postgresql. With iBatis 1 
our code works perfectly. But we are having some trouble with ibatis 2 :-(

The first I think got fixed in 2.0.8, but I would like to add that not 
commit'ing after queries is a bad idea at least when using postgresql. 
It makes triggers and user defined functions useless. Postgresql does 
not have stored procedures, but instead have user defined functions that 
you run like "select * from your_func(parm1,parm2) where x=foo" etc. If 
said function modifies anything, you get into trouble.

With that fixed, our main problem is now that ibatis 2 leaves all our 
connections in state "idle in transaction". This is bad for several 
reasons, and if the purpose is to speed up startTransaction it is 
useless on postgresql since "begin" is a zero time operation. It also 
causes our application to fail for some reason I don't entirely 
understand. But after some time the application hangs, and we get lots 
of these messages from Orion:

DriverManagerConnectionPoolConnection not closed, check your code!

I have checked, and re-checked, that there are nowhere that we do a 
startTransaction without doing an endTransaction in the finally block.

I could fix these problems by porting the applications back to ibatis 1, 
but obviously I would rather stay with ibatis 2. But I am running out of 
ideas of what to do about it :-(.

Thanks,

Baldur

Mime
View raw message