aspose file tools*
The moose likes JDBC and the fly likes jdbc-servlets-connection pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "jdbc-servlets-connection pooling" Watch "jdbc-servlets-connection pooling" New topic
Author

jdbc-servlets-connection pooling

manju latha
Greenhorn

Joined: Jul 04, 2002
Posts: 28
hello, i need to switch on to "connection pooling"
in my program, i have some idea about pooling.
currently i working on servlets. There could be one
lakh users who can hit our site for login(the connection
to the database). Database could be oracle or Ms-sql.
can any body help me here, what driver should i use
which can support connection pooling and how should be
the connection pool in my code.
a sample code is more helpful.
help is appreciated.
thanx.


manju
sim sim
Ranch Hand

Joined: Jun 05, 2002
Posts: 55
Hi,
If you are using an app server like WebSphere or Weblogic, they will have an inbiult facility of DB connection pooling. Check up with yoour app server decumentation.
If you are going for a regular web-server, which is not an ideal situation, you can write your own Connection Pooling class here is one example form sun connection pooling
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
I use this one:
http://www.bitmechanic.com/projects/jdbcpool/
Sample code ships with download.
manju latha
Greenhorn

Joined: Jul 04, 2002
Posts: 28
thanx for the response sim,
iam using Jakarta-tomcat application server
and oracle using servlets for the database connections
so u said that application server have an inbuilt facility
of DB connection pooling. but how would my code be
in the servlet for the database connection object..??
also how many max connections do i set for Jakarta ??
and how to set it..??
can u pl. help me again by explaining this.
thanx alot.
sim sim
Ranch Hand

Joined: Jun 05, 2002
Posts: 55
Hi,
I dont have much exp with tomcat, are u sure tomcat is an app server ? To my knowledge it is not.
Check out the documentation for connection pooling, I am sure u will get some pointers. Documentation of weblogic is pretty good, but again it is for weblogic.
I am really sorry my friend, as I said, I dont have much exp with tomcat.
Eric Fletcher
Ranch Hand

Joined: Oct 26, 2000
Posts: 188
You can try DbConnectionBroker from JavaExchange.com. I've been using it on a relatively small scale app(i.e. ~100 users)and it works well so far. There are a couple implementation options explained in the readme that comes with the package.
Here is the link:
http://www.javaexchange.com/
Cheers
E


My theory of evolution is that Darwin was adopted. - Steven Wright
Mandar Risbud
Greenhorn

Joined: Jul 20, 2002
Posts: 1
Originally posted by manju latha:
thanx for the response sim,
iam using Jakarta-tomcat application server
and oracle using servlets for the database connections
so u said that application server have an inbuilt facility
of DB connection pooling. but how would my code be
in the servlet for the database connection object..??
also how many max connections do i set for Jakarta ??
and how to set it..??
can u pl. help me again by explaining this.
thanx alot.
 
 
subject: jdbc-servlets-connection pooling