Wednesday, 15 July 2015

java - How to populate JNDI directory programatically in Jetty? -



java - How to populate JNDI directory programatically in Jetty? -

i successful inserting , finding objects in jndi directory across apps running in same jvm with:

initialcontext initialcontext = new initialcontext(); initialcontext.bind("xpto",this); object obj = initialcontext.lookup("xpto");

still want organise namespace , hence bind objects like:

initialcontext initialcontext = new initialcontext(); initialcontext.bind("/aaa/xpto",this); object obj = initialcontext.lookup("/aaa/xpto");

and failing with

javax.naming.namenotfoundexception: aaa not bound

i understand may need more create "aaa" node, can't find anywhere is... of jetty documentation refers statically defined objects not want. can point me in right direction ?

it sounds want dynamically create name/value pairs (resource name/resource value) @ runtime, share them between different processes.

if so, mongodb (or it) might you're looking for.

here's brief tutorial:

http://www.mkyong.com/tutorials/java-mongodb-tutorials/

java jetty jndi

No comments:

Post a Comment