tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Merrill Cornish <>
Subject RE: Another Try at MySQL Connection Pooling
Date Wed, 11 Feb 2004 20:03:44 GMT

  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( 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?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message