We experienced a similar problem (transaction, lots of queries) which was down 
to using iBATIS statement caching.  We were able to work around it by switching 
off statement caching in iBATIS, and applying it directly to the Oracle 
connection (though we needed to write our own iBATIS datasource for this to be 
possible).
 
So, in our sqlMapConfig:
 
<sqlMapConfig>
   <settings statementCachingEnabled="false" ... />
 
and in our data source:
 
OracleConnection oconn = ...;
oconn.setImplicitCachingEnabled(true);
oconn.setStatementCacheSize(STATEMENT_CACHE_SIZE);
 
For the sake of completeness, we then hit a known Oracle bug (4965296).  
However the bug only impacts Oracle 10g, and only proxy connections - so 
chances are, it does not apply in your case.  To work around that problem we 
had to 'toggle' the state of the statement caching:
 
OracleConnection oconn = ...;
oconn.setImplicitCachingEnabled(false);
oconn.setImplicitCachingEnabled(true);
oconn.setStatementCacheSize(STATEMENT_CACHE_SIZE);
 
I hope that proves to be of some use to you.
 
 
Alistair.

________________________________

From: Daniel Sánchez Gómez [mailto:dsanc...@satec.es] 
Sent: 25 March 2009 12:55
To: user-java@ibatis.apache.org
Subject: 



Hi,

I have a problem with open cursors using Ibatis  in an Oracle data base.

When I open a transaction with a lot of querys and before the transaction ends, 
an exception appears: "Too many cursors are open".

What can I do to resolve this problem? Is there any instruction to close 
cursors without ending transaction? We can't increase the number of cursors in 
the database.

Thanks!



Please help Logica to respect the environment by not printing this email  /  
Merci d'aider Logica à préserver l'environnement en évitant d'imprimer ce mail 
/  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei 
die Umwelt zu schuetzen  /  Por favor ajude a Logica a respeitar o ambiente não 
imprimindo este correio electrónico.



This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

  • [no subject] Daniel Sánchez Gómez
    • Re: Nicholoz Koka Kiknadze
    • RE: Young, Alistair

Reply via email to