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

Pleaes Help: Structs and Connection Pooling...

 
Vee Jay
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
 
Julian Sitkevich
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vee Jay,
The Sun Developer website has a good article on Connection Pooling.
- jsitke
 
Kevin Pang
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • 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
 
Sarath Mohan
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • 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
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My suggestion is, use DBCP from Apache.
 
Poobhathy Kannan
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • 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
 
SeaGizmo
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic