This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes ClassLoader in Struts & Singleton Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ClassLoader in Struts & Singleton" Watch "ClassLoader in Struts & Singleton" New topic
Author

ClassLoader in Struts & Singleton

Makeshkumar Subramaniam
Greenhorn

Joined: Aug 09, 2008
Posts: 21

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 ;-)


cheers,
Makesh.

[URLyBird1.1.1 - > just started]
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ClassLoader in Struts & Singleton