This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Help With Connection Pool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Help With Connection Pool" Watch "Help With Connection Pool" New topic

Help With Connection Pool

Luke Shannon
Ranch Hand

Joined: Sep 30, 2004
Posts: 239

I am trying to get a connection pool running in my application. I get the error:

javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

Not sure what is going on here. Am I not getting a reference to the datasource in the correct way? Have I configured one of the files wrong? Any tips would be awesome.

Here is all my code.

server.xml (this context appears in the host tag)


Servlet Code:

[ August 24, 2005: Message edited by: Luke Shannon ]

Tom Blough
Ranch Hand

Joined: Jul 31, 2003
Posts: 263
I don't know if it is just a typo, but you have an extra "j" in the URL:

What server (Tomcat?) and version are you running under?

[ August 24, 2005: Message edited by: Tom Blough ]

Tom Blough<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr>Cum catapultae proscriptae erunt tum soli proscripti catapultas habebunt.<hr></blockquote>
Luke Shannon
Ranch Hand

Joined: Sep 30, 2004
Posts: 239
Hi Tom;

Testing this under Tomcat 5, but it might have to run in Tomcat 4 (not sure how hard it will be to upgrade the server yet).

I found this tutorial:

Based on that I made the following changes to my servlet method:

Everything work fine now :-)


I agree. Here's the link:
subject: Help With Connection Pool
It's not a secret anymore!