1 22 package org.jboss.management.j2ee.factory; 23 24 import org.jboss.management.j2ee.JTAResource; 25 26 import javax.management.MBeanServer ; 27 import javax.management.ObjectName ; 28 29 35 public class JTAResourceFactory 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 = JTAResource.create(server, name, serviceName); 50 return jsr77Name; 51 } 52 53 60 public void destroy(MBeanServer server, Object data) 61 { 62 ObjectName serviceName = (ObjectName ) data; 63 String name = serviceName.getKeyProperty("service"); 64 JTAResource.destroy(server, name); 65 } 66 } 67 | Popular Tags |