1 23 24 29 30 package com.sun.enterprise.management.model; 31 32 import javax.management.ObjectName ; 33 import java.util.Set ; 34 35 public class JCAManagedConnectionFactoryMdl extends J2EEManagedObjectMdl { 36 37 private static String MANAGED_OBJECT_TYPE = "JCAManagedConnectionFactory"; 38 private String jcaConnectionFactoryName = null; 39 40 public JCAManagedConnectionFactoryMdl(String connFactName) { 41 super(connFactName,false,false,false); 42 this.jcaConnectionFactoryName = connFactName; 43 } 44 public JCAManagedConnectionFactoryMdl(String connFactName, String serverName) { 45 super(connFactName, serverName, false,false,false); 46 this.jcaConnectionFactoryName = connFactName; 47 } 48 49 53 public String getj2eeType() { 54 return MANAGED_OBJECT_TYPE; 55 } 56 57 61 public String getobjectName() { 62 Set s = findNames("j2eeType="+getj2eeType()+",name="+this.jcaConnectionFactoryName+",J2EEServer="+getJ2EEServer()); 63 Object [] objs = s.toArray(); 64 if (objs.length > 0) { 65 String name = ((ObjectName )objs[0]).toString(); 66 return name; 67 } else { 68 return null; 69 } 70 } 71 72 } 73 | Popular Tags |