Class.forName(JDBC_DRIVER);
// Or you can use a spring SingleConnectionDataSource
// SingleConnectionDataSource realDataSource = new SingleConnectionDataSource(DriverManager.getConnection(JDBC_URL, TESTDB_USERNAME, TESTDB_PASSWORD), false);
JdbcDataSource realDataSource = new JdbcDataSource();
realDataSource.setURL(JDBC_URL);
realDataSource.setUser(TESTDB_USERNAME);
realDataSource.setPassword(TESTDB_PASSWORD);
Log4jdbcProxyDataSource proxyDataSource = new Log4jdbcProxyDataSource(realDataSource);
Connection proxyConnection = proxyDataSource.getConnection();
Statement st = proxyConnection.createStatement();