wood burning stoves*
The moose likes JDBC and the fly likes Class for database connectivity ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Class for database connectivity !" Watch "Class for database connectivity !" New topic
Author

Class for database connectivity !

Mayank C
Greenhorn

Joined: Jul 18, 2002
Posts: 7
Hi ,
Can I have a java class , which will accept one oracle connection and return an array of connections which will be used to do database transactions . All these connections , should use the main connection for querying.
Can someone provide the class ?
Your help will be highly appreciated .
Also , is there any way to break a connection into number of connections which can run the queries in parallel ?
Thanks one again .
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Sounds like what you should be looking at is a Connection Pooling mecahnism of some sort.
I'm not sure you can do it the way you want - you can't 'clone' database connections. ie given a connection, create others with the same properties. One reason for this is that the original may have been created with a username and password, and you are not allowed to access this.
Dave
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
well.. you can download the class from www.javaexchange.com.
give it a try... hope it helps.


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
 
 
subject: Class for database connectivity !
 
Similar Threads
open database connection
Connection
Connection Pool (standalone/server)
When does JBoss create the connection pool?
why should i use connection pooling ?