1

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?

RayLeo
  • 11
  • 4

1 Answers1

1

You can do it through the JMX support of HornetQ locally or remotely. Here is a pretty good example: JEE7 + WildFly (HornetQ) - Pause queue from application

You can do this from within your app as well of course.

Community
  • 1
  • 1
highstakes
  • 1,499
  • 9
  • 14