It says the mbean is already registered.
Did you throw an Exception from preDeregister?
no, I did not throw any Exception, neither did I implement this method. My MBean is just a simple JavaBean, like the first example in the JBoss docs. Do I manually have to deregister the MBean, means react to some callback - method?
What confuses me a little bit is this: When I remove my .sar - directory from the deploys directory, JBoss tells my in the console that the service is undeployed. I also do not see the MBean in the web-console anymore. Now, if i put the directory again in the deploy directory, I get the Exception that the MBean is already registered ... ?
How can it be that the MBean stays registered, but I do not see it in web-console anymore?
Maybe I am getting things wrong here, any hint would be appreciated.
Thanks for your help!
Post the log for the deployment and the -service.xml
I just found the error, and I must blame myself for my own stupidity ;) While playing with the service descriptor I copied one in my .sar/META-INF directory, while another version was still lying around in the deploy directory. So JBoss was absolutely right when complaining about the already regsitered MBean. Mea culpa.
Sorry for this post, I could have found the error by myself. Thanks anyway for the replies!