1 Reply Latest reply on Oct 29, 2002 5:20 PM by Greg Turner

    JNDI problems on a standalone app

    john peel Newbie

      Hi there,

      I'm trying to lookup for the JBoss Mail connection factory from a standalone program (I mean something that doesn't run in the JBoss VM). The Mail-Connection-Factory jndi name is bound to "java:/Mail". However, I always get a 'javax.naming.NameNotFoundException: Mail not bound' message, but it works within the Jboss VM.

      My client jndi.properties file looks like:

      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
      java.naming.provider.url=127.0.0.1

      And, I simply wrote :
      InitialContext ctx = new InitialContext();
      Object oMail = ctx.lookup("java:/Mail");


      So, Why can't I find the mail factory outside Jboss?