Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-10 Thread Filip Hanik - Dev Lists
On 3/3/2012 10:50 AM, Brooke Hedrick wrote: On Mar 3, 2012 11:48 AM, Brooke Hedrickbrooke.t.hedr...@gmail.com wrote: On Mar 3, 2012 11:35 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Brooke Hedrick [mailto:brooke.t.hedr...@gmail.com] Subject: Re: [Tomcat JDBC Pool] Close

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-06 Thread Chema
There's nothing like chasing your tail for a few days on a mailing list. - -chris ok, ok ...it was my fault ... sorry :-/ Regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail:

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brooke, On 3/4/12 10:29 AM, Brooke Hedrick wrote: There are cases where either or both get restarted, but the issue is only when the @otherdb is restarted and not the primary. So, you have a setup like this: DBCP --- jdbc --- Primary --- Oracle

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brooke, On 3/4/12 4:57 PM, Brooke Hedrick wrote: Everyone - the feedback is great, but it still is just working around the elimination of a jmx call, if that is the case. Why is the jmc close() method being eliminated? Maybe I missed

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-05 Thread Michael
Pid schrieb: On 03/03/2012 12:33, Michael wrote: Hi folks, I've been examining the JMX operations of the new pool and did not find a crucial one. Sometimes our Oracle database has to be restarted, the pool still keeps the pooled connections. The webapp requests a connection, receives a pooled

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-05 Thread Chema
Do you have testOnBorrow=true and a validationQuery=SELECT 1 FROM DUAL configured? This should suffice to ensure each connection is valid before use. Pid, works like a charms. Thanks very much. From Tomcat doc for testOnBorrow setting: The indication of whether objects will be

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-05 Thread Michael
Chema schrieb: Do you have testOnBorrow=true and a validationQuery=SELECT 1 FROM DUAL configured? This should suffice to ensure each connection is valid before use. Pid, works like a charms. Thanks very much. From Tomcat doc for testOnBorrow setting: The indication of whether objects

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-05 Thread Chema
2012/3/5 Michael sg...@gmx.net: Chema schrieb: Do you have testOnBorrow=true and a validationQuery=SELECT 1 FROM DUAL configured? This should suffice to ensure each connection is valid before use. Pid, works like a charms. Thanks very much. It executes the validation query and

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-05 Thread Michael
Chema schrieb: 2012/3/5 Michael sg...@gmx.net: Chema schrieb: Do you have testOnBorrow=true and a validationQuery=SELECT 1 FROM DUAL configured? This should suffice to ensure each connection is valid before use. Pid, works like a charms. Thanks very much. It executes the validation

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-05 Thread Chema
No if the connection has been reset by the instance. The query will result in a SQLException. You have to close the connection and open a new one. The query works on an open connection only. That's the point. See the second paragraph of this [1]. But the problem was when you restart the

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chema, On 3/5/12 4:06 PM, Chema wrote: No if the connection has been reset by the instance. The query will result in a SQLException. You have to close the connection and open a new one. The query works on an open connection only. That's the

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-05 Thread Pid
On 05/03/2012 22:12, Christopher Schultz wrote: Chema, On 3/5/12 4:06 PM, Chema wrote: No if the connection has been reset by the instance. The query will result in a SQLException. You have to close the connection and open a new one. The query works on an open connection only. That's the

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pid, On 3/5/12 5:55 PM, Pid wrote: On 05/03/2012 22:12, Christopher Schultz wrote: Chema, On 3/5/12 4:06 PM, Chema wrote: No if the connection has been reset by the instance. The query will result in a SQLException. You have to close the

RE: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-04 Thread Felix Schumacher
] Subject: Re: [Tomcat JDBC Pool] Close pooled connections via JMX Do you have testOnBorrow=true and a validationQuery=SELECT 1 FROM DUAL configured? This should suffice to ensure each connection is valid before use. That approach doesn't work when the application uses

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-04 Thread Chema
That approach doesn't work when the application uses symlinks to get to data on other Oracle servers. Right. With dblinks, it's the RDBMS who opens/closes a session against the remote server, via dblinks I guess that when you say our Oracle database has to be restarted, you *only* restart

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-04 Thread Brooke Hedrick
On Mar 4, 2012 5:13 AM, Chema demablo...@gmail.com wrote: That approach doesn't work when the application uses symlinks to get to data on other Oracle servers. Right. With dblinks, it's the RDBMS who opens/closes a session against the remote server, via dblinks I guess that when you

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-04 Thread Chema
We use Spring w/ Hibernate as I recall.  Yes, we have talked about that - a ping query.  What we don't like about that is now we have a tc ping and app ping.  We have also discussed just changing the tc borrow/ping to do the dual@remotedb query as this would test both primary and remote.  We

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-04 Thread Michael
Pid schrieb: On 03/03/2012 12:33, Michael wrote: Hi folks, I've been examining the JMX operations of the new pool and did not find a crucial one. Sometimes our Oracle database has to be restarted, the pool still keeps the pooled connections. The webapp requests a connection, receives a pooled

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-04 Thread Brooke Hedrick
On Mar 4, 2012, at 1:35 PM, Chema demablo...@gmail.com wrote: We use Spring w/ Hibernate as I recall. Yes, we have talked about that - a ping query. What we don't like about that is now we have a tc ping and app ping. We have also discussed just changing the tc borrow/ping to do the

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-04 Thread Bob Hall
From: Brooke Hedrick brooke.t.hedr...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Sunday, March 4, 2012 12:21 PM On Mar 4, 2012, at 1:35 PM, Chema demablo...@gmail.com wrote:   We use Spring w/ Hibernate as I recall.  Yes, we have talked

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-04 Thread Brooke Hedrick
On Mar 4, 2012 2:50 PM, Bob Hall rfha...@yahoo.com wrote: From: Brooke Hedrick brooke.t.hedr...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Sunday, March 4, 2012 12:21 PM On Mar 4, 2012, at 1:35 PM, Chema demablo...@gmail.com wrote:

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-04 Thread Bob Hall
From:Brooke Hedrick brooke.t.hedr...@gmail.com Sent: Sunday, March 4, 2012 1:57 PM Have you tried defining views in the primary database based on the @otherdb queries? Bob, How will that help with the borrow query and not wanting to run extra queries to the remote db when not

[Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-03 Thread Michael
Hi folks, I've been examining the JMX operations of the new pool and did not find a crucial one. Sometimes our Oracle database has to be restarted, the pool still keeps the pooled connections. The webapp requests a connection, receives a pooled one and boom = ORA-... Connection closed.

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-03 Thread Pid
On 03/03/2012 12:33, Michael wrote: Hi folks, I've been examining the JMX operations of the new pool and did not find a crucial one. Sometimes our Oracle database has to be restarted, the pool still keeps the pooled connections. The webapp requests a connection, receives a pooled one and

Re: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-03 Thread Brooke Hedrick
On Mar 3, 2012 7:17 AM, Pid p...@pidster.com wrote: On 03/03/2012 12:33, Michael wrote: Hi folks, I've been examining the JMX operations of the new pool and did not find a crucial one. Sometimes our Oracle database has to be restarted, the pool still keeps the pooled connections.

RE: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-03 Thread Caldarale, Charles R
From: Brooke Hedrick [mailto:brooke.t.hedr...@gmail.com] Subject: Re: [Tomcat JDBC Pool] Close pooled connections via JMX Do you have testOnBorrow=true and a validationQuery=SELECT 1 FROM DUAL configured? This should suffice to ensure each connection is valid before use

RE: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-03 Thread Brooke Hedrick
On Mar 3, 2012 11:35 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Brooke Hedrick [mailto:brooke.t.hedr...@gmail.com] Subject: Re: [Tomcat JDBC Pool] Close pooled connections via JMX Do you have testOnBorrow=true and a validationQuery=SELECT 1 FROM DUAL configured

RE: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-03 Thread Brooke Hedrick
On Mar 3, 2012 11:48 AM, Brooke Hedrick brooke.t.hedr...@gmail.com wrote: On Mar 3, 2012 11:35 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Brooke Hedrick [mailto:brooke.t.hedr...@gmail.com] Subject: Re: [Tomcat JDBC Pool] Close pooled connections via JMX Do

RE: [Tomcat JDBC Pool] Close pooled connections via JMX

2012-03-03 Thread Caldarale, Charles R
From: Brooke Hedrick [mailto:brooke.t.hedr...@gmail.com] Subject: RE: [Tomcat JDBC Pool] Close pooled connections via JMX You will see things like: select * emp@otherdb. Where @otherdb is typically an entry that you would find in a tnsnames.ora. I left out the FROM between the * and emp