I want to be able to look up various
string values using JNDI in a MessageListener class. For example I want to be able to store the database username and password, a queue name, queue owner, port number, etc. I am already doing this in some EJBs since I can specify the JNDI entries using <env-entry>, but I don't know how I would specify JNDI entries for a class which isn't an
EJB, since I won't be declaring environment entries for the class in an ejb-jar.xml file. How is this done ? Should I be using JNDI for lookups of String values, or is there another approach which is better for this sort of thing ? Essentially I want to have a place outside of the
Java sources where I can modify variable values (properties ?) at deploy time, and have these read into my code using JNDI lookups (or some other mechanism if more appropriate). It doesn't appear that this can be done for non-EJB classes in either ejb-jar.xml or jboss.xml.
Thanks in advance for any suggestions.
-James