1 22 package org.jboss.management.j2ee.factory; 23 24 import org.jboss.management.j2ee.RMI_IIOPResource; 25 26 import javax.management.MBeanServer ; 27 import javax.management.ObjectName ; 28 29 35 public class RMIIIOPResourceFactory 36 implements ManagedObjectFactory 37 { 38 45 public ObjectName create(MBeanServer server, Object data) 46 { 47 ObjectName serviceName = (ObjectName ) data; 48 String name = serviceName.getKeyProperty("service"); 49 ObjectName jsr77Name = RMI_IIOPResource.create(server, name, serviceName); 50 return jsr77Name; 51 } 52 53 59 public void destroy(MBeanServer server, Object data) 60 { 61 ObjectName serviceName = (ObjectName ) data; 62 String name = serviceName.getKeyProperty("service"); 63 RMI_IIOPResource.destroy(server, name); 64 } 65 } 66 | Popular Tags |