File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Class for database connectivity ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Class for database connectivity !" Watch "Class for database connectivity !" New topic

Class for database connectivity !

Mayank C

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

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.
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
well.. you can download the class from
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
I agree. Here's the link:
subject: Class for database connectivity !
It's not a secret anymore!