Package org.apache.geronimo.connector.outbound

Examples of org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor


    private void notifyConnections(InstanceContext oldInstanceContext) throws ResourceException {
        Map connectionManagerToManagedConnectionInfoMap = oldInstanceContext.getConnectionManagerMap();
        for (Iterator i = connectionManagerToManagedConnectionInfoMap.entrySet().iterator(); i.hasNext();) {
            Map.Entry entry = (Map.Entry) i.next();
            ConnectionTrackingInterceptor mcci =
                    (ConnectionTrackingInterceptor) entry.getKey();
            Set connections = (Set) entry.getValue();
            mcci.enter(connections);
        }
    }
View Full Code Here


            throws ResourceException {
        InstanceContext oldInstanceContext = (InstanceContext) currentInstanceContexts.get();
        Map resources = oldInstanceContext.getConnectionManagerMap();
        for (Iterator i = resources.entrySet().iterator(); i.hasNext();) {
            Map.Entry entry = (Map.Entry) i.next();
            ConnectionTrackingInterceptor mcci =
                    (ConnectionTrackingInterceptor) entry.getKey();
            Set connections = (Set) entry.getValue();
            mcci.exit(connections);
            if (connections.isEmpty()) {
                i.remove();
            }
        }
        currentInstanceContexts.set(reenteringInstanceContext);
View Full Code Here

    private Set unshareableResources;
    private Set applicationManagedSecurityResources;

    protected void setUp() throws Exception {
        connectionTrackingCoordinator = new ConnectionTrackingCoordinator();
        key1 = new ConnectionTrackingInterceptor(this, name1, connectionTrackingCoordinator);
        key2 = new ConnectionTrackingInterceptor(this, name2, connectionTrackingCoordinator);
        unshareableResources = new HashSet();
        applicationManagedSecurityResources = new HashSet();
    }
View Full Code Here

    private void notifyConnections(InstanceContext oldInstanceContext) throws ResourceException {
        Map connectionManagerToManagedConnectionInfoMap = oldInstanceContext.getConnectionManagerMap();
        for (Iterator i = connectionManagerToManagedConnectionInfoMap.entrySet().iterator(); i.hasNext();) {
            Map.Entry entry = (Map.Entry) i.next();
            ConnectionTrackingInterceptor mcci =
                    (ConnectionTrackingInterceptor) entry.getKey();
            Set connections = (Set) entry.getValue();
            mcci.enter(connections);
        }
    }
View Full Code Here

            throws ResourceException {
        InstanceContext oldInstanceContext = (InstanceContext) currentInstanceContexts.get();
        Map resources = oldInstanceContext.getConnectionManagerMap();
        for (Iterator i = resources.entrySet().iterator(); i.hasNext();) {
            Map.Entry entry = (Map.Entry) i.next();
            ConnectionTrackingInterceptor mcci =
                    (ConnectionTrackingInterceptor) entry.getKey();
            Set connections = (Set) entry.getValue();
            mcci.exit(connections);
            if (connections.isEmpty()) {
                i.remove();
            }
        }
        currentInstanceContexts.set(reenteringInstanceContext);
View Full Code Here

    private Set applicationManagedSecurityResources;

    protected void setUp() throws Exception {
        super.setUp();
        connectionTrackingCoordinator = new ConnectionTrackingCoordinator(false);
        key1 = new ConnectionTrackingInterceptor(this, name1, connectionTrackingCoordinator);
        nestedKey = new ConnectionTrackingInterceptor(this, name2, connectionTrackingCoordinator);
        unshareableResources = new HashSet();
        applicationManagedSecurityResources = new HashSet();
    }
View Full Code Here

    private void associateConnections(ConnectorInstanceContext context) throws ResourceException {
            Map connectionManagerToManagedConnectionInfoMap = context.getConnectionManagerMap();
            for (Iterator i = connectionManagerToManagedConnectionInfoMap.entrySet().iterator(); i.hasNext();) {
                Map.Entry entry = (Map.Entry) i.next();
                ConnectionTrackingInterceptor mcci =
                        (ConnectionTrackingInterceptor) entry.getKey();
                Set connections = (Set) entry.getValue();
                mcci.enter(connections);
            }
    }
View Full Code Here

        try {
            // for each connection type opened in this componet
            Map resources = currentContext.getConnectionManagerMap();
            for (Iterator i = resources.entrySet().iterator(); i.hasNext();) {
                Map.Entry entry = (Map.Entry) i.next();
                ConnectionTrackingInterceptor mcci =
                        (ConnectionTrackingInterceptor) entry.getKey();
                Set connections = (Set) entry.getValue();

                // release proxy connections
                if (lazyConnect) {
                    for (Iterator infoIterator = connections.iterator(); infoIterator.hasNext();) {
                        ConnectionInfo connectionInfo = (ConnectionInfo) infoIterator.next();
                        releaseProxyConnection(connectionInfo);
                    }
                }

                // use connection interceptor to dissociate connections that support disassociation
                mcci.exit(connections);

                // if no connection remain clear context... we could support automatic commit, rollback or exception here
                if (connections.isEmpty()) {
                    i.remove();
                }
View Full Code Here

    private ConnectionImpl connection;

    protected void setUp() throws Exception {
        super.setUp();
        connectionTrackingCoordinator = new ConnectionTrackingCoordinator(true);
        key1 = new ConnectionTrackingInterceptor(this, name1, connectionTrackingCoordinator);
        unshareableResources = new HashSet();
        applicationManagedSecurityResources = new HashSet();

        mci = new ManagedConnectionInfo(null, null);
        mci.setManagedConnection(new MockManagedConnection());
View Full Code Here

    private Set unshareableResources;
    private Set applicationManagedSecurityResources;

    protected void setUp() throws Exception {
        connectionTrackingCoordinator = new ConnectionTrackingCoordinator();
        key1 = new ConnectionTrackingInterceptor(this, name1, connectionTrackingCoordinator);
        key2 = new ConnectionTrackingInterceptor(this, name2, connectionTrackingCoordinator);
        unshareableResources = new HashSet();
        applicationManagedSecurityResources = new HashSet();
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor

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.