This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting hold of a classholder handle

 
Preetham Chandrasekhar
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic