@ManagementOperation(description = "The total number of available connections in the pool") public int poolTotalSize() throws AtomikosSQLException { delegate.init(); return delegate.poolTotalSize(); }
@ManagementOperation(description = "The total number of available connections in the pool") public int poolTotalSize() throws AtomikosSQLException { delegate.init(); return delegate.poolTotalSize(); }
@ManagementOperation(description = "The approximate number of available connections in the pool") public int poolAvailableSize() throws AtomikosSQLException { delegate.init(); return delegate.poolAvailableSize(); }
@ManagementOperation(description = "The approximate number of available connections in the pool") public int poolAvailableSize() throws AtomikosSQLException { delegate.init(); return delegate.poolAvailableSize(); }
public void configure(Properties props) throws HibernateException { if (dataSource != null) { return; } if ("true".equalsIgnoreCase(props.getProperty(PROPERTY_NONXA))) { dataSource = new AtomikosNonXADataSourceBean(); } else { dataSource = new AtomikosDataSourceBean(); } Properties atomikosProperties = filterOutHibernateProperties(props); LOGGER.logInfo("configuring AtomikosConnectionProvider with properties: " + atomikosProperties); try { PropertyUtils.setProperties(dataSource, atomikosProperties); } catch (PropertyException ex) { throw new HibernateException("cannot create Atomikos DataSource", ex); } try { dataSource.init(); } catch (AtomikosSQLException ex) { throw new HibernateException("cannot initialize Atomikos DataSource", ex); } }
public Connection getConnection() throws SQLException { if ( LOGGER.isDebugEnabled() ) LOGGER.logDebug ( this + ": getConnection()..." ); Connection connection = null; init(); try { connection = (Connection) connectionPool.borrowConnection(); } catch (CreateConnectionException ex) { throwAtomikosSQLException("Failed to grow the connection pool", ex); } catch (PoolExhaustedException e) { throwAtomikosSQLException ("Connection pool exhausted - try increasing 'maxPoolSize' and/or 'borrowConnectionTimeout' on the DataSourceBean."); } catch (ConnectionPoolException e) { throwAtomikosSQLException("Error borrowing connection", e ); } if ( LOGGER.isTraceEnabled() ) LOGGER.logTrace ( this + ": returning " + connection ); return connection; }