This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Servlets and the fly likes getting hold of a classholder handle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "getting hold of a classholder handle" Watch "getting hold of a classholder handle" New topic
Author

getting hold of a classholder handle

Preetham Chandrasekhar
Ranch Hand

Joined: Nov 05, 2003
Posts: 98
sorry if i didnt phrase it right...but was wondering if this is possible and if it is the right approach...

I have a singleton class in the war file of my ear application. I need to get this singleton instance accessible through a mbean and reinitialize the singleton if I have to (have my own API which nullifies all the values in the singleton...etc). Since the web-app is laoded in its own classloader...I was wondering how do I get the handle to this classloader so that i can get the handle to the singleton...is this the right approach...or is there a better way to do this?

Thanks
Preetham


"In theory, there is no difference between theory and practice. But, in practice, there is."<br /> - Jan L.A. van de Snepscheut
 
GeeCON Prague 2014
 
subject: getting hold of a classholder handle