Package com.sun.appserv.ha.util

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


        }
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("SipApplicationSessionStoreImpl>>updateContainerExtraParam: replicator: " + replicator);                      
        }        
        try {
            SimpleMetadata smd = SimpleMetadataFactory.createSimpleMetadata(sas.getInternalLastAccessedTime(), //internallastaccesstime
                    sas.getVersion(), //version
                    sas.getExtraParameters());
            replicator.save(sas.getId(), smd, sas.isReplicated())//containerExtraParams
        } catch (BackingStoreException ex) {
            IOException ex1 =
View Full Code Here


        return timer;
    }

    private HAServletTimer loadFromBackingStore(String id, String version, boolean loadDependencies)
            throws IOException, BackingStoreException, RemoteLockException {
        SimpleMetadata metaData = (SimpleMetadata) getBackingStore().load(id, version);
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ServletTimerStoreImpl>>loadFromBackingStore:id=" +
                    id + ", metaData=" + metaData);
        }
        HAServletTimer timer = getServletTimer(id, metaData);
View Full Code Here

     *
     * @throws IOException
     */
    public SimpleMetadata __load(String id, String version)
            throws BackingStoreException {
        SimpleMetadata result = null;
        if(id == null) {
            return result;
        }
        SipTransactionPersistentManager repMgr
            = (SipTransactionPersistentManager)this.getSipSessionManager();
View Full Code Here

    }

    SimpleMetadata loadUnicast(String id, String version, String instanceName)
        throws BackingStoreException {
        ReplicationState returnState = sendUnicastLoadQuery(id, version, instanceName);
        SimpleMetadata result = ReplicationState.createSimpleMetadataFrom(
                returnState, isReplicationCompressionEnabled());
        if(result != null) {
            __addToRemotelyLoadedSessionIds(id); // Maintain this id, we need to remove state replica sessions after the next save.
        }
        return result;
View Full Code Here

     */
    public void doSave(HAServletTimer haTimer) throws IOException {
        haTimer.setInternalLastAccessedTime(System.currentTimeMillis());
        byte[] timerState = ReplicationUtil.getByteArray(haTimer, isReplicationCompressionEnabled());
        BackingStore replicator = this.getBackingStore();
        SimpleMetadata simpleMetadata =
            SimpleMetadataFactory.createSimpleMetadata(
                haTimer.getVersion(),
                haTimer.getInternalLastAccessedTime(), //lastAccessedTime
                0L, //maxinactiveinterval
                timerState,
                haTimer.getExtraParameters() //containerExtraParam
            );
        if(haTimer.getParentSASId() != null) {
            String beKey = SipApplicationSessionUtil.getSipApplicationKey(haTimer.getParentSASId());
            simpleMetadata.setBeKey(beKey);
            simpleMetadata.setOwningInstanceName(ReplicationUtil.getInstanceName());
        }

        try {
            replicator.save(haTimer.getId(), //id
                    simpleMetadata, haTimer.isReplicated());
View Full Code Here

        }
        JxtaBackingStoreImpl jxtaReplicator = (JxtaBackingStoreImpl)replicator;
        ReplicationState transmitState = null;
        byte[] timerState = ReplicationUtil.getByteArray(haTimer, isReplicationCompressionEnabled());

        SimpleMetadata simpleMetadata =
            SimpleMetadataFactory.createSimpleMetadata(
                haTimer.getVersion(),
                haTimer.getInternalLastAccessedTime(),
                0L, //maxinactiveinterval
                timerState,
                haTimer.getExtraParameters() //containerExtraParam
            );
        if(haTimer.getParentSASId() != null) {
            String beKey = SipApplicationSessionUtil.getSipApplicationKey(haTimer.getParentSASId());
            simpleMetadata.setBeKey(beKey);
            simpleMetadata.setOwningInstanceName(ReplicationUtil.getInstanceName());
        }
        try {
            transmitState = jxtaReplicator.getSimpleTransmitState(haTimer.getId(), simpleMetadata);
        } catch (BackingStoreException ex) {}
        return transmitState;
View Full Code Here

        }
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ServletTimerStoreImpl>>updateContainerExtraParam: replicator: " + replicator);
        }
        try {
            SimpleMetadata smd = SimpleMetadataFactory.createSimpleMetadata(0L, //lastaccesstime not used for ServletTimer
                    timer.getVersion(), //version
                    timer.getExtraParameters());
            replicator.save(timer.getId(), smd, timer.isReplicated()); //containerExtraParams
        } catch (BackingStoreException ex) {
            IOException ex1 =
View Full Code Here

        return session;
    }

    private HASipSession loadFromBackingStore(String id, String version, boolean loadDependencies)
            throws IOException, BackingStoreException, RemoteLockException {
        SimpleMetadata metaData = (SimpleMetadata) getBackingStore().load(id, version);
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("SipSessionStoreImpl>>loadFromBackingStore:id=" +
                    id + ", metaData=" + metaData);
        }
        HASipSession session = getSipSession(id, metaData);
View Full Code Here

     * @throws IOException
     * @throws RemoteLockException
     */
    public SimpleMetadata __load(String id, String version)
        throws BackingStoreException {
        SimpleMetadata result = null;
        if(id == null) {
            return result;
        }
        SipTransactionPersistentManager repMgr
            = (SipTransactionPersistentManager)this.getSipSessionManager();
View Full Code Here

     * @exception IOException
     */
    public void doSave(HASipSession haSession) throws IOException {
        byte[] sessionState = ReplicationUtil.getByteArray(haSession, isReplicationCompressionEnabled());
        BackingStore replicator = this.getBackingStore();
        SimpleMetadata simpleMetadata =       
            SimpleMetadataFactory.createSimpleMetadata(
                haSession.getVersion(),
                haSession.getInternalLastAccessedTime(),
                0L, //maxinactiveinterval
                sessionState,
                haSession.getExtraParameters() //containerExtraParam
            );      
        if(haSession.getParentSASId() != null) {
            String beKey = SipApplicationSessionUtil.getSipApplicationKey(haSession.getParentSASId());
            simpleMetadata.setBeKey(beKey);
            simpleMetadata.setOwningInstanceName(ReplicationUtil.getInstanceName());
        }
               
        try {       
            replicator.save(haSession.getId(), //id
                    simpleMetadata, haSession.isReplicated());
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.