Forum Stats

  • 3,782,958 Users
  • 2,254,716 Discussions


Can not access the Instance Data of a Singleton class from MBean

I am working against the deadline and i am sweating now. From past few days i have been working on a problem and now its the time to shout out.

I have an application (let's call it "APP") and i have a "PerformanceStatistics" MBean written for APP. I also have a Singleton Data class (let's call it "SDATA") which provides some data for the MBean to access and calculate some application runtime stuff. Thus during the application startup and then in the application lifecysle, i will be adding data to the SDATA instance.So, this SDATA instance always has the data.

Now, the problem is that i am not able to access any of the data or data structures from the PerformanceStatistics MBean. if i check the data structures when i am adding the data, all the structures contains data. But when i call this singleton instance from the MBean, am kind of having the empty data.

Can anyone explain or have hints on what's happening ? Any help will be appreciated.

I tried all sorts of DATA class being final and all methods being synchronized, static, ect.,, just to make sure. But no luck till now.

Another unfortunate thing is that, i some times get different "ServicePerformanceData " instances (i.e. when i print the ServicePerformanceData.getInstance() they are different at different times). Not sure whats happening. I am running this application in WebLogic server and using the JConsole.

Please see the detailed problem at @

I see related problems but no real solutions. Appreciate if anyone can throw in ideas.

This discussion has been closed.