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

implementing connection pooling

 
vignesh dhakshinamoorthy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Requirement:

STORED PROCEDURES:
==================

I have oracle Database as my back end. Presently i am using Prepared Statement to execute oracle queries.

For a good coding practice, i want to use Stored Procedures & call them from Java servlets.

How to do that?

CONNECTION POOLING:

===================

Every time i access the DB, i will create a new connection object which is not a good practice.

How to implement Connection Pooling in Java servlets.

======================================================================
Any Sample Code will be really helpful for both
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65228
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this.

I have adjusted the topic title for you.
 
Joe Ess
Bartender
Posts: 9320
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vignesh dhakshinamoorthy wrote:
For a good coding practice, i want to use Stored Procedures & call them from Java servlets.
How to do that?


Have a look at CallableStatement

vignesh dhakshinamoorthy wrote:
How to implement Connection Pooling in Java servlets.


Are you using Tomcat (I assume since you posted in the Tomcat forum)? Take a look at the JNDI how-to for the basics and the datasource how-to for some examples.
 
vignesh dhakshinamoorthy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Joe.
I implemented Singleton pattern to achieve connection pooling.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic