Skip to Content
author's profile photo Former Member
Former Member

Right way to configure Tomcat JDBC resource for MaxDB


i need to configure one tomcat server with a pool of connections for a MaxDB instance with follow database parameters:


i do this configuration on tomcat:

<Resource name="jdbc/myApp"
                validationQuery="SELECT NOW() FROM DBA.DUAL"/>

is this the right way? there is a way to check if the pool is working at database side? at java side i checked that the javax.sql.DataSource.loginTimeout is Unavailable, then what is the better way to avoid errors like:

2008-06-02 13:54:36  2165 WNG 11824 COMMUNIC Releasing  T187 command timeout

i think that this problem occurs because the SESSION_TIMEOUT is 60, and the loginTimeout is Unavailable at javax.sql.DataSource then the DBCP of tomcat dont know when need to revalidate the session.

thanks for any help.


Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Best Answer
    Posted on Jun 02, 2008 at 08:02 PM

    Hi Clovis,

    afaik the javax.sql.DataSource.loginTimeout is not about a idle session timeout at the dbserver side, but about how long a login procedure is allowed to take (at least that's what the docs say ... []

    What you're facing are session timeouts that occur due to long inactive sessions on the database.

    Check the documentation on [Timeout|].

    Perhabs it's enought just to increase the default timeout for the user you connect with.

    If this does not help you may check if you can provide connection properties for the jdbc connection and set an appropriate timeout there.

    KR Lars

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Lars Breddemann

      hi Lars,

      what i'm trying to solve is the problem explained at , dont using pool of connections works right for me, but when have many parallel requests, the JDBC driver locks the DriverSapDB object, and freeze the system, then because of that problem i now must create a pool of connections, and i wish to avoid session timeout, another thing about this blocked behavior is that only occurs in a Multi-Core CPU, having that running in a Single-Core the BLOCKED problem dont occurs.