/** * Return true if the accessor is currently connected to a data source. * Return false otherwise. */ public boolean isConnected() { if ((this.datasourceConnection == null) && (this.login == null)) { return false; } if (this.usesExternalConnectionPooling) { return true;// As can always reconnect. } if (this.datasourceConnection == null) { return false; } return isDatasourceConnected(); }
/** * Return true if the accessor is currently connected to a data source. * Return false otherwise. */ public boolean isConnected() { if ((this.datasourceConnection == null) && (this.login == null)) { return false; } if (this.usesExternalConnectionPooling) { return true;// As can always reconnect. } if (this.datasourceConnection == null) { return false; } return isDatasourceConnected(); }
/** * Return true if the accessor is currently connected to a data source. * Return false otherwise. */ public boolean isConnected() { if ((this.datasourceConnection == null) && (this.login == null)) { return false; } if (this.usesExternalConnectionPooling) { return true;// As can always reconnect. } if (this.datasourceConnection == null) { return false; } return isDatasourceConnected(); }
/** * Close the accessor's connection. * This is used only for external connection pooling * when it is intended for the connection to be reconnected in the future. */ public void closeConnection() { try { if (this.datasourceConnection != null) { if (isDatasourceConnected()) { if(currentSession != null) { currentSession.preDisconnectExternalConnection(this); } if(customizer != null && customizer.isActive()) { customizer.clear(); } closeDatasourceConnection(); } this.datasourceConnection = null; } } catch (DatabaseException exception) { // Ignore this.datasourceConnection = null; } finally { currentSession = null; } }
/** * Close the accessor's connection. * This is used only for external connection pooling * when it is intended for the connection to be reconnected in the future. */ public void closeConnection() { try { if (this.datasourceConnection != null) { if (isDatasourceConnected()) { if(currentSession != null) { currentSession.preReleaseConnection(this); } if(customizer != null && customizer.isActive()) { customizer.clear(); } closeDatasourceConnection(); } this.datasourceConnection = null; } } catch (DatabaseException exception) { // Ignore this.datasourceConnection = null; } finally { currentSession = null; } }
/** * Close the accessor's connection. * This is used only for external connection pooling * when it is intended for the connection to be reconnected in the future. */ public void closeConnection() { try { if (this.datasourceConnection != null) { if (isDatasourceConnected()) { if(currentSession != null) { currentSession.preReleaseConnection(this); } if(customizer != null && customizer.isActive()) { customizer.clear(); } closeDatasourceConnection(); } this.datasourceConnection = null; } } catch (DatabaseException exception) { // Ignore this.datasourceConnection = null; } finally { currentSession = null; } }