Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
Win a copy of Create an Uber Clone in 7 Days: Build a real world full stack mobile app in Java this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jdbc simple connection pool problem  RSS feed

Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone, trying to do a simple connection pooling example. This is my code and the error message I get. I am using visual age, and running websphere test environment in it. Also, if it means something I am using running my app with struts as the controller.......
in init method of servlet that gets executed while websphere it starting up, i say --> ds = new;
try {
Context ctx = new InitialContext();
ctx.bind("jdbc/docserverDB", ds);
} catch (NamingException nme) {
it throws the following exception on the line InitialContext();
javax.naming.ConfigurationException: URLToObjectFacility.badProtocoldocserver:1099
So I added the following lines in.
Hashtable hash = new Hashtable();
hash.put(Context.INITIAL_CONTEXT_FACTORY, "");
and then changed the line saying new InitialContext(hash);
I then still got the same exception.
Can anyone please shed some light as to what I'm doing wrong.
All I want is to be able to use the connection pooling part of jdbc 2.0 (or 3.0) using mySql driver in my webapp.
Thanks for your replies
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Soryy but I have no idea. I am using connection pooling, but using the class that I downloaded in (DBConnectionBroket). it is really easy..
hope it helps..
Is that a spider in your hair? Here, threaten it with this tiny ad:
Why should you try IntelliJ IDEA ?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!