Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To use this JNDI provider just set the initial context factory then point the PROVIDER_URL to the XML configuration file URL.e.g.

Example

Code Block
Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL, "file:foo/bar.xml");
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.xbean.jaxb.jndi.JaxbInitialContextFactory");
InitialContext context = new InitialContext(env);

...