| Author |
Singleton Pattern
|
Balaji Nagarajan
Greenhorn
Joined: Jul 15, 2002
Posts: 4
|
|
|
How do i implement a Singleton in a J2EE application(for server side classes)?
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
This is a common question to which there is no standard answer as far as I know. The problem is that the application may reside in a clustered environment made of several JVMs. Here are some resources related to the subject: J2EE Singleton pattern at TheServerSide.com JBoss clustering / singleton services J2EE singleton by javaspecialists.co.za
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
Gustavo Adolpho Bonesso
Ranch Hand
Joined: May 11, 2002
Posts: 103
|
|
|
I agree with Lasse, but if you are in a enviroment with a single JVM, the Singleton Pattern is usefull to make DAO�s (Data Access Objects).
|
Gustavo Adolpho Bonesso<br />SCJP1.4
|
 |
 |
|
|
subject: Singleton Pattern
|
|
|