Examples of addConnectionEventListener()


Examples of com.alibaba.druid.pool.DruidPooledConnection.addConnectionEventListener()

        conn.getClientInfo();

        conn.createArrayOf("int", new Object[0]);
        conn.createStruct("int", new Object[0]);

        conn.addConnectionEventListener(null);
        conn.removeConnectionEventListener(null);
        conn.addStatementEventListener(null);
        conn.removeStatementEventListener(null);

        conn.close();
View Full Code Here

Examples of javax.resource.spi.ManagedConnection.addConnectionEventListener()

    public Object allocateConnection(ManagedConnectionFactory mcf,
                                     ConnectionRequestInfo cxRequestInfo)
        throws ResourceException{
        ManagedConnection mc = mcf.createManagedConnection(null,cxRequestInfo);
        ConnectionListener l = new ConnectionListener(mc);
        mc.addConnectionEventListener(l);
        return mc.getConnection(null,cxRequestInfo);

    }

   class ConnectionListener implements ConnectionEventListener {
View Full Code Here

Examples of javax.resource.spi.ManagedConnection.addConnectionEventListener()

                        mci.getSubject(),
                        mci.getConnectionRequestInfo());
        mci.setManagedConnection(mc);
        GeronimoConnectionEventListener listener = new GeronimoConnectionEventListener(stack, mci);
        mci.setConnectionEventListener(listener);
        mc.addConnectionEventListener(listener);
    }

    public void returnConnection(
            ConnectionInfo connectionInfo,
            ConnectionReturnAction connectionReturnAction) {
View Full Code Here

Examples of javax.resource.spi.ManagedConnection.addConnectionEventListener()

                        mci.getSubject(),
                        mci.getConnectionRequestInfo());
        mci.setManagedConnection(mc);
        GeronimoConnectionEventListener listener = new GeronimoConnectionEventListener(stack, mci);
        mci.setConnectionEventListener(listener);
        mc.addConnectionEventListener(listener);
    }

    public void returnConnection(
            ConnectionInfo connectionInfo,
            ConnectionReturnAction connectionReturnAction) {
View Full Code Here

Examples of javax.resource.spi.ManagedConnection.addConnectionEventListener()

                        mci.getSubject(),
                        mci.getConnectionRequestInfo());
            mci.setManagedConnection(mc);
            GeronimoConnectionEventListener listener = new GeronimoConnectionEventListener(stack, mci);
            mci.setConnectionEventListener(listener);
            mc.addConnectionEventListener(listener);
        } catch (ResourceException re) {
            log.error("Error occurred creating ManagedConnection for " + connectionInfo, re);
            throw re;
        }
    }
View Full Code Here

Examples of javax.resource.spi.ManagedConnection.addConnectionEventListener()

            conn = factory.matchManagedConnections(connSet, null, cxRequestInfo);
            if (conn != null) {
                connSet.remove(conn);
            } else {
                conn = factory.createManagedConnection(null, cxRequestInfo);
                conn.addConnectionEventListener(this);
            }
            conn.getLocalTransaction().begin();

            try {
                /*
 
View Full Code Here

Examples of javax.resource.spi.ManagedConnection.addConnectionEventListener()

                    mci.getSubject(),
                    mci.getConnectionRequestInfo());
            mci.setManagedConnection(mc);
            GeronimoConnectionEventListener listener = new GeronimoConnectionEventListener(stack, mci);
            mci.setConnectionEventListener(listener);
            mc.addConnectionEventListener(listener);
        } catch (ResourceException re) {
            log.error("Error occurred creating ManagedConnection for " + connectionInfo, re);
            throw re;
        }
    }
View Full Code Here

Examples of javax.resource.spi.ManagedConnection.addConnectionEventListener()

    public Object allocateConnection(ManagedConnectionFactory connectionFactory, ConnectionRequestInfo info)
        throws ResourceException
    {
        Subject subject = null;
        ManagedConnection connection = connectionFactory.createManagedConnection(subject, info);
        connection.addConnectionEventListener(this);
        return connection.getConnection(subject, info);
    }

    /**
     * @see javax.resource.spi.ConnectionEventListener#connectionClosed(javax.resource.spi.ConnectionEvent)
View Full Code Here

Examples of javax.resource.spi.ManagedConnection.addConnectionEventListener()

     * @see javax.resource.spi.ConnectionManager#allocateConnection(javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ConnectionRequestInfo)
     */
    public Object allocateConnection(ManagedConnectionFactory connectionFactory, ConnectionRequestInfo info) throws ResourceException {
        Subject subject = null;
        ManagedConnection connection = connectionFactory.createManagedConnection(subject, info);
        connection.addConnectionEventListener(this);
        return connection.getConnection(subject, info);
    }

    /**
     * @see javax.resource.spi.ConnectionEventListener#connectionClosed(javax.resource.spi.ConnectionEvent)
View Full Code Here

Examples of javax.sql.PooledConnection.addConnectionEventListener()

        } else {
            pc = dataSource.getPooledConnection();
        }
        Connection conn = pc.getConnection();
        activeConnections++;
        pc.addConnectionEventListener(this);
        return conn;
    }

    /**
     * This method usually puts the connection back into the pool. There are
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.