Examples of SFSBBeanState


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

    }

    public SFSBBeanState createSFSBBeanState(Object sessionId,
      long lastAccess, boolean isNew, byte[] state)
    {
  return new SFSBBeanState(clusterId, containerId,
      sessionId, lastAccess, isNew, state, this);
    }
View Full Code Here

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

    }
   
    public SFSBBeanState getState(Object sessionKey) {

        String fileName = sessionKey.toString();
        SFSBBeanState beanState = null;

  if(_logger.isLoggable(TRACE_LEVEL)) {
      _logger.log(TRACE_LEVEL, storeName + "Attempting to load session: "
          + sessionKey);
  }

        File file = new File(baseDir, fileName);
        if (file.exists()) {
            int dataSize = (int) file.length();
            byte[] data = new byte[dataSize];
            BufferedInputStream bis = null;
            FileInputStream fis = null;
            try {
                loadCount++;
                fis = new FileInputStream(file);
                bis = new BufferedInputStream(fis);
                int offset = 0;
                for (int toRead = dataSize; toRead > 0; ) {
                    int count = bis.read(data, offset, toRead);
                    offset += count;
                    toRead -= count;
               
       
    beanState = new SFSBBeanState("", -1, sessionKey, -1,
        false, data, this);

                loadSuccessCount++;
    if(_logger.isLoggable(TRACE_LEVEL)) {
        _logger.log(TRACE_LEVEL, storeName
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.