tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reynir Hübner <>
Subject RE: JDBC Problems....(third posting)
Date Tue, 16 Oct 2001 08:28:50 GMT
ok well...
obviously you are trying to look up Datasource connection object from
the InitialContext, but it seems to be keept there with the key
The context has a hireachial setup, so under jdbc you could be haveing
many keys.

So this might mean, that some thread, servlet or something has put the
DataSource object into the context before this code is executed. 

but on the other hand, I would recomend to you to check out other
connection pools, such as POOLMAN or bitmechanic jdbc-pool.
Those are both free and opensource and have been tested in some hundreds
of applications so they must have some reliability by now.

hope it helps,

-----Original Message-----
From: Vara Prashanth []
Sent: 15. október 2001 20:28
Subject: JDBC Problems....(third posting)

My third posting of the same message...can someone please answer it? I
be happy if someone can point me to some website atlease.....

Hello all:

I am trying to implement connection pooling in my applications and need

I started off by studying the small piece of code......

		Connection con = null;
		Statement stmt = null;
		try {
			Context ctx = new InitialContext();
			DataSource ds =
			con = ds.getConnection("login", "pwd");

		} catch(java.lang.Exception e) {

The basic question I had is what "jdbc/prash1" means? I used to use the
normal DriverManager class to get connected to a database. In that case,
create a new System DSN mapping to the database. But now I am confused
if it
the same in case of datasource too. If it is then what does "jdbc/"
mean? Do
I have to map it someplace in web.xml/server.xml of tomcat? Can someone
please take some time to explain how I should be using datasource (if it
anything to with tomcat)


Do You Yahoo!?
Get your free address at

View raw message