on this basic design issue
;)
Yoav Shapira
Millennium Research Informatics
-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 11, 2004 12:43 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: [OFF-TOPIC]Yoav -- RE: Some pretty basic Tomcat
:03
To: Tomcat Users List
Subject: RE: [OFF-TOPIC]Yoav -- RE: Some pretty basic Tomcat
ConnectionPooling Questions
Hi,
It's inefficient to do the DataSource lookup (an expensive operation)
every time you need a connection. See Luke's approach in the other
message with a similar
I saw your Tomcat connection pool class.
Your class opens and gets a 'conn' object from the
connection pool. Where in your code returns the
'conn' object for use? Should there be a statemenet
like:
return conn;
somewhere?
1. Declaration of private global variables:
code
private
PROTECTED]
Subject: RE: [OFF-TOPIC]Yoav -- RE: Some pretty basic Tomcat
ConnectionPooling Questions
I saw your Tomcat connection pool class.
Your class opens and gets a 'conn' object from the
connection pool. Where in your code returns the
'conn' object for use? Should there be a statemenet
like
Hi,
You are right!
that statement should be there!
kind regards,
Luke
On Tue, 2004-09-14 at 06:08, Caroline Jen wrote:
I saw your Tomcat connection pool class.
Your class opens and gets a 'conn' object from the
connection pool. Where in your code returns the
'conn' object for use?
Hi,
Caroline is referring to my 'openConnection()' method which is missing a
'return' statement.
see below
regards,
Luke
Your class opens and gets a 'conn' object from the
connection pool. Where in your code returns the
'conn' object for use? Should there be a statemenet
like:
Hi,
I'd say your new version is much better designed and significantly more
scalable than the old, yeah.
But you went a bit too far: the DataSource lookup is potentially
expensive. That you can do in the init() method and keep a reference to
the DataSource, because keeping that reference
Hi Yoav and all,
Thanks for your reply,
But you went a bit too far: the DataSource lookup is potentially
expensive. That you can do in the init() method and keep a reference to
the DataSource, because keeping that reference doesn't use a connection
resource.
Then in your servlet methods,