Examples of SFSBBeanState


Examples of com.sun.ejb.spi.sfsb.store.SFSBBeanState

         */
        if(ReplicationHealthChecker.isStopping()) {
            return;
        }       

        SFSBBeanState beanStates[] = getLocallyPassivatedBeanStatesArray();
        for (int i = 0; i < beanStates.length; i++) {
            SFSBBeanState beanState = (SFSBBeanState) beanStates[i];
            if(beanState.getLastAccess() <= repairStartTime) {
                try {
                    checkpointSave(beanState);
                } catch(SFSBStoreManagerException ex) {
                     // FIXME evaluate log level
                    if (_logger.isLoggable(Level.FINE)) {
View Full Code Here

Examples of com.sun.ejb.spi.sfsb.store.SFSBBeanState

         */
        if(checkForStopping && ReplicationHealthChecker.isStopping()) {
            return;
        }       

        SFSBBeanState beanStates[] = getLocallyPassivatedBeanStatesArray();
        for (int i = 0; i < beanStates.length; i++) {
            SFSBBeanState beanState = (SFSBBeanState) beanStates[i];
            if(beanState.getLastAccess() <= repairStartTime) {
                try {
                    //_logger.info("repair checkpointing beanid: " + beanState.getId());
                    checkpointSave(beanState);
                } catch(SFSBStoreManagerException ex) {
                    // FIXME evaluate log level
View Full Code Here

Examples of com.sun.ejb.spi.sfsb.store.SFSBBeanState

            _logger.fine("ReplicatedSFSBStoreManager>>removeExpiredFromLocallyPassivated");
        }       
        ArrayList expiredLocallyPassivated = new ArrayList(30);
        BaseCache locallyPassivatedCache = this.getLocallyPassivatedSessions();
        for(Iterator it = locallyPassivatedCache.values(); it.hasNext();) {
            SFSBBeanState nextBeanState = (SFSBBeanState)it.next();
            if(_logger.isLoggable(Level.FINE)) {
                _logger.fine("ReplicatedSFSBStoreManager>>removeExpiredFromLocallyPassivated:nextState=" + nextBeanState);
            }
            if(isBeanExpired(nextBeanState)) {
                expiredLocallyPassivated.add(nextBeanState);
            }
        }
        if(_logger.isLoggable(Level.FINE)) {          
            _logger.fine("removeExpiredFromLocallyPassivated:expiredReplicas.size=" + expiredLocallyPassivated.size());
        }               
        for(int i=0; i<expiredLocallyPassivated.size(); i++) {
            SFSBBeanState nextBeanState =
                (SFSBBeanState)expiredLocallyPassivated.get(i);
            this.removeFromLocallyPassivatedCache(nextBeanState);
        }       
    }
View Full Code Here

Examples of com.sun.ejb.spi.sfsb.store.SFSBBeanState

        }             
        return this.getFromReplicationCache( (String)queryState.getId() );
    }
   
    protected void clearFromPassivatedCache(String id) {
        SFSBBeanState beanState = this.getFromLocallyPassivatedCache(id);
        if(beanState != null) {                              
            this.removeFromLocallyPassivatedCache(beanState);
        }
    }   
View Full Code Here

Examples of com.sun.ejb.spi.sfsb.store.SFSBBeanState

            ReplicationState nextOwnedListReplicationState = it.next();
            List<ReplicationState>nextOwnedListOfStates
                = (List<ReplicationState>)RollingUpgradeUtil.getObject(nextOwnedListReplicationState.getState());
            for(int i=0; i<nextOwnedListOfStates.size(); i++) {
                ReplicationState nextState = nextOwnedListOfStates.get(i);
                SFSBBeanState nextBeanState = null;
                try {
                    nextBeanState = store.createBeanState(nextState);
                } catch (Exception ex) {}
                if(nextBeanState != null) {
                    //todo need to add beanState equivalents into the container active cache
View Full Code Here

Examples of com.sun.ejb.spi.sfsb.store.SFSBBeanState

     */
    public void save(SFSBBeanState[] beanStates, long startTime) throws IOException {
        long eachStartTime = startTime;
        long eachEndTime = 0L;       
        for(int i=0; i<beanStates.length; i++) {
            SFSBBeanState sfsBean = beanStates[i];
            if(_logger.isLoggable(Level.FINE)) {
                _logger.log(Level.FINE,
                    "ReplicatedEjbStore aggregate save bean[" + i + "]=" + sfsBean);
            }
            BackingStore replicator = this.getBackingStoreForBean(sfsBean);
            if(replicator == null) {
                //this should not happen
                if(_logger.isLoggable(Level.FINE)) {
                    _logger.log(Level.FINE,
                        "ReplicatedEjbStore aggregate save bean[" + i + "]=" + "unable to find replicator");
                }               
                return;
            }
            save(sfsBean, replicator);
            if(this.isMonitoringEnabled()) {
                //increment storage duration for each bean
                eachEndTime = System.currentTimeMillis();
                long storeDuration = eachEndTime - eachStartTime;
                sfsBean.setTxCheckpointDuration(sfsBean.getTxCheckpointDuration() + storeDuration);
                eachStartTime = eachEndTime;
            }
        }       
    }
View Full Code Here

Examples of com.sun.ejb.spi.sfsb.store.SFSBBeanState

    protected SFSBBeanState createBeanState(ReplicationState replicationState) {
        if (replicationState == null || replicationState.getState() == null) {
            return null;
        } else {
            SFSBBeanState resultBeanState = new SFSBBeanState(getClusterID(),    //clusterid
                    getContainerIdAsLong(), //containerid (long)
                    replicationState.getId(), //sessionid
                    replicationState.getLastAccess(), //lastAccess
                    false, //isNew
                    replicationState.getState(), //state
                    getSFSBStoreManager() //storeManager
            );
            resultBeanState.setVersion(replicationState.getVersion());
            return resultBeanState;
        }
    }
View Full Code Here

Examples of com.sun.ejb.spi.sfsb.store.SFSBBeanState

    protected SFSBBeanState createBeanState(Object id, SimpleMetadata metadata) {
        if (metadata == null || metadata.getState() == null) {
            return null;
        } else {
            SFSBBeanState resultBeanState = new SFSBBeanState(getClusterID(),    //clusterid
                    getContainerIdAsLong(), //containerid (long)
                    id, //sessionid
                    metadata.getLastAccessTime(), //lastAccess
                    false, //isNew
                    metadata.getState(), //state
                    getSFSBStoreManager() //storeManager
            );
            resultBeanState.setVersion(metadata.getVersion());
            return resultBeanState;
        }
    }
View Full Code Here

Examples of com.sun.ejb.spi.sfsb.store.SFSBBeanState

    private Object getStateFromStore(Object sessionKey, SFSBContainerCallback container) {

        Object object = null;

        try {
            SFSBBeanState beanState = storeManager.getState(sessionKey);
            byte[] data = (beanState != null)
                ? beanState.getState()
                : null;
            if ( data == null ) {
                if(_logger.isLoggable(Level.SEVERE)) {
                    _logger.log(Level.SEVERE, cacheName + ": Cannot load from "
                                + " BACKUPSTORE FOR Key: <" + sessionKey + ">");
View Full Code Here

Examples of com.sun.ejb.spi.sfsb.store.SFSBBeanState

  //If we are here then we were able to serialize the object successfully
        boolean status = false;
 
  if (data != null) {
      SFSBBeanState beanState = storeManager.createSFSBBeanState(
    sessionKey, ctx.getLastAccessTime(),
    !ctx.existsInStore(), data);
       
        //Note: Don't increment the version here because
        //  this is called on an async thread and the client
        //  already has the correct version
        beanState.setVersion(ctx.getVersion());
      try {
    storeManager.passivateSave(beanState);
    sfsbStoreMonitor.setPassivationSize(data.length);
    status = true;
      } catch (SFSBStoreManagerException sfsbEx) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.