Hi guys,

For the Mobicent SIP Servlet project that is build on top of AS7, we have some CLI operations to list available SIP Servlet application, to gracefuly stop the context and the server. These operations work fine when the server runs in standalone mode using the command: 

But  when running in domain mode the command should be (sip subsystem belongs to the default profile) : 
But then we get an NPE because the context that the operation executes is not a normal server:
public void execute(OperationContext context, ModelNode operation)
throws OperationFailedException {

ModelNode result = context.getResult();
SipApplicationDispatcher sipApplicationDispatcher = StaticServiceHolder.sipStandardService.getSipApplicationDispatcher();
Iterator<SipContext> sipApps = sipApplicationDispatcher.findSipApplications();

} else {
throw new OperationFailedException(new ModelNode().set("Operation available only a Server"));

Is there a way we can specify a server node that the operation should execute?

Also, in standalone mode, we gracefuly shutdown the server and the contexts running using the following:
protected void shutdownServer() throws MalformedObjectNameException, NullPointerException, InstanceNotFoundException, MBeanException, ReflectionException, IOException{
MBeanServerConnection mbeanServerConnection = ManagementFactory.getPlatformMBeanServer();
ObjectName mbeanName = new ObjectName("jboss.as:management-root=server");
Object[] args = {false};
String[] sigs = {"java.lang.Boolean"};
mbeanServerConnection.invoke(mbeanName, "shutdown", args, sigs);

And this one fails when server runs in domain mode.

Any ideas?