tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vara Prashanth" <>
Subject RE: Tomcat at the Enterprise Level
Date Mon, 08 Oct 2001 22:10:26 GMT
Hello all:

A few days ago I was having trouble with tomcat which would crash if I had
more connections. The problem was attributed to the driver bridge. I am now
trying to get my code to handle connection pooling with tomcat. I just
started of by writing a sample code (not web-based) which implements
connection pooling.

When ever I run the code I get some wierd exception.....the reason i know...

		try {
			Context ctx = new InitialContext();
			DataSource ds = (DataSource)ctx.lookup("jdbc/mydatasource");
			con = ds.getConnection("prash", "prash");

		} catch(java.lang.Exception e) {}

What does mydatasource in the above pseudo code point to? the file DSN,
system DSN, user DSN or something else. I used to do it the regualr way
before and everything worked well....but now...:(

can someone please explain what the lookup does and what I am supposed to
point it to?


Do You Yahoo!?
Get your free address at

View raw message