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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to