2013/3/16 Michael-O <[email protected]>: > Hi, > > I'd like to make a string available as an env entry via JNDI. The string is > static but must be created dynamically at startup time of the webapp. > > I have evaluated and implemented a listener which I have added to my > context.xml. It listens for startup and shutdown events. It works pretty > well. Rethinking this makes me ask whether a listener is the right thing to > do. > > Would an object factory a better approach for this? > Did I abuse the listener concept? > > Code is available for inspection. >
1. Tomcat version =? 2. Looking at docs, http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Environment%20Entries I do not see factory as an allowed attribute for environment entries. 3. Do you have control over code that uses the value? 4. Listeners are OK. I wonder though whether JNDI is modifiable or read-only at that point in time. If it works for you, then it is has to be modifiable. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
