File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes implementing connection pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "implementing connection pooling" Watch "implementing connection pooling" New topic
Author

implementing connection pooling

vignesh dhakshinamoorthy
Greenhorn

Joined: Jan 21, 2009
Posts: 12
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

Joined: Jan 10, 2002
Posts: 61420
    
  67

Please read this.

I have adjusted the topic title for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

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.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
vignesh dhakshinamoorthy
Greenhorn

Joined: Jan 21, 2009
Posts: 12
Thanks Joe.
I implemented Singleton pattern to achieve connection pooling.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: implementing connection pooling