java, jdbc connection or EntityManager (spring/eclipse) connection using Oracle Wallet
public JPAUtil(String config) throws Exception {
try {
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
String url = "jdbc:oracle:oci:/@" + config;
conn = DriverManager.getConnection(url);
if (conn.isClosed()) {
throw new RuntimeException(
"Error opening connection on"+ url);
}
} catch (SQLException e) {
e.fillInStackTrace();
throw new RuntimeException(
"Error registering oracle.jdbc.driver.OracleDriver()", e);
}
}