Temporarily disable instrumentation during development.

pull/1/head
Brett Wooldridge 11 years ago
parent 1f5ab6c149
commit 99a3416bd3

@ -82,7 +82,7 @@ public class HikariPool implements HikariPoolMBean
PropertyBeanSetter.setTargetFromProperties(dataSource, configuration.getDataSourceProperties()); PropertyBeanSetter.setTargetFromProperties(dataSource, configuration.getDataSourceProperties());
HikariInstrumentationAgent instrumentationAgent = new HikariInstrumentationAgent(dataSource); HikariInstrumentationAgent instrumentationAgent = new HikariInstrumentationAgent(dataSource);
if (!instrumentationAgent.loadTransformerAgent()) if (true || !instrumentationAgent.loadTransformerAgent())
{ {
delegationProxies = true; delegationProxies = true;
LOGGER.info("Falling back to Javassist delegate-based proxies."); LOGGER.info("Falling back to Javassist delegate-based proxies.");

@ -84,23 +84,23 @@ public class HikariClassTransformer implements ClassFileTransformer
if (iface.equals("java.sql.Connection")) if (iface.equals("java.sql.Connection"))
{ {
transformConnection(classFile);
} }
else if (iface.equals("java.sql.PreparedStatement")) else if (iface.equals("java.sql.PreparedStatement"))
{ {
transformPreparedStatement(classFile);
} }
else if (iface.equals("java.sql.CallableStatement")) else if (iface.equals("java.sql.CallableStatement"))
{ {
transformCallableStatement(classFile);
} }
else if (iface.equals("java.sql.Statement")) else if (iface.equals("java.sql.Statement"))
{ {
transformStatement(classFile);
} }
else if (iface.equals("java.sql.ResultSet")) else if (iface.equals("java.sql.ResultSet"))
{ {
transformResultSet(classFile);
} }
} }
@ -113,6 +113,41 @@ public class HikariClassTransformer implements ClassFileTransformer
} }
} }
/**
* @param classFile
*/
private void transformConnection(ClassFile classFile)
{
}
/**
* @param classFile
*/
private void transformPreparedStatement(ClassFile classFile)
{
}
/**
* @param classFile
*/
private void transformCallableStatement(ClassFile classFile)
{
}
/**
* @param classFile
*/
private void transformStatement(ClassFile classFile)
{
}
/**
* @param classFile
*/
private void transformResultSet(ClassFile classFile)
{
}
/** /**
* *
*/ */

@ -24,8 +24,6 @@ import java.sql.SQLException;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import com.zaxxer.hikari.proxy.HikariClassTransformer;
/** /**
* System property testProxy can be one of: * System property testProxy can be one of:
* "com.zaxxer.hikari.JavaProxyFactory" * "com.zaxxer.hikari.JavaProxyFactory"
@ -43,8 +41,8 @@ public class CreationTest
config.setMinimumPoolSize(1); config.setMinimumPoolSize(1);
config.setAcquireIncrement(1); config.setAcquireIncrement(1);
config.setConnectionTestQuery("VALUES 1"); config.setConnectionTestQuery("VALUES 1");
// config.setDataSourceClassName("com.zaxxer.hikari.mocks.StubDataSource"); config.setDataSourceClassName("com.zaxxer.hikari.mocks.StubDataSource");
config.setDataSourceClassName("org.hsqldb.jdbc.JDBCDataSource"); // config.setDataSourceClassName("org.hsqldb.jdbc.JDBCDataSource");
HikariDataSource ds = new HikariDataSource(config); HikariDataSource ds = new HikariDataSource(config);

Loading…
Cancel
Save