Methods Summary |
---|
public void | detectJDBC30Connection(java.sql.Connection con, com.sun.gjc.spi.ManagedConnection mcObject)
String dataSourceProperty = mcObject.getManagedConnectionFactory().getJdbc30DataSource();
if (dataSourceProperty != null) {
setJdbc30Connection(Boolean.valueOf(dataSourceProperty));
initJDBC30Connection = true;
} else {
try {
Class paramClasses[] = new Class[]{Class.class};
Method isWrapperMethod = con.getClass().getMethod("isWrapperFor", paramClasses);
int modifiers = isWrapperMethod.getModifiers();
setJdbc30Connection(Modifier.isAbstract(modifiers));
} catch (NoSuchMethodException e) {
setJdbc30Connection(true);
} catch (AbstractMethodError e) {
setJdbc30Connection(true);
} catch (Throwable t) {
setJdbc30Connection(true);
_logger.log(Level.WARNING, "jdbc.unexpected_exception_on_detecting_jdbc_version", t);
} finally {
initJDBC30Connection = true;
}
}
|
public com.sun.gjc.spi.base.ConnectionHolder | getConnection(java.sql.Connection conObject, com.sun.gjc.spi.ManagedConnection mcObject, javax.resource.spi.ConnectionRequestInfo criObject, boolean statementWrapping)To get an instance of ConnectionHolder40.
Will return a ConnectionHolder40 with or without wrapper
_logger = LogDomains.getLogger(LogDomains.RSR_LOGGER);
ConnectionHolder connection = null;
if (!initJDBC30Connection) {
detectJDBC30Connection(conObject, mcObject);
}
if (statementWrapping) {
connection = new ConnectionWrapper40(conObject, mcObject, criObject, jdbc30Connection);
} else {
connection = new ConnectionHolder40(conObject, mcObject, criObject, jdbc30Connection);
}
return connection;
|
public javax.sql.DataSource | getDataSourceInstance(com.sun.gjc.spi.ManagedConnectionFactory mcfObject, javax.resource.spi.ConnectionManager cmObject)Returns a DataSource instance for JDBC 4.0
return new DataSource40(mcfObject, cmObject);
|
public boolean | isJDBC30ConnectionDetected()
return initJDBC30Connection;
|
public boolean | isJdbc30Connection()
return jdbc30Connection;
|
public void | setJdbc30Connection(boolean jdbc30Connection)
this.jdbc30Connection = jdbc30Connection;
|