jbossjboss-cli

How to monitor and control MBDs from JBOSS Domain Mode (List, stopDelivery StartDelivery)


I want to list information about, start and stop the delivery of MDBs running in several servers. This page https://access.redhat.com/solutions/428023

shows how to stop and start MDB's delivery in standalone mode:

[standalone@localhost:9999 /] /deployment=MDBStopDeliveryApplication.jar/subsystem=ejb3/message-driven-bean=TestMDB:start-delivery(){"outcome" => "success"}
[standalone@localhost:9999 /] /deployment=MDBStopDeliveryApplication.jar/subsystem=ejb3/message-driven-bean=TestMDB:stop-delivery()

Can this be done in domain mode for all the servers? if so how?

[domain@ ip :9999 /] /deployment=name.ear/subsystem=ebj3/whatever
[domain@ ip :9999 /] /deployment=name.ear/subsystem=ebj3:whatever()

I can't do any operation on the subsystem=ebj3, or any of it's children. And TAB for completion is also doing nothing. The result of any operation is always:

{
    "outcome" => "failed",
    "failure-description" => "JBAS014883: No resource definition is registered for address [
    (\"deployment\" => \"name.ear\"),
    (\"subsystem\" => \"ebj3\")
]",
        "rolled-back" => true
}

Solution

  • In domain mode, you can not query or manipulate these atributes globally. Your configuration is stored in a profile, the profile is assigned to a server-group and then a server instance is assigned to the group. Servers are running on a host, which acts as a slave connected to a domain controller. There can be multiple hosts running on different machines and each host can manage server instances assigned to different groups. In order to achieve your goal you need to execute those commands on each server where your application is deployed. If you want to automate it you can first query list of servers belonging to server group and then iterate over them for example in a bash script invoking CLI. To query this info for specific server just prefix your command with /host=<your_host>/server=<your_server>/