tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: Another Try at MySQL Connection Pooling
Date Wed, 11 Feb 2004 20:46:07 GMT
Merrill,
you should be absolutely sure that your context is getting loaded from 
the file you think. Make sure that there is no context config for the 
app in any of the other files in tomcat/conf/Catalina/localhost, nor in 
server.xml, nor in META-INF in any webapp directory.

You can chuck out the <resource-ref> from the web.xml - I'm using 3 JNDI 
connection pools and I don't have it in my web.xml (is that macho?) - 
just don't ask me why.

Adam

On 02/11/2004 09:13 PM Burgess, Jay S wrote:
> The J2EE tutorial is one place that talks about the context naming
> scheme:
> 
>     http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Resources2.html
> 
> And just to be 100% sure, my example below actually has a minor
> cut-and-paste error--there's a space after TimesheetsDB in the second
> lookup().  If you simply cut-and-pasted my example, and it turns out
> that the string has to be an exact match, then this could be an issue.
> 
> Probably not, but worth mentioning, just in case.
> 
> Jay
> 
> -----Original Message-----
> From: Merrill Cornish [mailto:merrill.cornish@earthlink.net] 
> Sent: Wednesday, February 11, 2004 2:04 PM
> To: Tomcat Users List
> Subject: RE: Another Try at MySQL Connection Pooling
> 
> Jay,
> 
>   Context initialContext = new InitialContext();
>   Context envContext = (Context) initialContext.lookup("java:comp/env");
>   this.dataSource = (DataSource) envContext.lookup("jdbc/TimesheetsDB
> ");
> 
> Ah ha!  I was missing the second step.  When I added the second step, it
> still fails, but the complaint has changed.  Slightly.
> 
>    "At org.apache.naming.NamingContext.lookup(NamingContext.java:814)
> there occurred a
>     javax.naming.NameNotFoundException: Name TimesheetsDB is not bound
> in this Context"
> 
> So now it can find "jdbc", but not "TimesheetsDB".
> 
> By the way, what does the "java:comp/env" argument mean?
> 
> 
> Merrill
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message