RE: Tomcat reconnect to database server?

2004-01-08 Thread Derek Mahar
Actually, I am correct that the Microsoft SQL Server JDBC driver does not support a 
validationQuery option.  However, I agree that I was incorrect in assuming that the 
resource parameters configured the JDBC driver, rather than the connection pool (and 
the JDBC driver indirectly).  I'm glad that you corrected my mistake.

Fortunately, one thing that I've learned from using mailing lists is that there's no 
better way to get someone to give you the right answer than to suggest the wrong one!

Derek

-Original Message-
From: Altankov Peter [mailto:[EMAIL PROTECTED] 
Sent: January 8, 2004 7:24 AM
To: Derek Mahar
Subject: RE: Tomcat reconnect to database server?


I think u r just wrong. We are not talking bout the JDBC driver itself but for the 
apache DBCP and POOL implementations. And THAT dbpool package supports the option of 
validation query

 -Original Message-
 From: Derek Mahar [mailto:[EMAIL PROTECTED]
 Sent: 07  2004 . 20:41
 To: Altankov Peter
 Subject: RE: Tomcat reconnect to database server?
 
 
 Thanks for the suggestion.  After reading the MS SQL Server
 JDBC driver documentation, however, it appears that the 
 driver does not support the validationQuery option. :-(
 
 Derek
 
 -Original Message-
 From: Altankov Peter [mailto:[EMAIL PROTECTED]
 Sent: January 7, 2004 11:38 AM
 To: Tomcat Users List
 Subject: RE: Tomcat reconnect to database server?
 
 
 The DBCP pool that you lookup from JNDI is already such a
 connection manager. Just try adding the validation query that 
 Arthur suggested. Im not sure for MSSQL but I use this for Oracle:
   parameter
  namevalidationQuery/name
  valueSELECT 1 FROM dual/value
   /parameter
 
 This goes underResourceParams name=jdbc/your_resource
 
 BR
  -Original Message-
  From: Derek Mahar [mailto:[EMAIL PROTECTED]
  Sent: 07  2004 . 18:21
  To: Tomcat Users List
  Subject: RE: Tomcat reconnect to database server?
  
  
  Thanks for your reply.  Unfortunately, the Microsoft SQL
 Server JDBC
  driver does not support an autoreconnect option.
  Do I need a separate connection pool manager?  The MS SQL
  Server JDBC driver documentation suggests that I might need 
  such a manager since the driver does not itself manage the 
  connection pool.
  
  Derek
  
  -Original Message-
  From: Philipp Taprogge [mailto:[EMAIL PROTECTED]
  Sent: January 7, 2004 9:47 AM
  To: Tomcat Users List
  Subject: Re: Tomcat reconnect to database server?
  
  
  Hi!
  
  I don't know MSSQL in particular, but in princible it should be as
  simple as adding ?autoreconnect=true to the driver URL.
  
  Phil
  
  Derek Mahar wrote:
   How can I configure Tomcat 5.0.16 to reconnect to a Microsot SQL 
   Server after a server restart?  I have configured Tomcat to
  use JNDI
   datasources (through Resource and ResourceParam
 elements within
   GlobalNamingResources).  I presume that at startup,
  Tomcat connects
   to the server and creates a pool of connections for later use.
   However, when we restart our server, Tomcat loses its 
 connection(s)
   and does not re-establish these connections.
  
  --
  And on the seventh day, He exited from append mode.
  (Book of create(2), line 255)
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat reconnect to database server?

2004-01-07 Thread Philipp Taprogge
Hi!

I don't know MSSQL in particular, but in princible it should be as 
simple as adding ?autoreconnect=true to the driver URL.

	Phil

Derek Mahar wrote:
How can I configure Tomcat 5.0.16 to reconnect to a Microsot SQL Server
after a server restart?  I have configured Tomcat to use JNDI
datasources (through Resource and ResourceParam elements within
GlobalNamingResources).  I presume that at startup, Tomcat connects to
the server and creates a pool of connections for later use.  However,
when we restart our server, Tomcat loses its connection(s) and does not
re-establish these connections.
--
And on the seventh day, He exited from append mode.
(Book of create(2), line 255)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tomcat reconnect to database server?

2004-01-07 Thread D'Alessandro, Arthur
You may also want to put in a validation query, it adds overhead, but it
forces a reconnection.. I had a similar problem with postgres where the
pooled connections didn't know they were no longer properly connected.
By adding the validation query, it forces the manager to verify
connection before handing the connection down to the requesting code. 


-Art 

-Original Message-
From: Philipp Taprogge [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 07, 2004 9:47 AM
To: Tomcat Users List
Subject: Re: Tomcat reconnect to database server?

Hi!

I don't know MSSQL in particular, but in princible it should be as
simple as adding ?autoreconnect=true to the driver URL.

Phil

Derek Mahar wrote:
 How can I configure Tomcat 5.0.16 to reconnect to a Microsot SQL 
 Server after a server restart?  I have configured Tomcat to use JNDI 
 datasources (through Resource and ResourceParam elements within 
 GlobalNamingResources).  I presume that at startup, Tomcat connects 
 to the server and creates a pool of connections for later use.  
 However, when we restart our server, Tomcat loses its connection(s) 
 and does not re-establish these connections.

--
And on the seventh day, He exited from append mode.
(Book of create(2), line 255)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat reconnect to database server?

2004-01-07 Thread Derek Mahar
Thanks for your reply.  Unfortunately, the Microsoft SQL Server JDBC
driver does not support an autoreconnect option.  Do I need a separate
connection pool manager?  The MS SQL Server JDBC driver documentation
suggests that I might need such a manager since the driver does not
itself manage the connection pool.

Derek

-Original Message-
From: Philipp Taprogge [mailto:[EMAIL PROTECTED] 
Sent: January 7, 2004 9:47 AM
To: Tomcat Users List
Subject: Re: Tomcat reconnect to database server?


Hi!

I don't know MSSQL in particular, but in princible it should be as 
simple as adding ?autoreconnect=true to the driver URL.

Phil

Derek Mahar wrote:
 How can I configure Tomcat 5.0.16 to reconnect to a Microsot SQL 
 Server after a server restart?  I have configured Tomcat to use JNDI 
 datasources (through Resource and ResourceParam elements within 
 GlobalNamingResources).  I presume that at startup, Tomcat connects 
 to the server and creates a pool of connections for later use.  
 However, when we restart our server, Tomcat loses its connection(s) 
 and does not re-establish these connections.

-- 
And on the seventh day, He exited from append mode.
(Book of create(2), line 255)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat reconnect to database server?

2004-01-07 Thread Derek Mahar
Where do I specify the validation query?  Is there a way to configure
the default connection pool manager?

Derek

-Original Message-
From: D'Alessandro, Arthur [mailto:[EMAIL PROTECTED] 
Sent: January 7, 2004 9:48 AM
To: Tomcat Users List
Subject: RE: Tomcat reconnect to database server?


You may also want to put in a validation query, it adds overhead, but it
forces a reconnection.. I had a similar problem with postgres where the
pooled connections didn't know they were no longer properly connected.
By adding the validation query, it forces the manager to verify
connection before handing the connection down to the requesting code. 


-Art 

-Original Message-
From: Philipp Taprogge [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 07, 2004 9:47 AM
To: Tomcat Users List
Subject: Re: Tomcat reconnect to database server?

Hi!

I don't know MSSQL in particular, but in princible it should be as
simple as adding ?autoreconnect=true to the driver URL.

Phil

Derek Mahar wrote:
 How can I configure Tomcat 5.0.16 to reconnect to a Microsot SQL
 Server after a server restart?  I have configured Tomcat to use JNDI 
 datasources (through Resource and ResourceParam elements within 
 GlobalNamingResources).  I presume that at startup, Tomcat connects 
 to the server and creates a pool of connections for later use.  
 However, when we restart our server, Tomcat loses its connection(s) 
 and does not re-establish these connections.

--
And on the seventh day, He exited from append mode.
(Book of create(2), line 255)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat reconnect to database server?

2004-01-07 Thread Altankov Peter
The DBCP pool that you lookup from JNDI is already such a connection manager. Just try 
adding the validation query that Arthur suggested.
Im not sure for MSSQL but I use this for Oracle:
  parameter
 namevalidationQuery/name
 valueSELECT 1 FROM dual/value
  /parameter

This goes underResourceParams name=jdbc/your_resource

BR
 -Original Message-
 From: Derek Mahar [mailto:[EMAIL PROTECTED] 
 Sent: 07  2004 . 18:21
 To: Tomcat Users List
 Subject: RE: Tomcat reconnect to database server?
 
 
 Thanks for your reply.  Unfortunately, the Microsoft SQL 
 Server JDBC driver does not support an autoreconnect option.  
 Do I need a separate connection pool manager?  The MS SQL 
 Server JDBC driver documentation suggests that I might need 
 such a manager since the driver does not itself manage the 
 connection pool.
 
 Derek
 
 -Original Message-
 From: Philipp Taprogge [mailto:[EMAIL PROTECTED] 
 Sent: January 7, 2004 9:47 AM
 To: Tomcat Users List
 Subject: Re: Tomcat reconnect to database server?
 
 
 Hi!
 
 I don't know MSSQL in particular, but in princible it should be as 
 simple as adding ?autoreconnect=true to the driver URL.
 
   Phil
 
 Derek Mahar wrote:
  How can I configure Tomcat 5.0.16 to reconnect to a Microsot SQL
  Server after a server restart?  I have configured Tomcat to 
 use JNDI 
  datasources (through Resource and ResourceParam elements within 
  GlobalNamingResources).  I presume that at startup, 
 Tomcat connects 
  to the server and creates a pool of connections for later use.  
  However, when we restart our server, Tomcat loses its connection(s) 
  and does not re-establish these connections.
 
 -- 
 And on the seventh day, He exited from append mode.
 (Book of create(2), line 255)
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat reconnect to database server?

2004-01-07 Thread Steve Nelson

Does this force it to reconnect in the case of an error? I know the
documentation lists adding
?autoreconnect=true 
to the connection string to cause this to happen. Course I have only seen
this with MySQL Databases.

-Steve
P.S. has anyone gotten the MySQL driver failover to work?


-Original Message-
From: Altankov Peter [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 07, 2004 10:38 AM
To: Tomcat Users List
Subject: RE: Tomcat reconnect to database server?


The DBCP pool that you lookup from JNDI is already such a connection
manager. Just try adding the validation query that Arthur suggested.
Im not sure for MSSQL but I use this for Oracle:
  parameter
 namevalidationQuery/name
 valueSELECT 1 FROM dual/value
  /parameter

This goes underResourceParams name=jdbc/your_resource

BR
 -Original Message-
 From: Derek Mahar [mailto:[EMAIL PROTECTED] 
 Sent: 07  2004 . 18:21
 To: Tomcat Users List
 Subject: RE: Tomcat reconnect to database server?
 
 
 Thanks for your reply.  Unfortunately, the Microsoft SQL 
 Server JDBC driver does not support an autoreconnect option.  
 Do I need a separate connection pool manager?  The MS SQL 
 Server JDBC driver documentation suggests that I might need 
 such a manager since the driver does not itself manage the 
 connection pool.
 
 Derek
 
 -Original Message-
 From: Philipp Taprogge [mailto:[EMAIL PROTECTED] 
 Sent: January 7, 2004 9:47 AM
 To: Tomcat Users List
 Subject: Re: Tomcat reconnect to database server?
 
 
 Hi!
 
 I don't know MSSQL in particular, but in princible it should be as 
 simple as adding ?autoreconnect=true to the driver URL.
 
   Phil
 
 Derek Mahar wrote:
  How can I configure Tomcat 5.0.16 to reconnect to a Microsot SQL
  Server after a server restart?  I have configured Tomcat to 
 use JNDI 
  datasources (through Resource and ResourceParam elements within 
  GlobalNamingResources).  I presume that at startup, 
 Tomcat connects 
  to the server and creates a pool of connections for later use.  
  However, when we restart our server, Tomcat loses its connection(s) 
  and does not re-establish these connections.
 
 -- 
 And on the seventh day, He exited from append mode.
 (Book of create(2), line 255)
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]