Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sinoea, sinoea kaabi wrote: Christopher Schultz wrote: You aren't using any class-level members in your static methods so you should be fine. This means that I cannot declare a: public class Data { private static DataSource datasource =

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Johnny, Johnny Kewl wrote: If a datasource in DBCP represents the pool... you cant, you'd make a million data pools... No, the DataSource object does not represent the pool per se. It's just a factory that produces Connection objects (which, in

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-22 Thread Johnny Kewl
- Original Message - From: Christopher Schultz [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, September 22, 2008 3:14 PM Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing -BEGIN PGP SIGNED MESSAGE- Hash

RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-19 Thread sinoea kaabi
; } } Date: Thu, 18 Sep 2008 11:56:33 -0400 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 sinoea, sinoea kaabi wrote: The static methods

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-19 Thread Johnny Kewl
- Original Message - From: sinoea kaabi [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, September 19, 2008 9:18 AM Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing You aren't using any class-level members

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-19 Thread Johnny Kewl
Heres the blurb on the stuff... http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html/01/ Where I spoke about the New Trick... they blab on about immutable.. The stuff you prbably want to look at is Synchronized Statements In C they talk about semisphores and stuff... if you

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-18 Thread David Smith
:[EMAIL PROTECTED] Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing sinoea, of course you can... that looks thread safe... but what I'm trying to do, is just make it bullet proof... Your suggestion does nothing to improve reliability, it just slows

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 sinoea, sinoea kaabi wrote: The static methods are not thread-safe you say! No, your static methods are perfectly threadsafe. Johnny is just getting itchy because it's not what he'd do. You aren't using any class-level members in your static

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 sinoea, sinoea kaabi wrote: Collection branches = new BranchData().loadBranches(Data.getDataSource(), 1); Can the getDataSource method be static? Not only can the getDataSource method be static, you could also call it directly from your

RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread sinoea kaabi
, JNDI Connection Pooling, Active connections keep increasing Date: Tue, 16 Sep 2008 18:58:25 +0200 - Original Message - From: Johnny Kewl [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, September 16, 2008 5:41 PM Subject: Re: Tomcat 5.5, JNDI

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread Johnny Kewl
- Original Message - From: sinoea kaabi [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 17, 2008 11:31 AM Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Thanks, First I will try to close resources

RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread sinoea kaabi
Sounds reasonable, I will give it a try with non-static methods instead, new Dao() basically. Thanks, Sinoea From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Date: Wed, 17 Sep 2008 12:25:17 +0200

RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread sinoea kaabi
Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Date: Wed, 17 Sep 2008 12:25:17 +0200 - Original Message - From: sinoea kaabi To: Tomcat Users List Sent: Wednesday, September 17, 2008 11:31 AM Subject: RE: Tomcat 5.5, JNDI Connection Pooling

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread David Smith
Pooling, Active connections keep increasing Date: Wed, 17 Sep 2008 12:25:17 +0200 - Original Message - From: sinoea kaabi To: Tomcat Users List Sent: Wednesday, September 17, 2008 11:31 AM Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread Johnny Kewl
- Original Message - From: sinoea kaabi [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 17, 2008 12:48 PM Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Just a question here, I am using a Data

RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread sinoea kaabi
Thanks! Date: Wed, 17 Sep 2008 08:01:01 -0400 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing A static method can't have access to class instance variables. You could make it static

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread David Smith
:48 PM Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Just a question here, I am using a Data class to retrieve the datasource public class Data { /** * Gets a [EMAIL PROTECTED] DataSource} for database connection usage. * @return The datasource

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread Johnny Kewl
So, what exactly does it mean when we say that Tomcat is thread safe for requests. Tomcat creates a new thread for each request, so somehow my static methods are then thread safe (incdirectly, since it is managed by Tomcat). I actually searched all over to try find something for

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread David Smith
Comments inline ... Johnny Kewl wrote: So, what exactly does it mean when we say that Tomcat is thread safe for requests. Tomcat creates a new thread for each request, so somehow my static methods are then thread safe (incdirectly, since it is managed by Tomcat). I actually

RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread Caldarale, Charles R
From: Johnny Kewl [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Sineoa, my feeling is dont use static, unless you really want it in a multithreaded environment It pumps all the threads thru one pipe... That's

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread Johnny Kewl
- Original Message - From: David Smith [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 17, 2008 3:40 PM Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Comments inline ... Johnny Kewl wrote

RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread sinoea kaabi
: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Comments inline ... Johnny Kewl wrote: So, what exactly does it mean when we say that Tomcat is thread safe for requests. Tomcat creates a new

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread David Smith
. --David Johnny Kewl wrote: - Original Message - From: David Smith [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 17, 2008 3:40 PM Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Comments inline

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread David Smith
Connection Pooling, Active connections keep increasing Comments inline ... Johnny Kewl wrote: So, what exactly does it mean when we say that Tomcat is thread safe for requests. Tomcat creates a new thread for each request, so somehow my static methods

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread Johnny Kewl
- Original Message - From: sinoea kaabi [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 17, 2008 4:48 PM Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing This question about static variables seems

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread Johnny Kewl
- Original Message - From: sinoea kaabi [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 17, 2008 4:48 PM Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing This question about static variables seems

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread André Warnier
Johnny Kewl wrote: So, what exactly does it mean when we say that Tomcat is thread safe for requests. Tomcat creates a new thread for each request, so somehow my static methods are then thread safe (incdirectly, since it is managed by Tomcat). I actually searched all over to try

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread André Warnier
Caldarale, Charles R wrote: That's completely erroneous. Shame, Johnny's story was so nice.. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread Johnny Kewl
- Original Message - From: sinoea kaabi [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 17, 2008 9:56 PM Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Right, I have attached the source code. I

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread Johnny Kewl
- Original Message - From: André Warnier [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, September 17, 2008 10:18 PM Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Caldarale, Charles R wrote: That's

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sinoea, sinoea kaabi wrote: } finally { results.close(); } } finally { statement.close(); } } finally {

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sinoea, Oh, and I always always /always/ set my connection pool size to a fixed size of 1 (yes, a single connection) in development. This can help find places where you are requesting two connections from the pool by a single thread, which exposes

RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-16 Thread Propes, Barry L
Sounds like you're not explicitly killing off the connections you set in the first place. -Original Message- From: sinoea kaabi [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2008 4:24 AM To: users@tomcat.apache.org Subject: Tomcat 5.5, JNDI Connection Pooling, Active

RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-16 Thread sinoea kaabi
How exaclt do you mean? Anywhere in my code where you have seen that? Thanks! Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Date: Tue, 16 Sep 2008 10:26:03 -0400 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Sounds like you're

RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-16 Thread Propes, Barry L
, Active connections keep increasing How exaclt do you mean? Anywhere in my code where you have seen that? Thanks! Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Date: Tue, 16 Sep 2008 10:26:03 -0400 From: [EMAIL PROTECTED] To: users

RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-16 Thread sinoea kaabi
: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Date: Tue, 16 Sep 2008 11:02:46 -0400 From: [EMAIL PROTECTED] To: users@tomcat.apache.org At the end of the servlet or JSP or whichever, you need to kill off connections created that you establish

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-16 Thread Johnny Kewl
- Original Message - From: sinoea kaabi [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, September 16, 2008 5:10 PM Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Yes, as I said in the first post, that I have

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-16 Thread Brantley Hobbs
, September 16, 2008 5:10 PM Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Yes, as I said in the first post, that I have checked through all the code, and I am closing all the connections (in a finally block) after they have been used. final

RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-16 Thread Propes, Barry L
[mailto:[EMAIL PROTECTED] Sent: Tuesday, September 16, 2008 10:10 AM To: Tomcat Users List Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing Yes, as I said in the first post, that I have checked through all the code, and I am closing all the connections

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-16 Thread Johnny Kewl
- Original Message - From: Brantley Hobbs [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, September 16, 2008 5:27 PM Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing return statements do not prevent the finally

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-16 Thread Johnny Kewl
sinoea I dont use the JNDI pools, but I've marked a possible issue below... Dont think its getting to finally guess ;) On the dB pools I use... connections will not increase... unless that many threads are used at same time.. ie the connections represent a max activity level... otherwise

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-16 Thread Johnny Kewl
- Original Message - From: Johnny Kewl [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, September 16, 2008 5:17 PM Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing - Original Message - From: sinoea

RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-16 Thread Propes, Barry L
8:37 AM To: Tomcat Users List Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing sinoea I dont use the JNDI pools, but I've marked a possible issue below... Dont think its getting to finally guess ;) On the dB pools I use... connections will not increase

Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-16 Thread Johnny Kewl
- Original Message - From: Johnny Kewl [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, September 16, 2008 5:41 PM Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing - Original Message - From: Brantley