Package com.sun.appserv.ha.util

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


    protected SimpleMetadata createSimpleMetadata(SFSBBeanState beanState)
        throws IOException {

        byte[] sfsbState = beanState.getState();
        SimpleMetadata metaData =
            SimpleMetadataFactory.createSimpleMetadata(beanState.getVersion(), //version
                beanState.getLastAccess(), //lastaccesstime
                this.getIdleTimeoutInSeconds(), //maxInactiveInterval (seconds)
                sfsbState,      //state
                null);           //extraParam not used here
View Full Code Here


    }

    private HADialogFragment loadFromBackingStore(String id, String version)
            throws IOException, BackingStoreException, RemoteLockException {
        SimpleMetadata metaData = (SimpleMetadata) getBackingStore().load(id, version);
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("DialogFragmentStoreImpl>>loadFromBackingStore:id=" +
                    id + ", metaData=" + metaData);
        }
        HADialogFragment dialogFragment = getDialogFragment(metaData);
View Full Code Here

        }
    }

    public SimpleMetadata __load(String id, String version)
        throws BackingStoreException {
        SimpleMetadata result = null;
        ReplicationDialogFragmentManager repMgr
            = (ReplicationDialogFragmentManager)DialogFragmentManager.getInstance();
        ReplicationState localCachedState
            = repMgr.removeFromDialogFragmentReplicationCache(id);
        //check if we got a hit from our own replica cache
View Full Code Here

        }
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("DialogFragmentStoreImpl>>updateContainerExtraParam: replicator: " + replicator);
        }
        try {
            SimpleMetadata smd = SimpleMetadataFactory.createSimpleMetadata(
                    df.getInternalLastAccessedTime(), //lastaccesstime
                    df.getVersion(), //version
                    df.getExtraParameters());
            replicator.save(df.getDialogId(), smd, df.isReplicated());
        } catch (BackingStoreException ex) {
View Full Code Here

     * @exception IOException
     */
    public void doSave(HADialogFragment haDialogFragment) throws IOException {
        byte[] sessionState = ReplicationUtil.getByteArray(haDialogFragment, isReplicationCompressionEnabled());
        BackingStore replicator = this.getBackingStore();
        SimpleMetadata simpleMetadata =       
            SimpleMetadataFactory.createSimpleMetadata(
                haDialogFragment.getVersion(),
                haDialogFragment.getInternalLastAccessedTime(), // internallastAccessedTime
                0L, // maxinactiveinterval
                sessionState,
                haDialogFragment.getExtraParameters() // containerExtraParam
            );
        simpleMetadata.setBeKey(haDialogFragment.getBeKey());
        simpleMetadata.setOwningInstanceName(ReplicationUtil.getInstanceName());
        try {
            replicator.save(haDialogFragment.getDialogId(), //id
                    simpleMetadata, haDialogFragment.isReplicated())//FIXME: Revist last param
        } catch (BackingStoreException ex) {
            IOException ex1 =
View Full Code Here

        BackingStore replicator = mgr.getDialogFragmentBackingStore();
        if(!(replicator instanceof JxtaBackingStoreImpl)) {
            return null;
        }
        JxtaBackingStoreImpl jxtaReplicator = (JxtaBackingStoreImpl)replicator;
        SimpleMetadata simpleMetadata =
            SimpleMetadataFactory.createSimpleMetadata(
                haDialogFragment.getVersion(),
                haDialogFragment.getInternalLastAccessedTime(), // internallastAccessedTime
                0L, // maxinactiveinterval
                sessionState,
                haDialogFragment.getExtraParameters() // containerExtraParam
            );
        simpleMetadata.setBeKey(haDialogFragment.getBeKey());
        simpleMetadata.setOwningInstanceName(ReplicationUtil.getInstanceName());
        try {
            transmitState = jxtaReplicator.getSimpleTransmitState(haDialogFragment.getDialogId(), simpleMetadata);
        } catch (BackingStoreException ex) {}
        return transmitState;
    }
View Full Code Here

        return session;
    }

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

     * This method will be called from JxtaBackingStoreImpl. So, it is specific
     * only to in-memory replication store.
     */
    SimpleMetadata __load(String id, String version)
    throws BackingStoreException {
        SimpleMetadata result = null;
        SipTransactionPersistentManager repMgr
            = (SipTransactionPersistentManager)this.getSipSessionManager();
        ReplicationState localCachedState
            = repMgr.removeFromSipApplicationSessionReplicationCache(id);
        //check if we got a hit from our own replica cache
View Full Code Here

     * @exception IOException
     */
    public void doSave(HASipApplicationSession haSas) throws IOException {
        byte[] sessionState = ReplicationUtil.getByteArray(haSas, isReplicationCompressionEnabled());
        BackingStore replicator = this.getBackingStore();
        SimpleMetadata simpleMetadata =       
            SimpleMetadataFactory.createSimpleMetadata(
                haSas.getVersion(),
                haSas.getInternalLastAccessedTime(),
                0L, //maxinactiveinterval
                sessionState,
                haSas.getExtraParameters() //containerExtraParam
            );
        simpleMetadata.setBeKey(haSas.getBeKey());
        simpleMetadata.setOwningInstanceName(ReplicationUtil.getInstanceName());
        try {       
            replicator.save(haSas.getId(), //id
                    simpleMetadata, haSas.isReplicated());
        } catch (BackingStoreException ex) {
            IOException ex1 =
View Full Code Here

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

        SimpleMetadata simpleMetadata =
            SimpleMetadataFactory.createSimpleMetadata(
                haSas.getVersion(),
                haSas.getInternalLastAccessedTime(),
                0L, //maxinactiveinterval
                sessionState,
                haSas.getExtraParameters() //containerExtraParam
            );
        simpleMetadata.setBeKey(haSas.getBeKey());
        //need this here because save not called
        simpleMetadata.setOwningInstanceName(ReplicationUtil.getInstanceName());
        try {
            transmitState = jxtaReplicator.getSimpleTransmitState(haSas.getId(), simpleMetadata);
        } catch (BackingStoreException ex) {}
        return transmitState;
    }
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.