2 Replies Latest reply on Feb 17, 2004 9:28 AM by Andrew Oliver


    Walter Newbie

      hi, my questions is the next: how I doing to get the initialcontext in Jboss 3.2.x ??? I'm start up JBoss with option -c all.

      Thank you

        • 1. Re: InitialContext
          Brad Balmer Newbie

          How about:
          String IP = ?;
          String PORT = ?;

          Hashtable props = new Hashtable();
          props.put(Context.PROVIDER_URL, IP + ":" +PORT );
          Context jndiContext = new InitialContext(props);

          • 2. Re: InitialContext
            Andrew Oliver Master

            Context naming = new InitialContext(); should do the trick within jboss. You do not need to/shold not provide properties in that case. However if you mean remotely, you should supply a jndi.properties file in the classpath first. Or you can do as the poster suggested below, the jndi properties gives you less rigid code. http://jboss.org/wiki/Wiki.jsp?page=AccessEJBsRemotely