Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class for database connectivity !

 
Mayank C
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well.. you can download the class from www.javaexchange.com.
give it a try... hope it helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic