Probably waited too long for a connection. What does your pool
configuration look like? Look in META-INF/context.xml or, I suppose, in
conf/server.xml for <Resource> elements.
<Resource name="jdbc/mysitedb" auth="Container"
type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="user" password="xxx"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/mysitedb"/>
This is my configuration in context.xml Chris.
I had a bug in my code and I was not closing connection, I fixed it
and now this is working fine.
an architectural comment: it's probably not a great idea to
obtain a database connection directly from your Servlet. Doing so
likely ties your business logic directly to both the servlet API *and*
the JDBC API.
If you want to switch to some other data source (e.g. a
non-JDBC-supported data source like MongoDB, Cassandra, etc.), then
you have to re-write your whole app. If you want to support Websocket,
then you have to completely re-write your webapp. If you want to
create an Android or Swing-based version, you have to completely
re-write your app. See the pattern here?
I know existing design is somewhat a kind of limitation,but again at
this point ,its just to hard to implement this change.
Let me think over this.It will take sometime.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org