My MBean debpends on serverl EBJ's. When i redeploy my EJB i get the well known classcastexpetion.
FOr this reason i like to deploy and undeploy the Mbean and the EJB's in the same archive.
Waht is the best way to do this ?
Create an ear with META-INF/jboss-app.xml
You will need a on the ejb
to make sure the ejb starts first.
Use Russian doll packaging.
Create a .sar with an ejb.jar inside.
The ejb.jar is deployed first.