THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
JNDI Provider using JAXB2
This XBean module (currently not released and in the sandbox) implements a JNDI context by parsing an XML configuration file using the excellent JAXB2 library.
...
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); |
There is an example XML file here.