Package com.atomikos.datasource.pool

Examples of com.atomikos.datasource.pool.CreateConnectionException


    return connection;
  }

  protected void testUnderlyingConnection() throws CreateConnectionException {
    String testQuery = getTestQuery();
    if ( isErroneous() ) throw new CreateConnectionException ( this + ": connection is erroneous" );
    if (testQuery != null) {
      Configuration.logDebug ( this + ": testing connection with query [" + testQuery + "]" );
      Statement stmt = null;
      try {
        stmt = connection.createStatement();
        ResultSet rs = stmt.executeQuery(testQuery);
        rs.close();
        stmt.close();
      } catch ( SQLException e) {
        throw new CreateConnectionException ( "Error executing testQuery" ,  e );
      }
      Configuration.logDebug ( this + ": connection tested OK" );
    }
    else {
      Configuration.logDebug ( this + ": no test query, skipping test" );
View Full Code Here


    XAConnection xac;
    try {
      xac = xaConnectionFactory.createXAConnection();
      return new AtomikosPooledJmsConnection(xac, jmsTransactionalResource, atomikosConnectionFactory);
    } catch (JMSException ex) {
      throw new CreateConnectionException("error creating JMS connection", ex);
    }
  }
View Full Code Here

    currentProxy = AtomikosJmsConnectionProxy.newInstance ( xaConnection , jmsTransactionalResource , this , props );
    return currentProxy;
  }

  protected void testUnderlyingConnection() throws CreateConnectionException {
    if ( isErroneous() ) throw new CreateConnectionException ( this + ": connection is erroneous" );
  }
View Full Code Here

TOP

Related Classes of com.atomikos.datasource.pool.CreateConnectionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.