Hi all,

TL;DR version:

- Is there any way to configure an inactive timeout in OpenEJB DataSource
Resources?
- Does OpenEJB has any retry mechanism in case a connection is closed by the
driver?

I need help figuring out the cause of a problem.

I have an application that uses Tomcat6+OpenEJB3+MSSQLServer2008. The JDBC
driver I'm using is i-net Merlia 8.00.

One of my EJBs has a method for invoking a stored procedure from the DB. I'm
invoking that method from a JSP. This particular procedure takes 15min to
run.

After 10min I see a Connection.close in my driver and immediately another is
opened for the same query. After another 15min this 2nd connection finishes
and returns an Exception. The 15min are directly related to the time it
takes for the stored procedure to execute. If i make it run in 5min, that's
how long the 2nd connection stays opened. In the end I always get an
exception.

Several doubts here:

1) I believe the first connection is closed due to inactivity, merlia has a
default 10min timeout for inactivity in pool connections. If in fact this is
the case, how can I configure this in OpenEJB? openejb.xml? In a java class
I made for test purposes I can configure this as a PoolManager property (
http://www.inetsoftware.de/documentation/jdbc-driver/ms-sql/apispec/com/inet/pool/poolmanager.html#setInactiveTimeout(int)),
but in OpenEJB I don't see how...

2) When I invoke the stored procedure directly from a java class, without
going through the Tomcat/OpenEJB, the timeout still occurs, but there is no
retry. The retry seems to be a behavior associated to OpenEJB configuration.
Is it right to assume that?

I have some logs and configuration that I can send, what would be useful?

Thanks a lot in advance!

João Baltazar

Reply via email to