This content has been marked as final. Show 1 reply
The jndi.properties file is for configuring the jndi system, i.e tell it where the JNDI server is etc. In other words you do not bing your properties there.
To bind stuff to JNDI, you need to do something along the lines of:
String myname = "something/test/TestObj"; Object obj = "Xyz"; InitialContext ctx = new InitialContext(); Name name = ctx.getNameParser("").parse(myname); ctx.bind(name, obj);
(java: at the start of a name means that the property should not be accessible outside the JVM)