I know a way to stop MDB in wildly by command line, which is setup the DeliveryActive status to be ture, then
[standalone@localhost:9990 /] cd deployment=jboss-helloworld-mdb.war/subsystem=ejb3/message-driven-bean=HelloWorldMDB
[standalone@localhost:9990 message-driven-bean=HelloWorldMDB] :stop-delivery
{"outcome" => "success"}
[standalone@localhost:9990 message-driven-bean=HelloWorldMDB] :start-delivery
{"outcome" => "success"}
According to this way, I think there must be a pragmatically way to invoke the MDB inside the EJB container, then do stop-delivery and start-delivery from MDB instance. But my issue is I cant find MDB by context.lookup(properties). Is this a possible way to do this?