-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 =
-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
- 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
;
}
}
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
- 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
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
:[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
-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
-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
, 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
- 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
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
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
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
- 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
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
: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
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
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
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
- 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
: [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
.
--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
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
- 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
- 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
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
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:
- 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
- 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
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Sinoea,
sinoea kaabi wrote:
} finally {
results.close();
}
} finally {
statement.close();
}
} finally {
-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
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
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
, 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
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
- 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
, 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
[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
- 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
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
- 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
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
- 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
44 matches
Mail list logo