you need to explain a bit more.
Why is the session bean calling the mbean, which in tern calls the singleton?
It's supposed to be the other way around. The singleton is automatically started and stopped on the master node.
Explain a bit more about what needs to happen from a functionality perspective.
Until now the application is hosted by a standalone JBoss. In this instance I have a singleton that can read and write data that may only occur once in the server.
Now I'm migrating the application to a JBoss cluster. So I wanted to let this clusterwide unique data be handled by the singleton service. I have taken the example from your article and have extended it so it writes to the DistributedState Service.
Now I have the problem that I have no possibility to get the instance to the current master node to get a reference to the master singleton. I need this reference because I thought, only the singleton instance on the master node may change the data.
I have talked to Peter Diesler now at the advanced training in Frankfurt, and he told me that I didn't have to worry about the singleton instance of the master node because the service would take responsibility that the data it writes is unique. But then I don't understand what the singleton service does exactly.
Could you please explain me how I can use the SingletonService from your article to hold clusterwide unique data in the applicationserver? I think that could clarify a lot.
Thank you very much so far!