Hi Pavel,
I used the db connection in struts-config.xml file initially but due to
some reasons my app is not working, so I thought of configuring
connection pool myself. So this is what I have done. 

Please tell me if there is a better way of doing this and if so how?

Uma

-----Original Message-----
From: Pavel Kolesnikov [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 19, 2005 4:12 PM
To: Struts Users Mailing List
Subject: Re: Connection Pool best practice

On Wed, 19 Jan 2005 15:52:20 +0530, Kalluru Uma. Maheswar
<[EMAIL PROTECTED]> wrote:

> And in the classes where I need database connection, I am saying
> 
> DBPool dbPool = new DBPool();
> 
> dbPool.getDataSource();
> 
> By doing this, my application is getting slower. Initially I
configured
> db connection in the struts-config.xml file and it was working fast at
> that time.

It seems you misunderstood the point of connection pooling.

If you are creating a new instance of connection pool before
working with database, there's obviously nothing pooled at all.

You should better use the datasource defined in struts-config.xml
or in your environment settings.

Pavel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to