I'm using jboss 4.2 AS and I want to dynamically undeploy an MDB, what is the way to do it ? The MDB is defined using EJB 3.0 (@MessageDriven annotation) which means that the jboss deploys it automatically once it detects it in the classpath. I want to have control on whether the MDB is deployed or not. maybe utilizing JBoss specific MBean.