How do I add a JNDI entry called "properties" in Glassfish on startup without using the admin?
In the code for our project ther开发者_StackOverflowe is this line:
(Properties) new InitialContext().lookup("properties")
One of the other developers said I had to add the entry through the admin for my instance of Glassfish. Having to use the admin to do this seemed suspect to me. Isn't there a way to add a JNDI entry at startup in web.xml, or something similar?
I think the idea here is that it must be done via the admin application so that the values aren't embedded in the application.
精彩评论