Hy,
I have one webapp in Tomcat 6.0.18 with this context:
Context path=/myApp docBase=myApp debug=100 reloadable=true
Resource name=jdbc/myApp auth=Container
type=javax.sql.DataSource
maxActive=8 maxIdle=5 maxWait=300
username=myApp password=passwd
Edoardo Panfili wrote:
Hy,
I have one webapp in Tomcat 6.0.18 with this context:
Context path=/myApp docBase=myApp debug=100 reloadable=true
Resource name=jdbc/myApp auth=Container
type=javax.sql.DataSource
maxActive=8 maxIdle=5 maxWait=300
username=myApp
Mark Thomas ha scritto:
Edoardo Panfili wrote:
Hy,
I have one webapp in Tomcat 6.0.18 with this context:
Context path=/myApp docBase=myApp debug=100 reloadable=true
Resource name=jdbc/myApp auth=Container
type=javax.sql.DataSource
maxActive=8 maxIdle=5 maxWait=300
Edoardo Panfili wrote:
Mark Thomas ha scritto:
Edoardo Panfili wrote:
Hy,
I have one webapp in Tomcat 6.0.18 with this context:
Context path=/myApp docBase=myApp debug=100 reloadable=true
Resource name=jdbc/myApp auth=Container
type=javax.sql.DataSource
maxActive=8
Edoardo Panfili ha scritto:
Mark Thomas ha scritto:
Edoardo Panfili wrote:
Hy,
I have one webapp in Tomcat 6.0.18 with this context:
Context path=/myApp docBase=myApp debug=100 reloadable=true
Resource name=jdbc/myApp auth=Container
type=javax.sql.DataSource
maxActive=8
than intended recipient. Sender does
not necessarily endorse content contained within this transmission.
Date: Sun, 22 Feb 2009 11:25:42 +0100
From: edoa...@aspix.it
To: users@tomcat.apache.org
Subject: How to close open connections after application stop?
Hy,
I have one webapp
Martin Gainty ha scritto:
javax.sql.DataSource
dataSource ;
java.sql.Connection connection;
java.sql.Statement statement;
java.sqlResultset resultSet;
code..
try{
connection = dataSource.getConnection();
statement = connection.prepareStatement(SELECT FU FROM BAR);
Edoardo wrote
I have
resultset.close();
statement.close();
connection.close();
in my code.
and
connection = dataSource.getConnection();
seems very close to my
ambiente = (Context) new InitialContext().lookup(java:comp/env);
pool = (DataSource) ambiente.lookup(jdbc/myApp);
Alan Chaney ha scritto:
Edoardo wrote
I have
resultset.close();
statement.close();
connection.close();
in my code.
and
connection = dataSource.getConnection();
seems very close to my
ambiente = (Context) new InitialContext().lookup(java:comp/env);
pool = (DataSource)
Alan Chaney ha scritto:
I don't think so. Let me recap your problem:
When you undeploy an application from tomcat (using the DBCP pooling
mechanism) you can't make STRUCTURAL changes to the database because it
complains that connections are still in use.
This is exactly what one would
Edoardo Panfili wrote:
Using this code in destroy() method of a servlet marked as
load-on-startup1/load-on-startup
Yep - that is the sort of code you'd need. Using a context listener
would be a better solution as Tomcat is free to call destroy() on your
Servlet whenever it likes.
Mark
Mark Thomas ha scritto:
Edoardo Panfili wrote:
Using this code in destroy() method of a servlet marked as
load-on-startup1/load-on-startup
Yep - that is the sort of code you'd need. Using a context listener
would be a better solution as Tomcat is free to call destroy() on your
Servlet
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Martin,
On 2/22/2009 10:26 AM, Martin Gainty wrote:
catch (SQLException sqlEx)
{
try
{
resultset.close();
statement.close();
connection.close();
}
It's kind of silly to call close() on all these
13 matches
Mail list logo