• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Pleaes Help: Structs and Connection Pooling...

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,
I am seeking help from our experienced fellows and senior programmers/developers.
I am working with Struts framework, TomCat and JavaBeans and developing a website.
I wanna make my own Connection Pooling class to handel all the connections.
Actualy, I don't wanna make Connection to the DB through my each Action Classes,
which are accessing the Database.
Would you please advise me that how it is possible and how I will refere to
my Connection Pooling Class within Struts framework. And if possible just give the
hints about the structure of the Connection Pooling Class.
Your kind help will be highly appreciated...
VeeJay...
veejay313@yahoo.com
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vee Jay,
The Sun Developer website has a good article on Connection Pooling.
- jsitke
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,i follow the example as your mentioned from the link:
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/conpool.html#drive

but when i compiled i got the error message,why so?

D:\JSP\exercise\WEB-INF\classes\pool>javac *.java
JDCConnection.java:7: pool.JDCConnection is not abstract and does not override a
bstract method prepareStatement(java.lang.String,java.lang.String[]) in java.sql
.Connection
public class JDCConnection implements Connection {
^
1 error
 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why can't you use the datasource facility provided by Struts frame work itself.

It's simple and more easy to implement if you don't go for a seperate connection pooling mechanism
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My suggestion is, use DBCP from Apache.
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can try Tomcat's connection pool as well.
Have a look on this..http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Poobhathy Kannan:
you can try Tomcat's connection pool as well.
Have a look on this..http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html



Have you taken a look at iBatis. It's pretty good.

SG
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"SeaGizmo",

Welcome to JavaRanch. We don't have many rules here, but we do have a naming policy which we strictly enforce. Please re-read this policy, which was presented to you when you created your account, and edit your display name in order to comply. Thanks in advance and we look forward to seeing you around the Ranch.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic