Package com.sun.appserv.ha.util

Examples of com.sun.appserv.ha.util.SimpleMetadata


        BackingStore replicator = mgr.getBackingStore();
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicationStore>>doValveSave replicator: " + replicator);
            _logger.fine("ReplicationStore>>doValveSave version:" + session.getVersion());                      
        }       
        SimpleMetadata simpleMetadata =
            SimpleMetadataFactory.createSimpleMetadata(session.getVersion()//version
                ((BaseHASession)session).getLastAccessedTimeInternal(), //lastaccesstime
                session.getMaxInactiveInterval(), //maxinactiveinterval
                sessionState, //state
                ((HASession)session).getExtraParameters()); //containerExtraParam
        String beKey = session.getBeKey();
        if(beKey != null) {
            simpleMetadata.setBeKey(beKey);
        }
        try {
            HASession haSess = (HASession)session;
            replicator.save(session.getIdInternal(), //id
                    simpleMetadata, haSess.isPersistent())//TODO: Revist the last param
View Full Code Here


            userName = session.getPrincipal().getName();
            ((BaseHASession)session).setUserName(userName);
        }
        byte[] sessionState = this.getByteArray(session, isReplicationCompressionEnabled());

        SimpleMetadata simpleMetadata =
            SimpleMetadataFactory.createSimpleMetadata(session.getVersion()//version
                ((BaseHASession)session).getLastAccessedTimeInternal(), //lastaccesstime
                session.getMaxInactiveInterval(), //maxinactiveinterval
                sessionState, //state
                ((HASession)session).getExtraParameters()); //containerExtraParam
        String beKey = session.getBeKey();
        if(beKey != null) {
            simpleMetadata.setBeKey(beKey);
        }
        //need this here because save not called
        simpleMetadata.setOwningInstanceName(ReplicationUtil.getInstanceName());
        try {
            transmitState = jxtaReplicator.getSimpleTransmitState(session.getIdInternal(), simpleMetadata);
        } catch (BackingStoreException ex) {}
        return transmitState;
    }
View Full Code Here

            = (ReplicationManagerBase)this.getManager();
        BackingStore replicator = mgr.getBackingStore();
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicationStore>>save: replicator: " + replicator);                      
        }        
        SimpleMetadata simpleMetadata =
            SimpleMetadataFactory.createSimpleMetadata(session.getVersion()//version
                ((BaseHASession)session).getLastAccessedTimeInternal(), //lastaccesstime
                session.getMaxInactiveInterval(), //maxinactiveinterval
                sessionState, //state
                ((HASession)session).getExtraParameters()); //containerExtraParams
        String beKey = session.getBeKey();
        if(beKey != null) {
            simpleMetadata.setBeKey(beKey);
        }       
        try {       
            replicator.save(session.getIdInternal(), //id
                    simpleMetadata, !((HASession) session).isPersistent())//TODO: Revist the last param
        } catch (BackingStoreException ex) {
View Full Code Here

        return session;
    }

    public Session loadFromBackingStore(String id, String version)
            throws IOException, ClassNotFoundException, BackingStoreException {
        SimpleMetadata metaData = (SimpleMetadata) getBackingStore().load(id, version);
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicationStore>>loadFromBackingStore:id=" +
                    id + ", metaData=" + metaData);
        }
        Session session = getSession(metaData);
View Full Code Here

    * @exception ClassNotFoundException if a deserialization error occurs
    * @exception IOException if an input/output error occurs
    */
    public Metadata __load(String id, String version)
            throws BackingStoreException {
        SimpleMetadata result = null;
        if(id == null) {
            return result;
        }
        ReplicationManagerBase repMgr =
            (ReplicationManagerBase)this.getManager();
View Full Code Here

    }

    SimpleMetadata loadUnicast(String id, String version, String instanceName)
            throws BackingStoreException {
        ReplicationState state = sendUnicastLoadQuery(id, version, instanceName);
        SimpleMetadata result = ReplicationState.createSimpleMetadataFrom(state, isReplicationCompressionEnabled());
        if(result != null) {
            __addToRemotelyLoadedSessionIds(id);
        }
        return result;
    }
View Full Code Here

            /* FIXED
            replicator.updateLastAccessTime(session.getIdInternal(), //id
                    ((BaseHASession)session).getLastAccessedTimeInternal(), //lastaccesstime
                    session.getVersion()); //version
            */
            SimpleMetadata smd = SimpleMetadataFactory.createSimpleMetadata(session.getVersion(),
                    ((BaseHASession)session).getLastAccessedTimeInternal());
            replicator.save(session.getIdInternal(), smd, !((HASession) session).isPersistent()); //version
        } catch (BackingStoreException ex) {
            //FIXME
        }
View Full Code Here

            return null;
        }
        try {
            Object containerExtraParams = getContainerExtraParamFrom(
                    replicationState, compressionEnabled);
            SimpleMetadata result = SimpleMetadataFactory.createSimpleMetadata(replicationState.getVersion(),
                    replicationState.getLastAccess(), replicationState.getMaxInactiveInterval(),
                    replicationState.getState(),
                    containerExtraParams);
            return result;
        } catch (Exception ex) {
View Full Code Here

    }
   
    public SingleSignOnEntry loadSSO(String ssoId, ReplicationSingleSignOn repSingleSignOn) throws IOException {
        try {
            BackingStore backingStore = parent.getBackingStore();
            SimpleMetadata metaData = (SimpleMetadata) backingStore.load(ssoId, null);
            if(_logger.isLoggable(Level.FINE)) {
                _logger.fine("ReplicationSSOStore>>loadSSO:id=" + ssoId +
                        ", metaData=" + metaData);
            }
            return deserializeAndSave(metaData);
View Full Code Here

        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicationSSOStore>>__load:id=" + ssoId + ", localCachedState = " +
                    localCachedState + ", broadcastResultState from broadcast or unicast=" +
                    broadcastResultState + ", bestState = " + bestState);
        }
        SimpleMetadata result = ReplicationState.createSimpleMetadataFrom(
                bestState, false); // TODO :: revisit the second param.
        return result;
    }
View Full Code Here

TOP

Related Classes of com.sun.appserv.ha.util.SimpleMetadata

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.