Re: Database connection pooling ..

2023-04-11 Thread John Dale (DB2DOM)
Good info here. Commons IS very busy, aren't they. Lots of good tools in there .. John On 4/11/23, Christopher Schultz wrote: > Bruno, > > On 4/11/23 12:51, BRUNO MELLONI wrote: >> I used org.apache.commons.dbcp2.BasicDataSource as my default >> DataSource for over a decade in both Tomcat and

Re: Database connection pooling ..

2023-04-11 Thread Christopher Schultz
Bruno, On 4/11/23 12:51, BRUNO MELLONI wrote: I used org.apache.commons.dbcp2.BasicDataSource as my default DataSource for over a decade in both Tomcat and standalone apps. Very reliable. Note that you are talking about commons-dbcp2 and John was asking about tomcat-pool (which is a different p

RE: Database connection pooling ..

2023-04-11 Thread BRUNO MELLONI
to re-resolve DNS names to IP every “x amount of time”. From: Christopher Schultz Sent: Tuesday, April 11, 2023 10:30 AM To: users@tomcat.apache.org Subject: Re: Database connection pooling .. John, On 4/10/23 00: 40, John Dale (DB2DOM) wrote: > Has anyone tried using the Tomcat 10 DBCP fro

Re: Database connection pooling ..

2023-04-11 Thread Christopher Schultz
John, On 4/10/23 00:40, John Dale (DB2DOM) wrote: Has anyone tried using the Tomcat 10 DBCP from a standalone java app? I have not, but there isn't really anything Tomcat-specific about it. -chris - To unsubscribe, e-mail: u

RE: Database Connection Pooling initialization with dbcp

2009-09-10 Thread Caldarale, Charles R
> From: Chris Wiley [mailto:cwile...@comcast.net] > Subject: RE: Database Connection Pooling initialization with dbcp > > As far as the initialSize parameter, do I just append those to the > datasource under the Resource element in the web.xml? Set the values as additional at

RE: Database Connection Pooling initialization with dbcp

2009-09-10 Thread Chris Wiley
n't matter. -Chris -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Thursday, September 10, 2009 12:23 PM To: Tomcat Users List Cc: chriswile...@gmail.com Subject: Re: Database Connection Pooling initialization with dbcp -BEGIN PGP SIGNED ME

Re: Database Connection Pooling initialization with dbcp

2009-09-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, On 9/9/2009 12:01 PM, Chris Wiley wrote: > My question is this: Am I to assume that I need to OPEN and CLOSE x > number of connections in the init section of the servlet to load the pool > with live connections? No, this can be done with confi

Re: Database Connection Pooling initialization with dbcp

2009-09-09 Thread Ziggy
Im not an expert on this but i thought that the pool will cache connections that you have created. Maybe someone can clarify this. Have a look at this http://onjava.com/pub/a/onjava/2006/04/19/database-connection-pooling-with-tomcat.html?page=2 On Wed, Sep 9, 2009 at 9:01 AM, Chris Wiley wrot

RE: database connection pooling - diagnostic utility

2007-05-23 Thread Raghupathy, Gurumoorthy
http://www.lambdaprobe.org/d/overview.shtml this one for free and monitor a lot of things for tomcat ... Remember this is for tomcat only not any other web container :) Guru -Original Message- From: Przemysław Klein [mailto:[EMAIL PROTECTED] Sent: 23 May 2007 10:57 To: Tomcat Users Li

Re: Database connection pooling errors in Tomcat 5.5.17

2006-10-18 Thread David Smith
The "normal method" uses DriverManager.getConnection() which appears to cast a wider net in resolving database URLs. Maybe someone who's seen the DriverManager class source can comment? --David Saurabh Nanda wrote: Thanks. I got it working: 1. Removed the oracle driver from WEB-INF/lib and

Re: Database connection pooling errors in Tomcat 5.5.17

2006-10-17 Thread Saurabh Nanda
Thanks. I got it working: 1. Removed the oracle driver from WEB-INF/lib and put it in common/lib 2. Used the format of the URL given below: jdbc:oracle:thin:@address:port:schema -- but it's rather strange -- is this documented anywhere? When I was using the "normal" (non DBCP) method to connect t

Re: Database connection pooling errors in Tomcat 5.5.17

2006-10-17 Thread David Smith
n or copying of it or its contents - Original Message - From: "DE VINZELLES, Guillaume (ext.)" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, October 17, 2006 11:18 AM Subject: RE: Database connection pooling errors in Tomcat 5.5.17 Her

Re: Database connection pooling errors in Tomcat 5.5.17

2006-10-17 Thread Martin Gainty
Guillaume (ext.)" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, October 17, 2006 11:18 AM Subject: RE: Database connection pooling errors in Tomcat 5.5.17 Here is a valid url : url="jdbc:oracle:thin:@address:port:schema" Guillaume de Vinzelles DSI/PFS

RE: Database connection pooling errors in Tomcat 5.5.17

2006-10-17 Thread DE VINZELLES, Guillaume \(ext.\)
 : Tomcat Users List Objet : Re: Database connection pooling errors in Tomcat 5.5.17 Some fishing through source and online -- your problem can happen if the connection url is not recognized by the driver. I was looking at the jdbc url you first posted: jdbc:oracle:thin:[EMAIL PROTECTED] This doe

Re: Database connection pooling errors in Tomcat 5.5.17

2006-10-17 Thread David Smith
Some fishing through source and online -- your problem can happen if the connection url is not recognized by the driver. I was looking at the jdbc url you first posted: jdbc:oracle:thin:[EMAIL PROTECTED] This doesn't come up as a valid form in any online docs I can find. You might want to ve

RE: Database connection pooling errors in Tomcat 5.5.17

2006-10-17 Thread DE VINZELLES, Guillaume \(ext.\)
14:13 À : Tomcat Users List Objet : Re: Database connection pooling errors in Tomcat 5.5.17 > ojdbc14.jar should be in $TOMCAT_HOME/common/lib to be available to both > the container and your webapp. Nopes: o Put it in $CATALINA_HOME/common/lib alone -- same error o put it in webapps/appn

Re: Database connection pooling errors in Tomcat 5.5.17

2006-10-17 Thread David Smith
Is the driver in exactly one place -- $TOMCAT_HOME/common/lib? This is the only place the driver is documented to work from. If the jar file is in multiple places it can cause classloader issues. Related to that, also check it isn't in any classpath or the JVM endorsed folder. Did you resta

Re: Database connection pooling errors in Tomcat 5.5.17

2006-10-17 Thread Saurabh Nanda
ojdbc14.jar should be in $TOMCAT_HOME/common/lib to be available to both the container and your webapp. Nopes: o Put it in $CATALINA_HOME/common/lib alone -- same error o put it in webapps/appname/WEB-INf/lib and $CATALINE_HOME/common/lib, both -- same error! Does oracle drier support DBCP? N

Re: Database connection pooling errors in Tomcat 5.5.17

2006-10-17 Thread David Smith
I think I see the problem... ojdbc14.jar should be in $TOMCAT_HOME/common/lib to be available to both the container and your webapp. .jar files are always stored in a lib folder. Relative to tomcat's home dir -- shared/lib, common/lib. Relative to the webapp -- WEB-INF/lib --David Saurab

Re: Database connection pooling errors in Tomcat 5.5.17

2006-10-17 Thread Saurabh Nanda
This is the complete stacktrace of the error if it helps. The ojdbc14.jar file is in the WEB-INF/classes directory. SEVERE: Servlet.service() for servlet test threw exception java.lang.NullPointerException at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.close(DelegatingConnection.java

Re: Database connection pooling errors in Tomcat 5.5.17

2006-10-17 Thread David Smith
One other thought I just had. I don't use the Oracle driver, so bear with me. Is there ever a case where the Oracle driver might return a null connection instead of throwing an exception? David Smith wrote: Looks like the connection the pool is attempting to return is null. Are there any e

Re: Database connection pooling errors in Tomcat 5.5.17

2006-10-17 Thread David Smith
Looks like the connection the pool is attempting to return is null. Are there any errors further up the logs that might indicate an other issue that might be causing this? For what it's worth, the code and config posted look good. --David Saurabh Nanda wrote: Hi, I'm trying to configure

RE: Database connection pooling in Tomcat 5.5

2006-09-20 Thread Sameer Acharya
I have a datasource defined similar to yours I get this error when I try to use ds.getConnection("username", "password"); but if I just use ds.getConnection(); it works fine. -Sameer Darren Hall <[EMAIL PROTECTED]> wrote: Is there any other information I can supply to help people help me unde

Re: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Martin Gainty
telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Darren Hall" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" Sent: Tuesday, September 19, 2006 2:56 PM Subject: RE: Database connection p

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
> Which is why I suggested Ethereal to see what was really going over the > wire between your Windows box and the DB machine. Yep. I think you're right. I'll get that set up and take a look. Be back in a while. Thanks for the help.

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Caldarale, Charles R
> From: Darren Hall [mailto:[EMAIL PROTECTED] > Subject: RE: Database connection pooling in Tomcat 5.5 > > I don't know where to go from here. I'm stumped. Which is why I suggested Ethereal to see what was really going over the wire between your Windows box and the DB mac

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
> They are, you just don't know it. From the doc: > > "These libraries are located in a single JAR at > $CATALINA_HOME/common/lib/naming-factory-dbcp.jar. Gotcha. Thanks, Chuck. The naming-factory-dbcp.jar is in my /commons/lib dir. The bizarre thing about all of this is that A) I can connect

Re: Database connection pooling in Tomcat 5.5

2006-09-19 Thread David Smith
Don't think so you need the commons-*.jar files. Tomcat 5.5 refactored the commons-dbcp package internally so it wouldn't collide with webapps using the release version from http://jakarta.apache.org/commons/dbcp. I don't have those and I've been using mysql without issue. --David Darren Hal

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Caldarale, Charles R
> From: Darren Hall [mailto:[EMAIL PROTECTED] > Subject: RE: Database connection pooling in Tomcat 5.5 > > > make SURE commons-pooling.jar, commons-dbcp.jar and > > commons-collections.jar are in your ./WEB-INF/lib folder > > None of these jar files are in either m

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
(In reverse order) > have you used a DB utility such as tora/toad/sqlplus to successfully > authenticate to your Database with the values for username and password? Yes > Inside struts-config.xml can you show us what you have supplied for each > value associated with the following properties >

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Caldarale, Charles R
> From: Darren Hall [mailto:[EMAIL PROTECTED] > Subject: RE: Database connection pooling in Tomcat 5.5 > > Well, yes and no. I've actually hard coded the username and > password into my code when I've tested *not* using connection > pooling, so I know what they are i

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
> did you try printing out the username and password variables to see what > credentials are coming through? Well, yes and no. I've actually hard coded the username and password into my code when I've tested *not* using connection pooling, so I know what they are in that case. When using connecti

Re: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Martin Gainty
uesday, September 19, 2006 2:04 PM Subject: RE: Database connection pooling in Tomcat 5.5 > does your XP box give you any application log errors anywhere? I see no errors in the event viewer in any of the logs that are related to this issue, but it was a good idea. (I didn't think of it

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Propes, Barry L
did you try printing out the username and password variables to see what credentials are coming through? -Original Message- From: Darren Hall [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 19, 2006 1:37 PM To: 'Tomcat Users List' Subject: RE: Database connection pooling in

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
> That SQL Nested Exception thing in general looks like the root cause...any > way to try going to the DOS prompt and connecting to SQL Plus with that > username/pwd combo? Yes, using that username and password works fine through SQL Plus, and I've connected to the database several times through

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Propes, Barry L
st' Subject: RE: Database connection pooling in Tomcat 5.5 > does your XP box give you any application log errors anywhere? I see no errors in the event viewer in any of the logs that are related to this issue, but it was a good idea. (I didn't think of it.) > I wonder if

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
> does your XP box give you any application log errors anywhere? I see no errors in the event viewer in any of the logs that are related to this issue, but it was a good idea. (I didn't think of it.) > I wonder if Windows is looking for a domain authentication, that is a > domain name stapled on

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Propes, Barry L
: Darren Hall [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 19, 2006 11:53 AM To: 'Tomcat Users List' Subject: RE: Database connection pooling in Tomcat 5.5 More progress with this issue. It seems that on our development server (solaris box running solaris 10) the connection pool connect

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
More progress with this issue. It seems that on our development server (solaris box running solaris 10) the connection pool connects properly. However on my local box (a Windows XP SP2 box where I'm doing my development before I move it to dev) the connection pool returns to me an "invalid username

Re: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Martin Gainty
List" Sent: Tuesday, September 19, 2006 10:27 AM Subject: Re: Database connection pooling in Tomcat 5.5 > As the subject title implies, we are looking at 5.5. In 5.5, the > parameters on a resource are expressed as attributes on the Resource > element. > > --David > > Mar

Re: Database connection pooling in Tomcat 5.5

2006-09-19 Thread David Smith
OTECTED]> To: "'Tomcat Users List'" Sent: Tuesday, September 19, 2006 9:24 AM Subject: RE: Database connection pooling in Tomcat 5.5 Have you tried username="myuserid" password="mypassword" instead username="(myuserid)" password="(mypassword

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
> can you print the contents of context.xml? Absolutely Martin, The parameters are there, but they are included as attributes instead of contained as the body of an element. I'm not sure if this matters or not, but I have it implemented a way I saw it done in a "JNDI Datasource How-To" on Apache'

Re: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Martin Gainty
message without making a copy. Thank you. - Original Message - From: "Darren Hall" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" Sent: Tuesday, September 19, 2006 9:24 AM Subject: RE: Database connection pooling in Tomcat 5.5 >> Have

Re: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Martin Grogan
Hi Darren, See below for some code that I recently sent to the list in relation to this problem. It helped with the other person, might work for you too. Regards, Martin -- // fragment from web.xml DB Connection jdbc/dbname javax.sql.DataSource Container // context.xml prefix

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Darren Hall
> Have you tried > username="myuserid" password="mypassword" > instead username="(myuserid)" password="(mypassword)" Yes Jean-Claude. In fact, I don't use the parenthesis around the username and password in my context.xml file. I just listed it that way here in the list so people would understand

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Serlet Jean-Claude
Sorry, I do not use oracle, so I cannot say what is right. Doug - Original Message - From: "Darren Hall" To: "'Tomcat Users List'" Sent: Monday, September 18, 2006 4:38 PM Subject: RE: Database connection pooling in Tomcat 5.5 Further progress... When I co

RE: Database connection pooling in Tomcat 5.5

2006-09-19 Thread Bob Hall
--- Darren Hall <[EMAIL PROTECTED]> wrote: > Further progress... > When I connect to the database directly (not using a > connection pool) and > specify the same username and password below, the > code executes fine. When I > try to do the context lookup and connect to the > database via the conne

Re: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Sameer Acharya
Doug - Original Message - From: "Darren Hall" To: "'Tomcat Users List'" Sent: Monday, September 18, 2006 4:38 PM Subject: RE: Database connection pooling in Tomcat 5.5 Further progress... When I connect to the database directly (not using a connection poo

Re: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Parsons Technical Services
. Sorry, I do not use oracle, so I cannot say what is right. Doug - Original Message - From: "Darren Hall" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" Sent: Monday, September 18, 2006 4:38 PM Subject: RE: Database connection pooling in Tomcat 5.5 F

RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
logon denied" error. This leads me to believe the error is in my configuration (or my code). What am I doing wrong here?? Thanks, Darren -Original Message- From: Darren Hall [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 2:45 PM To: 'Tomcat Users List' S

Re: Database connection pooling in Tomcat 5.5

2006-09-18 Thread David Smith
Inidcations are from the exception, the config on your end is working and it's actually attempting to get a connection, but the login fails. Have you tried using the client software from the machine tomcat is on, using the same tcp/ip url and parameters tomcat is using? Are there any logs on

RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
Is there any other information I can supply to help people help me understand why I'm getting this error (below)? > I've made some progress on this. I'm now receiving a "SQLNestedException: > Cannot create PoolableConnectionFactory" error when calling getConnection > on the DataSource object ret

RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
> You are likely connecting to the wrong catalog. Is the pool parameter > defaultCatalog set? That's specified in my Context, correct? If so, then no, I don't have my defaultCatalog parameter set. Here is my context.xml file (comments removed, as well as domain uname and passwd)

RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Derrick Koes
You are likely connecting to the wrong catalog. Is the pool parameter defaultCatalog set? -Original Message- From: Darren Hall [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 2:00 PM To: 'Tomcat Users List' Subject: RE: Database connection pooling in Tomcat

RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
I've made some progress on this. I'm now receiving a "SQLNestedException: Cannot create PoolableConnectionFactory" error when calling getConnection on the DataSource object retrieved from my connection pool. Here is the satck trace: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create Po

RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
onday, September 18, 2006 12:31 PM To: 'Tomcat Users List' Subject: RE: Database connection pooling in Tomcat 5.5 The issue could be the path attribute or docbase attribute in the context.xml. I'm not sure what values should appear for these. -Original Message- From: Darren

RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
t: RE: Database connection pooling in Tomcat 5.5 Here it is. The items in parenthesis have been removed. Thanks for the help. -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 11:16 AM To: Tomcat Users L

RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
D] Sent: Monday, September 18, 2006 11:30 AM To: Tomcat Users List Subject: Re: Database connection pooling in Tomcat 5.5 Do you include a in your WEB-INF/web.xml file? You might also want to post your web.xml Pid wrote: > post your context.xml > > > > > Darren Hall wrote: &g

Re: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Mark Barnes
Do you include a in your WEB-INF/web.xml file? You might also want to post your web.xml Pid wrote: post your context.xml Darren Hall wrote: Hi all. I'm attempting to set up database connection pool using Tomcat 5.5 and Oracle 10g. I've been following the "JNDI How To" guide from Apa

RE: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Darren Hall
Here it is. The items in parenthesis have been removed. Thanks for the help. -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 11:16 AM To: Tomcat Users List Subject: Re: Database connection

Re: Database connection pooling in Tomcat 5.5

2006-09-18 Thread Pid
post your context.xml Darren Hall wrote: > Hi all. > > > > I'm attempting to set up database connection pool using Tomcat 5.5 and > Oracle 10g. I've been following the "JNDI How To" guide from Apache > (http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html > ). My ques

RE: database connection pooling

2005-11-22 Thread Caldarale, Charles R
> From: Khawaja Shams [mailto:[EMAIL PROTECTED] > Subject: database connection pooling > > when using connection pooling, i get a connection from the > context. I am curious if I am supposed to close this connection > when I am done using it. Please read the doc: http://tomcat.apache.org/tomcat

RE: database connection pooling

2005-11-22 Thread ALEX HYDE
gards, > > Kerem > > -Original Message- > From: Caroline Jen [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 22, 2005 2:04 PM > To: Tomcat Users List > Subject: Re: database connection pooling > > Hi, you should definitely close the connection right > a

RE: database connection pooling

2005-11-22 Thread KEREM ERKAN
nection as idle, or until Tomcat is restarted. Regards, Kerem -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 22, 2005 2:04 PM To: Tomcat Users List Subject: Re: database connection pooling Hi, you should definitely close the connection right after

Re: database connection pooling

2005-11-22 Thread Caroline Jen
Hi, you should definitely close the connection right after the method that is invoked. The connection should be closed in the 'finally' block. May we know the reason why you think the closing would defeat the purpose of connection pooling? --- Khawaja Shams <[EMAIL PROTECTED]> wrote: > Hello, >

Re: database connection pooling

2005-11-22 Thread Rémi Flament
You still have to call the close() method but I will not actually close it, it will just mark it as free in the pool. Khawaja Shams a écrit : Hello, when using connection pooling, i get a connection from the context. I am curious if I am supposed to close this connection when I am done using i