Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Pooling intance

 
Ravi Shankar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I setup the JDBC pooling successfully as mentioned in tomcat website. Put the context.xml in META-INF file. Everything is working fine, i am able to access database. The problem now is everytime i call
ds.getConnection(). It's creating a new intance in oracle under linux.

Is it normal??. And the isntances leave hanging eventhough i closed the connection successuly once i finished querying. Shouldn't it get the existing connection opened rather than creating another instance.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Phnatom Menace",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic