JDBCDataSourceMdlpublic class JDBCDataSourceMdl extends J2EEManagedObjectMdl
Fields Summary |
---|
private static String | MANAGED_OBJECT_TYPE | private String | jdbcDataSourceName | private String | driverName | private boolean | debug | private String | username | private String | password | private String | url | private String[] | propNames | private String[] | propValues |
Constructors Summary |
---|
public JDBCDataSourceMdl(String dataSourceJndiName, String dataSourceName, String url, String username, String password, String[] propNames, String[] propValues)
super(dataSourceJndiName,false,false,false);
this.jdbcDataSourceName = dataSourceName;
this.url = url;
this.username = username;
this.password = password;
this.propNames = propNames;
this.propValues = propValues;
| public JDBCDataSourceMdl(String dataSourceJndiName, String serverName, String dataSourceName, String url, String username, String password, String[] propNames, String[] propValues)
super(dataSourceJndiName,serverName,false,false,false);
this.jdbcDataSourceName = dataSourceName;
this.url = url;
this.username = username;
this.password = password;
this.propNames = propNames;
this.propValues = propValues;
|
Methods Summary |
---|
public java.lang.String | getJDBC()Accessor method for the parent key
return getname(); //matches name of JDBCResource in this impl
| public java.lang.String | getj2eeType()The type of the J2EEManagedObject as specified by JSR77. The class that implements a specific type must override this method and return the appropriate type string.
return MANAGED_OBJECT_TYPE;
| public java.lang.String | getjdbcDataSourceName()
return jdbcDataSourceName;
| public java.lang.String | getjdbcDriver()
if (driverName == null) {
Set s;
try {
//System.out.println("getjdbcDriver: jdbcDataSourceName = " + jdbcDataSourceName);
java.sql.Driver drv = java.sql.DriverManager.getDriver(jdbcDataSourceName);
//System.out.println("java.sql.Driver = " + drv.getClass().getName());
s = findNames("j2eeType=JDBCDriver,name="+drv.getClass().getName());
} catch(java.sql.SQLException e) {
//XADataSource
s = findNames("j2eeType=JDBCDriver,name="+jdbcDataSourceName);
}
Object [] objs = s.toArray();
if (objs.length > 0) {
String name = ((ObjectName)objs[0]).toString();
driverName = name;
}
}
return driverName;
| public java.lang.String | getpassword()
return password;
| public java.lang.String[] | getpropNames()
return propNames;
| public java.lang.String[] | getpropValues()
return propValues;
| public java.lang.String | geturl()
return url;
| public java.lang.String | getusername()
return username;
|
|