Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: update with provider url and context factory

...

Code Block
Properties props = new Properties();
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
props.setProperty(Context.PROVIDER_URL, "ejbd://localhost:4201");
props.setProperty(Context.SECURITY_PRINCIPAL, "someuser");
props.setProperty(Context.SECURITY_CREDENTIALS, "thepass");
props.setProperty("openejb.authentication.realmName", "PropertiesLogin"); // optional
InitialContext ctx = new InitialContext(props);
ctx.lookup(...);

...