Singleton instance
Hi all. I have developed a web application based on Struts 1.3.8 and the application is deployed on JBoss 4.0.5.GA.
I have four application configuration parameters that I need to access in different areas of my application. My solution has been to create a configuration object that is a singleton instance. When the application is loaded by the application server, I populate the singleton object with configuration parameters that are read from a database via my DAO. The application functions correctly, however, I am concerned about the use of the singleton pattern to store and provide the application configuration parameters. I have read that the JVM has one instance of the singleton object as expected. However, multiple JVMs will have multiple instances of the singleton object.
My questions are as follows:
1. Is the use of a singleton object for the purposes of storing application configuration parameters a good idea in a web application?
2. Is it possible that there will be multiple JVMs for the JBoss application server and therefore multiple instances of the singleton object?
3. Is there some other way to handle application configuration parameters?
Many thanks, Kenny

