/**
* Override this to link with your connection pooling system. By default this creates a single connection which is held open until the object is garbage collected.
*/
protected Connection getConnection() throws SQLException {
if (!DriverManager.getDrivers().hasMoreElements()) setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
if (connection == null) {
connection=DriverManager.getConnection(databaseURL,databaseUser,databasePassword);
}
return connection;
}

/**
* Override this to link with your connection pooling system. By default this creates a single connection which is held open until the object is garbage collected.
*/
protected Connection getConnection() throws SQLException {
if (!DriverManager.getDrivers().hasMoreElements()) setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
if (connection == null) {
connection=DriverManager.getConnection(databaseURL,databaseUser,databasePassword);
}
return connection;
}

Example 75

From project log4jna, under directory /thirdparty/log4j/src/main/java/org/apache/log4j/jdbc/.

/**
* Override this to link with your connection pooling system. By default this creates a single connection which is held open until the object is garbage collected.
*/
protected Connection getConnection() throws SQLException {
if (!DriverManager.getDrivers().hasMoreElements()) setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
if (connection == null) {
connection=DriverManager.getConnection(databaseURL,databaseUser,databasePassword);
}
return connection;
}

Example 76

From project logback, under directory /logback-core/src/main/java/ch/qos/logback/core/db/.

/**
* Override this to link with your connection pooling system. By default this creates a single connection which is held open until the object is garbage collected.
*/
protected Connection getConnection() throws SQLException {
if (!DriverManager.getDrivers().hasMoreElements()) setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
if (connection == null) {
connection=DriverManager.getConnection(databaseURL,databaseUser,databasePassword);
}
return connection;
}

Example 93

From project nuxeo-services, under directory /nuxeo-platform-directory/nuxeo-platform-directory-sql/src/main/java/org/nuxeo/ecm/directory/sql/.