1 23 24 package com.sun.enterprise.management.model; 25 26 import javax.management.ObjectName ; 27 import java.util.Set ; 28 29 30 public class JDBCDriverMdl extends J2EEManagedObjectMdl { 31 32 private static String MANAGED_OBJECT_TYPE = "JDBCDriver"; 33 private String jdbcDriverName ; 34 public JDBCDriverMdl(String name) { 35 super(name,false,false,false); 36 this.jdbcDriverName = name; 37 } 38 public JDBCDriverMdl(String name, String serverName) { 39 super(name,serverName,false,false,false); 40 this.jdbcDriverName = name; 41 } 42 43 public JDBCDriverMdl(String [] location) { 45 this(location[2], location[1]); 46 } 47 48 51 public String getj2eeType() { 52 return MANAGED_OBJECT_TYPE; 53 } 54 55 59 public String getobjectName() { 60 Set s = findNames("j2eeType="+getj2eeType()+",name="+this.jdbcDriverName+",J2EEServer="+getJ2EEServer()); 61 Object [] objs = s.toArray(); 62 if (objs.length > 0) { 63 String name = ((ObjectName )objs[0]).toString(); 64 return name; 65 } else { 66 return null; 67 } 68 } 69 } 70 | Popular Tags |