java - Tomcat 7 Connection Pool Issue -


i seem have stumbled across weird behavior tomcat 7 , connection pooling...

in app, have following 3 data sources - connecting same database, different services ( , same across 3)

jdbc:sybase:tds:<db_ip_address>:<db_port>/service1 jdbc:sybase:tds:<db_ip_address>:<db_port>/service2 jdbc:sybase:tds:<db_ip_address>:<db_port>/service3 

in context.xml, have 3 data sources listed separate resource usual, neccessary options set, including

<resource     name="jdbc/dbdatasource1"     type="javax.sql.datasource"     driverclassname="com.sybase.jdbc3.jdbc.sybdriver"     factory="org.apache.tomcat.jdbc.pool.datasourcefactory"     maxactive="20"     initialsize="1"     minidle="5"     maxidle="10"  <resource     name="jdbc/dbdatasource2"     <!-- rest same above -->  <resource     name="jdbc/dbdatasource3"     <!-- rest same above --> 

what have noticed is, because 3 data sources connect same database, tomcat seems creating , using 1 connection pool , sharing between 3. can seen @ startup, if change initialsize 10, first 2 data sources created no problem - on 3rd, exception saying

java.sql.sqlexception: jz00l: login failed.  examine sqlwarnings chained exception reason(s). 

am missing obvious here on how set connection pool? have looked @ tomcat documentation , stuff related global connection pools, can gather seems related sharing connections between multiple apps?

any appreciated!

indeed seems many idle connection. try increase idle connection properties or check whether closing opened connection. please refer this link


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -