1 23 24 29 30 package com.sun.enterprise.admin.jmx.remote.server.callers; 31 32 import javax.management.MBeanServerConnection ; 33 import javax.management.ObjectName ; 34 import javax.management.remote.message.MBeanServerRequestMessage; 35 import javax.management.remote.message.MBeanServerResponseMessage; 36 37 43 public class CreateMBeanParamsCaller extends AbstractMethodCaller { 44 45 public CreateMBeanParamsCaller(MBeanServerConnection mbsc) { 46 super(mbsc); 47 METHOD_ID = MBeanServerRequestMessage.CREATE_MBEAN_PARAMS; 48 } 49 50 public MBeanServerResponseMessage call(MBeanServerRequestMessage request) { 51 Object result = null; 52 boolean isException = false; 53 try { 54 result = mbsc.createMBean( 55 (String )request.getParams()[0], 56 (ObjectName )request.getParams()[1], 57 (Object [])request.getParams()[2], 58 (String [])request.getParams()[3] 59 ); 60 } 61 catch(Throwable e) { 62 result = e; 63 isException = true; 64 } 65 return ( new MBeanServerResponseMessage(METHOD_ID, result, isException) ); 66 } 67 } | Popular Tags |