tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "albert quinn" <>
Subject [Tomcat 5.5.17] Strange Problem With Batabase Connection Pool
Date Thu, 29 Nov 2007 19:44:15 GMT
  Hi all ! :

  I'm facing a very strange problem. I'm developing a web service with :

    - Apache Axis 2 RC 1.3 running on Tomcat 5.5.17, running on
Windows XP Professional
    - Java JDK 1.5

  I've set up a database connection pool in Tomcat. My Web Service
gets a connection from the pool, sends a query to the Database and
returns some information.

  When I call the Web Service for the first time, it works nice.

  If I call it again, it works nice.

  If I wait a few minutes (10 minutes or 20 minutes) and call it
again, it works nice.

  If I wait about an hour and call it again, the Web Service call
never returns. I've seen the Tomcat logs but no errors are reported.
So, I've been searching about that problem in Google and Tomcat's
mailing lists but I haven't found any useful information about the
strange problem.

  So, I've been debugging the Web Service code :

1 - Context ctxt = new InitialContext();
2 - DataSource ds = (DataSource) ctxt.lookup(java:comp/env/jdbc/database);
3 - Connection con = ds.getConnection();
4 - ....	

  The lines 1 and 2 are executed, but the 4th line is never reached.
Any idea of what could be happening here or how could I do to discover
what's happening? does it seems to be a bug on my code or a setup

  Thanks in advance for any kind of help with this annoying error.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message