4 Replies Latest reply on Feb 26, 2002 4:09 PM by Craig Demyanovich

    Session Bean and JDBC

    Nietsnie Newbie

      I have a stateless session bean that is doing some custom searching.

      When trying to get a database connection from the defaultds I run into a problem.

      Here's the code I'm using:

      InitialContext context = new InitialContext();
      DataSource source = (DataSource)context.lookup("jdbc/DefaultDS");
      return source.getConnection();

      Here's the error I'm getting from JBoss:

      [Default] javax.naming.NameNotFoundException: jdbc not bound


      What's that mean?

      BTW, this code works fine with a different container (OrionServer).


      Thanks

      Jeff Davey