confusion to DBCP

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

confusion to DBCP

li yanjing
I'm using mysql + tomcat as server to run jsp pages.
and there are JavaBeans too.
I have read a lot on the web that using a connection pool is very good.
I just wondering why I should configure DBCP in tomcat?
i think if i write the database connection in jsp pages(not in beans)
I need configure DBCP in tomcat.
if in the page I just call some JavaBeans to connect to database, i
just need write a connection pool class in java.
is that true?
thanks

--

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: confusion to DBCP

Gurumoorthy-2
Hi,
    Yes Connection pool is good because it gives a performance boost to your
application
        ( because open connection / close connection  is cpu and network
intensive )
    You dont have a to configure DBCP in tomcat. you can do that in your
application as well.
    You can configure DBCP in struts-config.xml if you are using struts :o)
     Why to re invent a wheel ( which may be buggy ) when there are loads
which are free and tested .. :o)
    Any other question feel free to ask ..

Regards
Guru

Guru on the Web : http://gurumoorthy.no-ip.org

----- Original Message -----
From: "li yanjing" <[hidden email]>
To: <[hidden email]>
Sent: Sunday, May 08, 2005 5:18 AM
Subject: confusion to DBCP


I'm using mysql + tomcat as server to run jsp pages.
and there are JavaBeans too.
I have read a lot on the web that using a connection pool is very good.
I just wondering why I should configure DBCP in tomcat?
i think if i write the database connection in jsp pages(not in beans)
I need configure DBCP in tomcat.
if in the page I just call some JavaBeans to connect to database, i
just need write a connection pool class in java.
is that true?
thanks

--

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]