use Singleton class in Application server
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   arun_nair
Posted On:   Thursday, March 22, 2001 06:36 AM

Hi all, I have a requirment like this. "Read the application property file and make it accessible to all other modules in a global way. The final deployment is gonna be on an clustered application server environment". I was thinking to have a singleton pattern which reads the property file in the constructor and make the single instance available to all other modules thru a public method. I am not sure the approch is correct or not. But thinking the deployment gonna happens in a clustered environment .. i have a doubt of implementing a single object pattern. Can anyone help me to 1. correct the usage of singleton in this scenario. 2. If there is a work around for singleton pat   More>>

Hi all,

I have a requirment like this.

"Read the application property file and make it accessible to all other modules in a global way. The final deployment is gonna be on an clustered application server environment".

I was thinking to have a singleton pattern which reads the property file in the constructor and make the single instance available to all other modules thru a public method. I am not sure the approch is correct or not. But thinking the deployment gonna happens in a clustered environment .. i have a doubt of implementing a single object pattern.


Can anyone help me to
1. correct the usage of singleton in this scenario.

2. If there is a work around for singleton pattern in clustered server environment, please feed me that

We gonna use weblogic 6 as the final deployment environment.

help please asap

cheers
arun

   <<Less

Re: use Singleton class in Application server

Posted By:   Dion_Almaer  
Posted On:   Monday, April 2, 2001 12:17 AM

It seems that you only need *read* access to the properties file. If that is the case you could have a weblogic startup class that loads the properties file into a singleton. Every server in the cluster will have it's own singleton of cos... but that doesn't really matter if you are readonly.

Dion
About | Sitemap | Contact