1 23 24 package com.sun.enterprise.management.model; 25 26 import java.util.*; 27 import javax.management.ObjectName ; 28 29 public class JDBCResourceMdl extends J2EEResourceMdl { 30 31 private static String MANAGED_OBJECT_TYPE = "JDBCResource"; 32 33 public JDBCResourceMdl(String name) { 34 super(name); 35 } 36 public JDBCResourceMdl(String name, String serverName) { 37 super(name,serverName); 38 } 39 40 public JDBCResourceMdl(String [] location) { 42 this(location[2], location[1]); 43 } 44 45 public String [] getjdbcDataSources() { 46 47 Set s = findNames("j2eeType=JDBCDataSource,JDBCResource="+getname()); 48 Iterator it = s.iterator(); 49 String [] ret = new String [s.size()]; 50 int i =0; 51 while(it.hasNext()) { 52 ret[i++] = ((ObjectName )it.next()).toString(); 53 } 54 return ret; 55 } 56 57 60 public String getj2eeType() { 61 return MANAGED_OBJECT_TYPE; 62 } 63 64 } 65 | Popular Tags |