• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Singleton Pattern

 
Balaji Nagarajan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i implement a Singleton in a J2EE application(for server side classes)?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Gustavo Adolpho Bonesso
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic