Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 23, 2012, 04:41:58 PM

Pages: [1]   Go Down
  Print  
Author Topic: Database connection pool  (Read 584 times)
bjorn
Newbie
*
Offline Offline

Posts: 1


WWW
« on: September 05, 2002, 05:58:00 AM »

How can I create a connection pool to the MySQL database from a servlet on the jupiter server?  I already have a DbConnectionBroker connection pool on my personal computer, but logging into to the database is different at lunarpages than on a non-shared server.
So my questions are can I create a connection pool, if so can I do it using the DbConnectionBroker from www.javaexchange.com, and how do I do it.
On my computer I would use the following
DbConnectionBroker dbPool = DbConnectionBroker("org.gjt.mm.mysql.Driver", jdbc:mysql://<host>:<port>/"<dbName>", "<UserID>", "<Password>", 5, 50, "dbconn.log", 1.0);
How would this vary to creating a connection pool at lunarpages?
Logged
Kelvin
Jabba the Hutt
*****
Offline Offline

Posts: 737



« Reply #1 on: September 07, 2002, 09:55:00 PM »

I ain't had chance to play with the DbConnectionBroker (yet!) but you'll probably find that all it does is create a DB connection in a standard way and then adds the connection reference to some Enumerator - if so then it should work exactly the same way as you use it at home.

I just noticed that I didn't quite answer your question,  the code you need is something like this

DbConnectionBroker ("org.gjt.mm.mysql.Driver","jdbc:mysql://localhost/", "<dbName>", "<UserID>", "<Password>", 5, 50, "dbconn.log", 1.0); //

You see what I mean about how it should be the same? you still use "localhost" and the same port (you should not need this though).
 
 [ September 19, 2002, 10:35 AM: Message edited by: EXiL3 ]
Logged

Kelvin

"Failure is not an option. It comes bundled with the software."
kianwatt
Pong! (the videogame) Master
*****
Offline Offline

Posts: 22


WWW
« Reply #2 on: September 15, 2002, 05:25:00 PM »

Hi,

I am using exactly the same connection pool here and would like to know if you can add it into your jdk installtion directory so that your customers may use it?
Logged
Kelvin
Jabba the Hutt
*****
Offline Offline

Posts: 737



« Reply #3 on: September 16, 2002, 04:00:00 PM »

A noble idea; but unfortunately this would place more of a burden on the Admins, they would need to check/upgrade these "requested" libraries each time the jdk got upgraded - besides, if you upload them yourself then you keep more control over it.
Logged

Kelvin

"Failure is not an option. It comes bundled with the software."
Pages: [1]   Go Up
  Print  
 
Jump to: