Package com.sun.enterprise.ee.web.sessmgmt

Examples of com.sun.enterprise.ee.web.sessmgmt.ReplicationState


        sendLoadAcknowledgement(loadReceivedState, beKey);
    }

    protected void sendLoadAcknowledgement(String id, String command,
                                           long version, String beKey) {
        ReplicationState loadReceivedState =
            ReplicationState.createBroadcastLoadReceivedState(
                MODE_SIP, id,
                getApplicationId(), version,
                ReplicationUtil.getInstanceName(), command);
        sendLoadAcknowledgement(loadReceivedState, beKey);
View Full Code Here


         */
        BaseCache replicaCache = getReplicaCache();
        if(replicaCache != null) {
            replicaCache.remove(id);
        }
        ReplicationState sessionState = loadSessionFromRemoteActiveCache(
                id, String.valueOf(expat.getVersion()), expat.getInstanceName());
        if (_logger.isLoggable(Level.FINE)) {
            _logger.fine("SipSessionStoreImpl>>loadFromActiveCache:id="
                    + id + ", sessionState=" + sessionState);
        }
View Full Code Here

        if(id == null) {
            return result;
        }
        SipTransactionPersistentManager repMgr
            = (SipTransactionPersistentManager)this.getSipSessionManager();
        ReplicationState localCachedState
            = repMgr.removeFromSipSessionReplicationCache(id);
        //check if we got a hit from our own replica cache
        //and check if we can trust it. If so save and return it immediately
        boolean trustCachedState = canTrustLocallyCachedState(id, version, localCachedState);
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("SipSessionStoreImpl>>__load:id= " + id + ", localCachedState=" +
                    localCachedState + ", trustCachedState=" + trustCachedState);
        }
        ReplicationState bestState = null;
        if(trustCachedState) {
            bestState = localCachedState;
        } else {
            ReplicationState broadcastResultState =
                    findSessionViaBroadcastOrUnicast(id, version);
            bestState = ReplicationState.getBestResult(localCachedState, broadcastResultState);
            if(_logger.isLoggable(Level.FINE)) {
                _logger.fine("SipSessionStoreImpl>>__load:id=" + id + ", broadcastResultState " +
                        "from broadcast or unicast=" + broadcastResultState + ", bestState = " + bestState);
View Full Code Here

        }
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("SipSessionStoreImpl>>findSessionViaBroadcast: replicator: " + replicator);                      
        }
       
        ReplicationState queryResult = jxtaReplicator != null ?
                jxtaReplicator.__load(id, version) : null;
        return queryResult;
    }
View Full Code Here

    private ReplicationState loadSessionFromRemoteActiveCache(String id,
                                                              String version,
                                                              String instanceName)
            throws BackingStoreException {
        ReplicationState returnState = findSessionViaUnicast(id, version, instanceName);
        if (returnState != null && returnState.getState() != null) {
            __addToRemotelyLoadedSessionIds(id);
            removeExpatListElementFor(id);
        }
        return returnState;
    }
View Full Code Here

        BackingStore replicator = mgr.getSipSessionBackingStore();
        if(!(replicator instanceof JxtaBackingStoreImpl)) {
            return null;
        }
        JxtaBackingStoreImpl jxtaReplicator = (JxtaBackingStoreImpl)replicator;
        ReplicationState transmitState = null;
        byte[] sessionState = ReplicationUtil.getByteArray(haSession, isReplicationCompressionEnabled());

        SimpleMetadata simpleMetadata =
            SimpleMetadataFactory.createSimpleMetadata(
                haSession.getVersion(),
View Full Code Here

        throws IOException {   
        //send load received ack to instanceName
        SipTransactionPersistentManager mgr
            = (SipTransactionPersistentManager)getSipSessionManager();
        String theCommand = mgr.MESSAGE_BROADCAST_LOAD_RECEIVED_SIP_SESSION;
        ReplicationState loadReceivedState =
            ReplicationState.createBroadcastLoadReceivedState(MODE_SIP, id, this.getApplicationId(), 0L, mgr.getInstanceName(), theCommand);             
        JxtaReplicationSender sender
            = JxtaReplicationSender.createInstance();
        sender.sendOverPropagatedPipe(loadReceivedState, instanceName, false);
        //if we want to batch unicast load acks use next line
View Full Code Here

    ReplicationState sendUnicastLoadQuery(String id, String version, String instanceName) {
        //send load query to instanceName via unicast
        SipTransactionPersistentManager mgr
            = (SipTransactionPersistentManager)getSipSessionManager();
        String theCommand = mgr.LOAD_SIP_SESSION_COMMAND;
        ReplicationState loadState
            = ReplicationState.createUnicastLoadState(MODE_SIP, id, this.getApplicationId(), ReplicationUtil.parseLong(version), mgr.getInstanceName(), theCommand);
        JxtaReplicationSender sender
            = JxtaReplicationSender.createInstance();
        ReplicationState returnState
            = sender.sendReplicationLoadState(loadState, instanceName, useReplicationUnicastLoadBatching);
        return returnState;
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.ee.web.sessmgmt.ReplicationState

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.