Examples of PooledConnection


Examples of javax.sql.PooledConnection

                    }
        else
        {
      if ( testConnectionOnCheckout )
          {
        PooledConnection pc = (PooledConnection) resc;
        try
        {
            waitMarkPooledConnectionInUse( pc );
            assert !Boolean.FALSE.equals(pooledConnectionInUse( pc )); //null or true are okay
View Full Code Here

Examples of org.apache.activemq.jms.pool.PooledConnection

    public void testEnhancedConnection() throws Exception {
        XaPooledConnectionFactory pooledFactory =
                new XaPooledConnectionFactory(new ActiveMQXAConnectionFactory("mock:" + connector.getConnectUri() + "?closeAsync=false"));

        PooledConnection connection = (PooledConnection) pooledFactory.createConnection();
        EnhancedConnection enhancedConnection = (EnhancedConnection)connection.getConnection();
        DestinationSource destinationSource = enhancedConnection.getDestinationSource();
        assertNotNull(destinationSource);

    }
View Full Code Here

Examples of org.apache.aries.transaction.jms.internal.PooledConnection

        if (connection == null) {
            Connection delegate = createConnection(key);
            connection = createConnectionPool(delegate);
        }
        pools.add(connection);
        return new PooledConnection(connection);
    }
View Full Code Here

Examples of org.apache.tomcat.jdbc.pool.PooledConnection

        this.datasource.getPoolProperties().setSuspectTimeout(1);
        this.datasource.getPoolProperties().setLogAbandoned(true);
        Connection con = datasource.getConnection();
        assertEquals("Number of connections active/busy should be 1",1,datasource.getPool().getActive());
        Thread.sleep(3000);
        PooledConnection pcon = con.unwrap(PooledConnection.class);
        assertTrue("Connection should be marked suspect",pcon.isSuspect());
        con.close();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.