On 4/27/07, David Smith <[EMAIL PROTECTED]> wrote:
But the code you posted does not create a new DataSource object. It
just gets a reference to an existing one stored in JNDI. Nothing new
about the DataSource object. Note the lack of a new operator.
Good post, thank you for pointing this.
T
On 4/27/07, Srinivas V. <[EMAIL PROTECTED]> wrote:
Thanks for all the responses on this. The basic doubt I had was whether the
JNDI lookup would create a new data-source on each lookup or just return the
previously created one. A number of you had said that the latter was true.
The reason I wasn'
epancy with the docs.
Srinivas
-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Friday, April 27, 2007 11:58 AM
To: Tomcat Users List
Subject: Re: Defining data-sources in tomcat
But the code you posted does not create a new DataSource object. It just
gets a
But the code you posted does not create a new DataSource object. It
just gets a reference to an existing one stored in JNDI. Nothing new
about the DataSource object. Note the lack of a new operator.
--David
Rashmi Rubdi wrote:
On 4/27/07, albrecht andrzejewski <[EMAIL PROTECTED]> wrote:
On 4/27/07, Srinivas V. <[EMAIL PROTECTED]> wrote:
Hello all
I have a question about defining data-sources in tomcat. I have a webapp in
which my servlets need to talk to a DB. This is my current setup:
1) I define data-sources (c3p0 connection pools) using the Resource tag in
my ME
On 4/27/07, albrecht andrzejewski <[EMAIL PROTECTED]> wrote:
>> 3) In my servlet init(), I lookup the data-source. Each lookup essentially
>> instantiates an instance of the data-source. So a connection pool gets
>> instantiated in each servlet's init.
>>
>> Now it doesn't make sense to create a
3) In my servlet init(), I lookup the data-source. Each lookup essentially
instantiates an instance of the data-source. So a connection pool gets
instantiated in each servlet's init.
Now it doesn't make sense to create a new connection pool in each servlet.
So I'd like to create a single connec
llo all
I have a question about defining data-sources in tomcat. I have a webapp in
which my servlets need to talk to a DB. This is my current setup:
1) I define data-sources (c3p0 connection pools) using the Resource tag in
my META-INF/context.xml.
2) The web.xml has references these data-sources vi
Hello all
I have a question about defining data-sources in tomcat. I have a webapp in
which my servlets need to talk to a DB. This is my current setup:
1) I define data-sources (c3p0 connection pools) using the Resource tag in
my META-INF/context.xml.
2) The web.xml has references these data