Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ClassLoader in Struts & Singleton

 
Makeshkumar Subramaniam
Greenhorn
Posts: 21
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi mates,
I am programming a Singleton class that actually holds some configuration-information for my struts application. By doing so, i eventually come to know that ClassLoaders may create more than one singleton objects..And My question is that Struts Controller (1.2 what i'm using) loads the action classes using classloaders ? if so, is there will be two/or more singleton objects created ?

Thanks in advance ;-)
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you programming the configuration data as a Singleton class?

Aside, classloaders do no instantiate (create) objects, they only load classes. There is a difference.
[ December 15, 2008: Message edited by: James Clark ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic