1 Reply Latest reply on Apr 14, 2004 10:06 AM by Nicholas Whitehead

    Running standalone clients

    Rafael Newbie

      Hello,
      I'm trying to run a standalone client to access ejbs.
      When I try to obtain a context I receive a FileNotFoundException at this line: Context ctx = new InitialContext();
      The file is myapp/config/security.properties.

      What is wrong?

      What I must to config to make this work?

      Thanks

        • 1. Re: Running standalone clients
          Nicholas Whitehead Novice

           

          import java.util.*;
          import javax.naming.*;
          .
          .
           Properties p = new Properties();
           p.put(Context.PROVIDER_URL, "jnp://localhost:1099");
           p.put(Context.INITIAL_CONTEXT_FACTORY,
           "org.jnp.interfaces.NamingContextFactory");
           p.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
           ctx = new InitialContext(p);