RE: tomcat conn pooling question

2002-08-28 Thread Craig R. McClanahan



On Wed, 28 Aug 2002, Paul Phillips wrote:

> Date: Wed, 28 Aug 2002 19:40:45 -0500
> From: Paul Phillips <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: RE: tomcat conn pooling question
>
> Hello -
>
> Earlier today, Craig wrote:
> >
> > In answer to Rick's original question, the standard connection pool
> > includes a "validationQuery" configuration property.  This is an SQL query
> > that the pool will execute before it hands you back a requested
> > connection (so it should be something that executes very quickly).  If the
> > connection was closed externally (your scenario), this query will fail and
> > the pool will throw that connection away and give you another one instead.
> >
>
> So, in a JNDI DataSource configuration, in the server.xml, I suppose that
> we would have something like:
>
>   
>  validationQuery
>  SQL_here
>   
>
> Am I correct in surmising that we would put an actual SQL query within the
>  tags?
>

Yes.

> Paul Phillips
>

Craig


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




RE: tomcat conn pooling question

2002-08-28 Thread Paul Phillips

Hello -

Earlier today, Craig wrote:
>
> In answer to Rick's original question, the standard connection pool
> includes a "validationQuery" configuration property.  This is an SQL query
> that the pool will execute before it hands you back a requested
> connection (so it should be something that executes very quickly).  If the
> connection was closed externally (your scenario), this query will fail and
> the pool will throw that connection away and give you another one instead.
>

So, in a JNDI DataSource configuration, in the server.xml, I suppose that 
we would have something like:

  
 validationQuery
 SQL_here


Am I correct in surmising that we would put an actual SQL query within the 
 tags?

Paul Phillips

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: tomcat conn pooling question

2002-08-28 Thread Andrew Conrad

That's going to make it more difficult to fix, since handling of blank
strings is not consistent.  For instance the password field should be
able to have a blank string.

- Andrew

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, August 28, 2002 2:14 PM
> To: Tomcat Users List
> Subject: RE: tomcat conn pooling question
> 
> 
> 
> 
> On Wed, 28 Aug 2002, Andrew Conrad wrote:
> 
> > Date: Wed, 28 Aug 2002 13:10:30 -0400
> > From: Andrew Conrad <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > Subject: RE: tomcat conn pooling question
> >
> > Thx.
> >
> > A validationQuery is not required by DBCP, but if you pass an empty 
> > string it throws an exception.
> >
> > Tomcat's admin app for JNDI DataSources creates a Validation Query 
> > with an empty string if no query is supplied, causing DBCP 
> to throw an 
> > exception when invoked.  In your opinion, is this a mistake by the 
> > Admin app for creating a empty string parameter, or a 
> mistake by DBCP 
> > in handling an empty string?
> >
> 
> IMHO that's an admin app bug.
> 
> > - Andrew
> 
> Craig
> 
> 
> >
> >
> > > -Original Message-
> > > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, August 28, 2002 12:48 PM
> > > To: Tomcat Users List
> > > Subject: RE: tomcat conn pooling question
> > >
> > >
> > >
> > >
> > > On Wed, 28 Aug 2002, Andrew Conrad wrote:
> > >
> > > > Date: Wed, 28 Aug 2002 12:34:03 -0400
> > > > From: Andrew Conrad <[EMAIL PROTECTED]>
> > > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > > > Subject: RE: tomcat conn pooling question
> > > >
> > > > Craig,
> > > >
> > > > I'm troubleshooting a ValidationQuery issue, and I can't
> > > seem to find
> > > > where this query executes.
> > > >
> > > > Does DBCP handle the ValidationQuery, or does Tomcat run the 
> > > > ValidationQuery when the first connection is requested?
> > > >
> > >
> > > It's inside commons-dbcp.  Tomcat doesn't "run" anything 
> -- it just 
> > > passes the configuration properties on to 
> BasicDataSourceFactory and 
> > > lets commons-dbcp do its thing.
> > >
> > > Craig
> > >
> > > >
> > > >
> > > > - Andrew
> > > >
> > > > > -Original Message-
> > > > > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Wednesday, August 28, 2002 12:25 PM
> > > > > To: Tomcat Users List
> > > > > Subject: RE: tomcat conn pooling question
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Wed, 28 Aug 2002, Turner, John wrote:
> > > > >
> > > > > > Date: Wed, 28 Aug 2002 09:51:29 -0400
> > > > > > From: "Turner, John" <[EMAIL PROTECTED]>
> > > > > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > > > > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > > > > > Subject: RE: tomcat conn pooling question
> > > > > >
> > > > > >
> > > > > > When you say "Tomcat's connection pooling" what do you mean 
> > > > > > exactly?
> > > > > >
> > > > > > As far as I know, there is no connection pooling 
> built-in to 
> > > > > > tomcat that actually works.
> > > > >
> > > > > It does (at least in 4.1) if you set it up correctly :-).
> > > The Tyrex
> > > > > stuff in 4.0 is problematic, which is one of the 
> reasons it got 
> > > > > abandoned in 4.1.
> > > > >
> > > > > >  The traffic I have seen on this list has people 
> rolling their 
> > > > > > own, using open source pooling solutions like 
> poolman or DBCP,
> > > > > or using the
> > > > > > pooling that comes from third-party driver vendors.  Which
> > > > > one are you
> > > > > > using?  That mi

RE: tomcat conn pooling question

2002-08-28 Thread Turner, John


Got it.  Thanks.

John


> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 28, 2002 2:35 PM
> To: Tomcat Users List
> Subject: RE: tomcat conn pooling question
> 
> 
> 
> 
> On Wed, 28 Aug 2002, Turner, John wrote:
> 
> > Date: Wed, 28 Aug 2002 14:17:49 -0400
> > From: "Turner, John" <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > Subject: RE: tomcat conn pooling question
> >
> >
> > How does the admin app know what query to generate?  The 
> query it generated
> > would have to have valid column names and table names.  I 
> guess it could
> > just create "select foo from bar", but that doesn't seem 
> any more helpful
> > than an empty string.
> 
> The admin app does *not* generate the query -- you have to 
> type in a query
> that makes sense for your application.
> 
> The bug referenced in this mail thread is that if you *don't* 
> specify a
> query, the admin app should not pass a zero-length string to the
> connection pool -- it should simply not initialize that property.
> 
> Craig
> 

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




RE: tomcat conn pooling question

2002-08-28 Thread Craig R. McClanahan



On Wed, 28 Aug 2002, Turner, John wrote:

> Date: Wed, 28 Aug 2002 14:17:49 -0400
> From: "Turner, John" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: tomcat conn pooling question
>
>
> How does the admin app know what query to generate?  The query it generated
> would have to have valid column names and table names.  I guess it could
> just create "select foo from bar", but that doesn't seem any more helpful
> than an empty string.

The admin app does *not* generate the query -- you have to type in a query
that makes sense for your application.

The bug referenced in this mail thread is that if you *don't* specify a
query, the admin app should not pass a zero-length string to the
connection pool -- it should simply not initialize that property.

Craig

>
> John Turner
>
> > -Original Message-
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 28, 2002 2:14 PM
> > To: Tomcat Users List
> > Subject: RE: tomcat conn pooling question
> >
> >
> >
> >
> > On Wed, 28 Aug 2002, Andrew Conrad wrote:
> >
> > > Date: Wed, 28 Aug 2002 13:10:30 -0400
> > > From: Andrew Conrad <[EMAIL PROTECTED]>
> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > > Subject: RE: tomcat conn pooling question
> > >
> > > Thx.
> > >
> > > A validationQuery is not required by DBCP, but if you pass an empty
> > > string it throws an exception.
> > >
> > > Tomcat's admin app for JNDI DataSources creates a
> > Validation Query with
> > > an empty string if no query is supplied, causing DBCP to throw an
> > > exception when invoked.  In your opinion, is this a mistake
> > by the Admin
> > > app for creating a empty string parameter, or a mistake by DBCP in
> > > handling an empty string?
> > >
> >
> > IMHO that's an admin app bug.
> >
> > > - Andrew
> >
> > Craig
> >
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




RE: tomcat conn pooling question

2002-08-28 Thread Turner, John


How does the admin app know what query to generate?  The query it generated
would have to have valid column names and table names.  I guess it could
just create "select foo from bar", but that doesn't seem any more helpful
than an empty string.

John Turner

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 28, 2002 2:14 PM
> To: Tomcat Users List
> Subject: RE: tomcat conn pooling question
> 
> 
> 
> 
> On Wed, 28 Aug 2002, Andrew Conrad wrote:
> 
> > Date: Wed, 28 Aug 2002 13:10:30 -0400
> > From: Andrew Conrad <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > Subject: RE: tomcat conn pooling question
> >
> > Thx.
> >
> > A validationQuery is not required by DBCP, but if you pass an empty
> > string it throws an exception.
> >
> > Tomcat's admin app for JNDI DataSources creates a 
> Validation Query with
> > an empty string if no query is supplied, causing DBCP to throw an
> > exception when invoked.  In your opinion, is this a mistake 
> by the Admin
> > app for creating a empty string parameter, or a mistake by DBCP in
> > handling an empty string?
> >
> 
> IMHO that's an admin app bug.
> 
> > - Andrew
> 
> Craig
> 

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




RE: tomcat conn pooling question

2002-08-28 Thread Craig R. McClanahan



On Wed, 28 Aug 2002, Andrew Conrad wrote:

> Date: Wed, 28 Aug 2002 13:10:30 -0400
> From: Andrew Conrad <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: tomcat conn pooling question
>
> Thx.
>
> A validationQuery is not required by DBCP, but if you pass an empty
> string it throws an exception.
>
> Tomcat's admin app for JNDI DataSources creates a Validation Query with
> an empty string if no query is supplied, causing DBCP to throw an
> exception when invoked.  In your opinion, is this a mistake by the Admin
> app for creating a empty string parameter, or a mistake by DBCP in
> handling an empty string?
>

IMHO that's an admin app bug.

> - Andrew

Craig


>
>
> > -Original Message-
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 28, 2002 12:48 PM
> > To: Tomcat Users List
> > Subject: RE: tomcat conn pooling question
> >
> >
> >
> >
> > On Wed, 28 Aug 2002, Andrew Conrad wrote:
> >
> > > Date: Wed, 28 Aug 2002 12:34:03 -0400
> > > From: Andrew Conrad <[EMAIL PROTECTED]>
> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > > Subject: RE: tomcat conn pooling question
> > >
> > > Craig,
> > >
> > > I'm troubleshooting a ValidationQuery issue, and I can't
> > seem to find
> > > where this query executes.
> > >
> > > Does DBCP handle the ValidationQuery, or does Tomcat run the
> > > ValidationQuery when the first connection is requested?
> > >
> >
> > It's inside commons-dbcp.  Tomcat doesn't "run" anything --
> > it just passes the configuration properties on to
> > BasicDataSourceFactory and lets commons-dbcp do its thing.
> >
> > Craig
> >
> > >
> > >
> > > - Andrew
> > >
> > > > -Original Message-
> > > > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, August 28, 2002 12:25 PM
> > > > To: Tomcat Users List
> > > > Subject: RE: tomcat conn pooling question
> > > >
> > > >
> > > >
> > > >
> > > > On Wed, 28 Aug 2002, Turner, John wrote:
> > > >
> > > > > Date: Wed, 28 Aug 2002 09:51:29 -0400
> > > > > From: "Turner, John" <[EMAIL PROTECTED]>
> > > > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > > > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > > > > Subject: RE: tomcat conn pooling question
> > > > >
> > > > >
> > > > > When you say "Tomcat's connection pooling" what do you mean
> > > > > exactly?
> > > > >
> > > > > As far as I know, there is no connection pooling built-in to
> > > > > tomcat that actually works.
> > > >
> > > > It does (at least in 4.1) if you set it up correctly :-).
> > The Tyrex
> > > > stuff in 4.0 is problematic, which is one of the reasons it got
> > > > abandoned in 4.1.
> > > >
> > > > >  The traffic I have seen on this list has people rolling their
> > > > > own, using open source pooling solutions like poolman or DBCP,
> > > > or using the
> > > > > pooling that comes from third-party driver vendors.  Which
> > > > one are you
> > > > > using?  That might give the list a better indicator of what's
> > > > > wrong.
> > > > >
> > > >
> > > > Note that Tomcat 4.1 uses commons-dbcp for its pooling.
> > > >
> > > > In answer to Rick's original question, the standard
> > connection pool
> > > > includes a "validationQuery" configuration property.
> > This is an SQL
> > > > query that the pool will execute before it hands you back a
> > > > requested connection (so it should be something that
> > executes very
> > > > quickly).  If the connection was closed externally (your
> > scenario),
> > > > this query will fail and the pool will throw that connection away
> > > > and give you another one instead.
> > > >
> > > > > John Turner
> > > > > [EMAIL PROTECTED]
> > > >
> > &g

RE: tomcat conn pooling question

2002-08-28 Thread Andrew Conrad

Thx.

A validationQuery is not required by DBCP, but if you pass an empty
string it throws an exception.

Tomcat's admin app for JNDI DataSources creates a Validation Query with
an empty string if no query is supplied, causing DBCP to throw an
exception when invoked.  In your opinion, is this a mistake by the Admin
app for creating a empty string parameter, or a mistake by DBCP in
handling an empty string?

- Andrew


> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, August 28, 2002 12:48 PM
> To: Tomcat Users List
> Subject: RE: tomcat conn pooling question
> 
> 
> 
> 
> On Wed, 28 Aug 2002, Andrew Conrad wrote:
> 
> > Date: Wed, 28 Aug 2002 12:34:03 -0400
> > From: Andrew Conrad <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > Subject: RE: tomcat conn pooling question
> >
> > Craig,
> >
> > I'm troubleshooting a ValidationQuery issue, and I can't 
> seem to find 
> > where this query executes.
> >
> > Does DBCP handle the ValidationQuery, or does Tomcat run the 
> > ValidationQuery when the first connection is requested?
> >
> 
> It's inside commons-dbcp.  Tomcat doesn't "run" anything -- 
> it just passes the configuration properties on to 
> BasicDataSourceFactory and lets commons-dbcp do its thing.
> 
> Craig
> 
> >
> >
> > - Andrew
> >
> > > -Original Message-
> > > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, August 28, 2002 12:25 PM
> > > To: Tomcat Users List
> > > Subject: RE: tomcat conn pooling question
> > >
> > >
> > >
> > >
> > > On Wed, 28 Aug 2002, Turner, John wrote:
> > >
> > > > Date: Wed, 28 Aug 2002 09:51:29 -0400
> > > > From: "Turner, John" <[EMAIL PROTECTED]>
> > > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > > > Subject: RE: tomcat conn pooling question
> > > >
> > > >
> > > > When you say "Tomcat's connection pooling" what do you mean 
> > > > exactly?
> > > >
> > > > As far as I know, there is no connection pooling built-in to 
> > > > tomcat that actually works.
> > >
> > > It does (at least in 4.1) if you set it up correctly :-). 
> The Tyrex 
> > > stuff in 4.0 is problematic, which is one of the reasons it got 
> > > abandoned in 4.1.
> > >
> > > >  The traffic I have seen on this list has people rolling their 
> > > > own, using open source pooling solutions like poolman or DBCP,
> > > or using the
> > > > pooling that comes from third-party driver vendors.  Which
> > > one are you
> > > > using?  That might give the list a better indicator of what's 
> > > > wrong.
> > > >
> > >
> > > Note that Tomcat 4.1 uses commons-dbcp for its pooling.
> > >
> > > In answer to Rick's original question, the standard 
> connection pool 
> > > includes a "validationQuery" configuration property.  
> This is an SQL 
> > > query that the pool will execute before it hands you back a 
> > > requested connection (so it should be something that 
> executes very 
> > > quickly).  If the connection was closed externally (your 
> scenario), 
> > > this query will fail and the pool will throw that connection away 
> > > and give you another one instead.
> > >
> > > > John Turner
> > > > [EMAIL PROTECTED]
> > >
> > > Craig
> > >
> > >
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: Rick Reumann [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Wednesday, August 28, 2002 9:37 AM
> > > > > To: Tomcat Users List
> > > > > Subject: tomcat conn pooling question
> > > > >
> > > > >
> > > > > Sorry if this is a repeat post. (I'm not sure if I 
> posted this 
> > > > > question here or not as I was trying to switch from
> > > digest mode to
> > > > > regular list mode on this list and I ended up
> > > unsubscribing from the
> > > > > list so didn't get messages for a while).
> > > > >
> > >

Re[2]: tomcat conn pooling question

2002-08-28 Thread Rick Reumann

On Wednesday, August 28, 2002, 12:24:32 PM, Craig R. McClanahan wrote:


CRM> In answer to Rick's original question, the standard connection pool
CRM> includes a "validationQuery" configuration property.  This is an SQL query
CRM> that the pool will execute before it hands you back a requested
CRM> connection (so it should be something that executes very quickly).

 Craig, Am I doing something wrong with the way I have this added
 to my ResourceParams?

 
   validationQuery
   SELECT 'boguz' FROM DUAL
   

CRM> If the connection was closed externally (your scenario), this
CRM> query will fail and the pool will throw that connection away and
CRM> give you another one instead.

 That's what I thought should happen as well, but I either I have
 something configured wrong or it's not working correctly, because
 I have the above added validationQuery and yet if the connections
 are killed I no longer am able to get a connection.
 (I get a java.sql.SQLException: ORA-01012: not logged on
 in my error log)

 Thanks so much again



--

Rick

mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: tomcat conn pooling question

2002-08-28 Thread Craig R. McClanahan



On Wed, 28 Aug 2002, Andrew Conrad wrote:

> Date: Wed, 28 Aug 2002 12:34:03 -0400
> From: Andrew Conrad <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: tomcat conn pooling question
>
> Craig,
>
> I'm troubleshooting a ValidationQuery issue, and I can't seem to find
> where this query executes.
>
> Does DBCP handle the ValidationQuery, or does Tomcat run the
> ValidationQuery when the first connection is requested?
>

It's inside commons-dbcp.  Tomcat doesn't "run" anything -- it just passes
the configuration properties on to BasicDataSourceFactory and lets
commons-dbcp do its thing.

Craig

>
>
> - Andrew
>
> > -Original Message-
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 28, 2002 12:25 PM
> > To: Tomcat Users List
> > Subject: RE: tomcat conn pooling question
> >
> >
> >
> >
> > On Wed, 28 Aug 2002, Turner, John wrote:
> >
> > > Date: Wed, 28 Aug 2002 09:51:29 -0400
> > > From: "Turner, John" <[EMAIL PROTECTED]>
> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > > Subject: RE: tomcat conn pooling question
> > >
> > >
> > > When you say "Tomcat's connection pooling" what do you mean exactly?
> > >
> > > As far as I know, there is no connection pooling built-in to tomcat
> > > that actually works.
> >
> > It does (at least in 4.1) if you set it up correctly :-).
> > The Tyrex stuff in 4.0 is problematic, which is one of the
> > reasons it got abandoned in 4.1.
> >
> > >  The traffic I have seen on this list has people rolling their own,
> > > using open source pooling solutions like poolman or DBCP,
> > or using the
> > > pooling that comes from third-party driver vendors.  Which
> > one are you
> > > using?  That might give the list a better indicator of what's wrong.
> > >
> >
> > Note that Tomcat 4.1 uses commons-dbcp for its pooling.
> >
> > In answer to Rick's original question, the standard
> > connection pool includes a "validationQuery" configuration
> > property.  This is an SQL query that the pool will execute
> > before it hands you back a requested connection (so it should
> > be something that executes very quickly).  If the connection
> > was closed externally (your scenario), this query will fail
> > and the pool will throw that connection away and give you
> > another one instead.
> >
> > > John Turner
> > > [EMAIL PROTECTED]
> >
> > Craig
> >
> >
> > >
> > >
> > > > -Original Message-
> > > > From: Rick Reumann [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, August 28, 2002 9:37 AM
> > > > To: Tomcat Users List
> > > > Subject: tomcat conn pooling question
> > > >
> > > >
> > > > Sorry if this is a repeat post. (I'm not sure if I posted this
> > > > question here or not as I was trying to switch from
> > digest mode to
> > > > regular list mode on this list and I ended up
> > unsubscribing from the
> > > > list so didn't get messages for a while).
> > > >
> > > > QUESTION:
> > > >
> > > > I've configured Tomcat's connection pooling according to Tomcat's
> > > > docs
> > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources
>
> > > -howto.html
> > > any everything seems to work fine unless someone manually kills the
> > > open connections (or something else causes the connections to go
> > > down). When the connections are manually killed the connection
> > > pooling ceases to work and the application breaks since it gets sql
> > > errors from the conn pool of
> > > java.sql.SQLException: ORA-01012: not logged on
> > >
> > > Is there a way to make sure the connection pooling goes back to
> > > working if the app somehow has it's open connections killed? I
> > > thought adding  the validationQuery to the ResourceParams configured
>
> > > in the server.xml file would help, but it doesn't.
> > >
> > > 
> > >   validationQuery
> > >SELECT 'CRAP' FROM DUAL
> > > 
> > >
> > > Thanks for any help.
> > >
> > > --
> > >
> > > Rick
> > > mailto:[EMAIL PROTECTED]
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




RE: tomcat conn pooling question

2002-08-28 Thread Andrew Conrad

Craig, 

I'm troubleshooting a ValidationQuery issue, and I can't seem to find
where this query executes.

Does DBCP handle the ValidationQuery, or does Tomcat run the
ValidationQuery when the first connection is requested?



- Andrew

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, August 28, 2002 12:25 PM
> To: Tomcat Users List
> Subject: RE: tomcat conn pooling question
> 
> 
> 
> 
> On Wed, 28 Aug 2002, Turner, John wrote:
> 
> > Date: Wed, 28 Aug 2002 09:51:29 -0400
> > From: "Turner, John" <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > Subject: RE: tomcat conn pooling question
> >
> >
> > When you say "Tomcat's connection pooling" what do you mean exactly?
> >
> > As far as I know, there is no connection pooling built-in to tomcat 
> > that actually works.
> 
> It does (at least in 4.1) if you set it up correctly :-).  
> The Tyrex stuff in 4.0 is problematic, which is one of the 
> reasons it got abandoned in 4.1.
> 
> >  The traffic I have seen on this list has people rolling their own, 
> > using open source pooling solutions like poolman or DBCP, 
> or using the 
> > pooling that comes from third-party driver vendors.  Which 
> one are you 
> > using?  That might give the list a better indicator of what's wrong.
> >
> 
> Note that Tomcat 4.1 uses commons-dbcp for its pooling.
> 
> In answer to Rick's original question, the standard 
> connection pool includes a "validationQuery" configuration 
> property.  This is an SQL query that the pool will execute 
> before it hands you back a requested connection (so it should 
> be something that executes very quickly).  If the connection 
> was closed externally (your scenario), this query will fail 
> and the pool will throw that connection away and give you 
> another one instead.
> 
> > John Turner
> > [EMAIL PROTECTED]
> 
> Craig
> 
> 
> >
> >
> > > -Original Message-
> > > From: Rick Reumann [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, August 28, 2002 9:37 AM
> > > To: Tomcat Users List
> > > Subject: tomcat conn pooling question
> > >
> > >
> > > Sorry if this is a repeat post. (I'm not sure if I posted this 
> > > question here or not as I was trying to switch from 
> digest mode to 
> > > regular list mode on this list and I ended up 
> unsubscribing from the 
> > > list so didn't get messages for a while).
> > >
> > > QUESTION:
> > >
> > > I've configured Tomcat's connection pooling according to Tomcat's 
> > > docs 
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources

> > -howto.html
> > any everything seems to work fine unless someone manually kills the 
> > open connections (or something else causes the connections to go 
> > down). When the connections are manually killed the connection 
> > pooling ceases to work and the application breaks since it gets sql 
> > errors from the conn pool of
> > java.sql.SQLException: ORA-01012: not logged on
> >
> > Is there a way to make sure the connection pooling goes back to 
> > working if the app somehow has it's open connections killed? I 
> > thought adding  the validationQuery to the ResourceParams configured

> > in the server.xml file would help, but it doesn't.
> >
> > 
> >   validationQuery
> >SELECT 'CRAP' FROM DUAL
> > 
> >
> > Thanks for any help.
> >
> > --
> >
> > Rick
> > mailto:[EMAIL PROTECTED]
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
>
>


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


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




RE: tomcat conn pooling question

2002-08-28 Thread Craig R. McClanahan



On Wed, 28 Aug 2002, Turner, John wrote:

> Date: Wed, 28 Aug 2002 09:51:29 -0400
> From: "Turner, John" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: tomcat conn pooling question
>
>
> When you say "Tomcat's connection pooling" what do you mean exactly?
>
> As far as I know, there is no connection pooling built-in to tomcat that
> actually works.

It does (at least in 4.1) if you set it up correctly :-).  The Tyrex stuff
in 4.0 is problematic, which is one of the reasons it got abandoned in
4.1.

>  The traffic I have seen on this list has people rolling
> their own, using open source pooling solutions like poolman or DBCP, or
> using the pooling that comes from third-party driver vendors.  Which one are
> you using?  That might give the list a better indicator of what's wrong.
>

Note that Tomcat 4.1 uses commons-dbcp for its pooling.

In answer to Rick's original question, the standard connection pool
includes a "validationQuery" configuration property.  This is an SQL query
that the pool will execute before it hands you back a requested
connection (so it should be something that executes very quickly).  If the
connection was closed externally (your scenario), this query will fail and
the pool will throw that connection away and give you another one instead.

> John Turner
> [EMAIL PROTECTED]

Craig


>
>
> > -Original Message-
> > From: Rick Reumann [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 28, 2002 9:37 AM
> > To: Tomcat Users List
> > Subject: tomcat conn pooling question
> >
> >
> > Sorry if this is a repeat post. (I'm not sure if I posted
> > this question
> > here or not as I was trying to switch from digest mode to regular list
> > mode on this list and I ended up unsubscribing from the list so didn't
> > get messages for a while).
> >
> > QUESTION:
> >
> > I've configured Tomcat's connection pooling according to Tomcat's docs
> > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources
> > -howto.html
> > any everything seems to work fine unless someone manually kills the
> > open connections (or something else causes the connections to go
> > down). When the connections are manually killed the connection pooling
> > ceases to work and the application breaks since it gets sql errors
> > from the conn pool of
> > java.sql.SQLException: ORA-01012: not logged on
> >
> > Is there a way to make sure the connection pooling goes back to
> > working if the app somehow has it's open connections killed?
> > I thought adding  the validationQuery to the ResourceParams configured
> > in the server.xml file would help, but it doesn't.
> >
> > 
> >   validationQuery
> >SELECT 'CRAP' FROM DUAL
> > 
> >
> > Thanks for any help.
> >
> > --
> >
> > Rick
> > mailto:[EMAIL PROTECTED]
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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




Re[2]: tomcat conn pooling question

2002-08-28 Thread Rick Reumann


On Wednesday, August 28, 2002, 9:51:29 AM, John wrote:

TJ> As far as I know, there is no connection pooling built-in to tomcat that
TJ> actually works.  The traffic I have seen on this list has people rolling
TJ> their own, using open source pooling solutions like poolman or DBCP, or
TJ> using the pooling that comes from third-party driver vendors.  Which one are
TJ> you using?  That might give the list a better indicator of what's wrong.

I apologize for not being more clear. I see that now looking at
the documentation that DBCP is not Tomcat's pooling, which is the
one I am now trying to use.

I've also tried
http://connpool.jensn.de/index.html which I saw recommended on the
list and ran into the same problems when connections get killed.

I also tried this one with the same results:
http://www.bitmechanic.com/


Thanks for any more information. I do appreciate it.




>> -Original Message-
>> From: Rick Reumann [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, August 28, 2002 9:37 AM
>> To: Tomcat Users List
>> Subject: tomcat conn pooling question
>> 
>> 
>> Sorry if this is a repeat post. (I'm not sure if I posted 
>> this question
>> here or not as I was trying to switch from digest mode to regular list
>> mode on this list and I ended up unsubscribing from the list so didn't
>> get messages for a while).
>> 
>> QUESTION:
>> 
>> I've configured Tomcat's connection pooling according to Tomcat's docs
>> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources
>> -howto.html
>> any everything seems to work fine unless someone manually kills the
>> open connections (or something else causes the connections to go
>> down). When the connections are manually killed the connection pooling
>> ceases to work and the application breaks since it gets sql errors
>> from the conn pool of
>> java.sql.SQLException: ORA-01012: not logged on
>> 
>> Is there a way to make sure the connection pooling goes back to
>> working if the app somehow has it's open connections killed?
>> I thought adding  the validationQuery to the ResourceParams configured
>> in the server.xml file would help, but it doesn't.
>> 
>> 
>>   validationQuery
>>SELECT 'CRAP' FROM DUAL
>> 
>> 
>> Thanks for any help.
>> 


-- 

Rick
mailto:[EMAIL PROTECTED]


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




RE: tomcat conn pooling question

2002-08-28 Thread Turner, John


When you say "Tomcat's connection pooling" what do you mean exactly?

As far as I know, there is no connection pooling built-in to tomcat that
actually works.  The traffic I have seen on this list has people rolling
their own, using open source pooling solutions like poolman or DBCP, or
using the pooling that comes from third-party driver vendors.  Which one are
you using?  That might give the list a better indicator of what's wrong.

John Turner
[EMAIL PROTECTED]


> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 28, 2002 9:37 AM
> To: Tomcat Users List
> Subject: tomcat conn pooling question
> 
> 
> Sorry if this is a repeat post. (I'm not sure if I posted 
> this question
> here or not as I was trying to switch from digest mode to regular list
> mode on this list and I ended up unsubscribing from the list so didn't
> get messages for a while).
> 
> QUESTION:
> 
> I've configured Tomcat's connection pooling according to Tomcat's docs
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources
> -howto.html
> any everything seems to work fine unless someone manually kills the
> open connections (or something else causes the connections to go
> down). When the connections are manually killed the connection pooling
> ceases to work and the application breaks since it gets sql errors
> from the conn pool of
> java.sql.SQLException: ORA-01012: not logged on
> 
> Is there a way to make sure the connection pooling goes back to
> working if the app somehow has it's open connections killed?
> I thought adding  the validationQuery to the ResourceParams configured
> in the server.xml file would help, but it doesn't.
> 
> 
>   validationQuery
>SELECT 'CRAP' FROM DUAL
> 
> 
> Thanks for any help.
> 
> -- 
> 
> Rick
> mailto:[EMAIL PROTECTED]
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

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




tomcat conn pooling question

2002-08-28 Thread Rick Reumann

Sorry if this is a repeat post. (I'm not sure if I posted this question
here or not as I was trying to switch from digest mode to regular list
mode on this list and I ended up unsubscribing from the list so didn't
get messages for a while).

QUESTION:

I've configured Tomcat's connection pooling according to Tomcat's docs
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html
any everything seems to work fine unless someone manually kills the
open connections (or something else causes the connections to go
down). When the connections are manually killed the connection pooling
ceases to work and the application breaks since it gets sql errors
from the conn pool of
java.sql.SQLException: ORA-01012: not logged on

Is there a way to make sure the connection pooling goes back to
working if the app somehow has it's open connections killed?
I thought adding  the validationQuery to the ResourceParams configured
in the server.xml file would help, but it doesn't.


  validationQuery
   SELECT 'CRAP' FROM DUAL


Thanks for any help.

-- 

Rick
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: