/** * Close the underlying Connection. * The provider of this DataSource needs to care for proper shutdown. * <p>As this bean implements DisposableBean, a bean factory will * automatically invoke this on destruction of its cached singletons. */ @Override public void destroy() { synchronized (this.connectionMonitor) { closeConnection(); } }
/** * Reset the underlying shared Connection, to be reinitialized on next access. */ public void resetConnection() { synchronized (this.connectionMonitor) { closeConnection(); this.target = null; this.connection = null; } }
/** * Initialize the underlying Connection via the DriverManager. */ public void initConnection() throws SQLException { if (getUrl() == null) { throw new IllegalStateException("'url' property is required for lazily initializing a Connection"); } synchronized (this.connectionMonitor) { closeConnection(); this.target = getConnectionFromDriver(getUsername(), getPassword()); prepareConnection(this.target); if (logger.isDebugEnabled()) { logger.debug("Established shared JDBC Connection: " + this.target); } this.connection = (isSuppressClose() ? getCloseSuppressingConnectionProxy(this.target) : this.target); } }
/** * Reset the underlying shared Connection, to be reinitialized on next access. */ public void resetConnection() { synchronized (this.connectionMonitor) { closeConnection(); this.target = null; this.connection = null; } }
/** * Close the underlying Connection. * The provider of this DataSource needs to care for proper shutdown. * <p>As this bean implements DisposableBean, a bean factory will * automatically invoke this on destruction of its cached singletons. */ @Override public void destroy() { synchronized (this.connectionMonitor) { closeConnection(); } }
/** * Close the underlying Connection. * The provider of this DataSource needs to care for proper shutdown. * <p>As this bean implements DisposableBean, a bean factory will * automatically invoke this on destruction of its cached singletons. */ public void destroy() { synchronized (this.connectionMonitor) { closeConnection(); } }
/** * Reset the underlying shared Connection, to be reinitialized on next access. */ public void resetConnection() { synchronized (this.connectionMonitor) { closeConnection(); this.target = null; this.connection = null; } }
/** * Initialize the underlying Connection via the DriverManager. */ public void initConnection() throws SQLException { if (getUrl() == null) { throw new IllegalStateException("'url' property is required for lazily initializing a Connection"); } synchronized (this.connectionMonitor) { closeConnection(); this.target = getConnectionFromDriver(getUsername(), getPassword()); prepareConnection(this.target); if (logger.isInfoEnabled()) { logger.info("Established shared JDBC Connection: " + this.target); } this.connection = (isSuppressClose() ? getCloseSuppressingConnectionProxy(this.target) : this.target); } }
/** * Initialize the underlying Connection via the DriverManager. */ public void initConnection() throws SQLException { if (getUrl() == null) { throw new IllegalStateException("'url' property is required for lazily initializing a Connection"); } synchronized (this.connectionMonitor) { closeConnection(); this.target = getConnectionFromDriver(getUsername(), getPassword()); prepareConnection(this.target); if (logger.isDebugEnabled()) { logger.debug("Established shared JDBC Connection: " + this.target); } this.connection = (isSuppressClose() ? getCloseSuppressingConnectionProxy(this.target) : this.target); } }