Skip to content

Instantly share code, notes, and snippets.

@Kuassim
Last active August 30, 2019 21:42
Show Gist options
  • Save Kuassim/af2f0550ea3c2909e51ec6fe592ef007 to your computer and use it in GitHub Desktop.
Save Kuassim/af2f0550ea3c2909e51ec6fe592ef007 to your computer and use it in GitHub Desktop.
...
String DB_URL = System.getenv("url");
if (DB_URL == null ) {
System.out.println("Environment variable url must be set");
System.exit(1);
}
PoolDataSource pds = PoolDataSourceFactory.getPoolDataSource();
pds.setConnectionFactoryClassName("oracle.jdbc.replay.OracleDataSourceImpl");
pds.setURL(DB_URL); pds.setUser(DB_USER);pds.setPassword(DB_PASSWORD);
pds.setConnectionPoolName("JDBC_UCP_POOL");
Connection conn = pds.getConnection();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment