Skip to Content
0
Former Member
Jun 02, 2008 at 05:51 PM

Right way to configure Tomcat JDBC resource for MaxDB

174 Views

Hi,

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

MAXUSERTASKS=150
SESSION_TIMEOUT=60

i do this configuration on tomcat:

<Resource name="jdbc/myApp"
                auth="Container"
                type="javax.sql.DataSource"
                username="DBUSER"
                password="secret"
                driverClassName="com.sap.dbtech.jdbc.DriverSapDB"
                url="jdbc:sapdb://dbserver/DBNAME"
                maxActive="150"
                maxIdle="75"
                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.

Clóvis