Hi to all,
I have wrote a jsp-servlet program(using struts) which connects to DB2 via JDBC.
I am using Tomcat5.5.
JDBC driver as400thinjdbc.j ar .
DB connection paramaters are
<data-sources>
<data-source id="DB2" type="org.apach e.tomcat.dbcp.d bcp.BasicDataSo urce">
<set-property property="usern ame" value="XXXX"/>
<set-property property="maxAc tive" value="10"/>
<set-property property="passw ord" value="XXXX"/>
<set-property property="url" value="jdbc:as4 00://XX.XX.XX.XX/MYLIB"/>
<set-property property="defau ltAutoCommit" value="false"/>
<set-property property="maxWa it" value="5000"/>
<set-property property="drive rClassName" value="com.ibm. as400.access.AS 400JDBCDriver"/>
</data-source>
</data-sources>
The program is running fine and giving me all the expected values from DB2 BUT after 1hr or 2 or 3hrs of discontinuity from my web application,whe n I try to connect DB2 it takes 10-15 minutes.
Sometimes it gives "Connection time out error" stating in my log file.
I googled the internet but couldn't found any satisfied solution.
I changed my driver to jt400.jar but no luck.
Can you experts please point out the mistake I am doing.
Thanks in advance.
I have wrote a jsp-servlet program(using struts) which connects to DB2 via JDBC.
I am using Tomcat5.5.
JDBC driver as400thinjdbc.j ar .
DB connection paramaters are
<data-sources>
<data-source id="DB2" type="org.apach e.tomcat.dbcp.d bcp.BasicDataSo urce">
<set-property property="usern ame" value="XXXX"/>
<set-property property="maxAc tive" value="10"/>
<set-property property="passw ord" value="XXXX"/>
<set-property property="url" value="jdbc:as4 00://XX.XX.XX.XX/MYLIB"/>
<set-property property="defau ltAutoCommit" value="false"/>
<set-property property="maxWa it" value="5000"/>
<set-property property="drive rClassName" value="com.ibm. as400.access.AS 400JDBCDriver"/>
</data-source>
</data-sources>
The program is running fine and giving me all the expected values from DB2 BUT after 1hr or 2 or 3hrs of discontinuity from my web application,whe n I try to connect DB2 it takes 10-15 minutes.
Sometimes it gives "Connection time out error" stating in my log file.
I googled the internet but couldn't found any satisfied solution.
I changed my driver to jt400.jar but no luck.
Can you experts please point out the mistake I am doing.
Thanks in advance.
Comment