> From: lightbulb432 [mailto:[EMAIL PROTECTED] > Subject: Application state in ServletContext > > The code cannot directly touch the ServletContext class, > but may do so through an interface (shown below). > > public class ApplicationState { > private static Map<String,Object> stateValues; > public static Object getStateValue(String key) { > return stateValues.get(key); > // return servletContext.getAttribute(key); > } > }
The above is not an 'interface' - it's a real class with a real implementation. Also, contrary to your preceding statement, it does not access the ServletContext, since that line is commented out. Due to the inconsistencies in your message, I don't think your questions can be answered. You should be concerned about synchronization, since Map (which actually is an interface) is not synchronized, although certain implementations of it are (e.g., Hashtable). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]