ManagedConnectionMetaDatapublic class ManagedConnectionMetaData extends Object implements javax.resource.spi.ManagedConnectionMetaDataManagedConnectionMetaData implementation for Generic JDBC Connector. |
Fields Summary |
---|
private DatabaseMetaData | dmd | private com.sun.gjc.spi.ManagedConnection | mc | private static Logger | _logger | private boolean | debug |
Constructors Summary |
---|
public ManagedConnectionMetaData(com.sun.gjc.spi.ManagedConnection mc)Constructor for ManagedConnectionMetaData
try {
this.mc = mc;
dmd = mc.getActualConnection().getMetaData();
} catch (SQLException sqle) {
_logger.log(Level.SEVERE, "jdbc.exc_md", sqle);
throw new ResourceException(sqle.getMessage());
}
|
Methods Summary |
---|
public java.lang.String | getEISProductName()Returns product name of the underlying EIS instance connected
through the ManagedConnection.
try {
return dmd.getDatabaseProductName();
} catch (SQLException sqle) {
_logger.log(Level.SEVERE, "jdbc.exc_eis_prodname", sqle);
throw new ResourceException(sqle.getMessage());
}
| public java.lang.String | getEISProductVersion()Returns product version of the underlying EIS instance connected
through the ManagedConnection.
try {
return dmd.getDatabaseProductVersion();
} catch (SQLException sqle) {
_logger.log(Level.SEVERE, "jdbc.exc_eis_prodvers", sqle);
throw new ResourceException(sqle.getMessage(), sqle.getMessage());
}
| public int | getMaxConnections()Returns maximum limit on number of active concurrent connections
that an EIS instance can support across client processes.
try {
return dmd.getMaxConnections();
} catch (SQLException sqle) {
_logger.log(Level.SEVERE, "jdbc.exc_eis_maxconn");
throw new ResourceException(sqle.getMessage());
}
| public java.lang.String | getUserName()Returns name of the user associated with the ManagedConnection instance. The name
corresponds to the resource principal under whose whose security context, a connection
to the EIS instance has been established.
javax.resource.spi.security.PasswordCredential pc = mc.getPasswordCredential();
if (pc != null) {
return pc.getUserName();
}
return mc.getManagedConnectionFactory().getUser();
|
|