Package com.sun.jini.reliableLog

Examples of com.sun.jini.reliableLog.ReliableLog


    public void setDirectory(File dir)
  throws IOException, ConfigurationException
    {
  if (dir != null) {
      try {
    log = new ReliableLog(dir.getCanonicalPath(), this);
    log.recover();
      } catch (IOException e) {
    IOException e2 = new IOException(
        "Log is corrupted: " + e.getMessage());
    e2.initCause(e);
View Full Code Here


  if (location.equals(logDirname)) {
      return;
  }
  concurrentObj.writeLock();
  try {
       ReliableLog newLog = new ReliableLog(location,
             new LocalLogHandler());
      newLog.snapshot();
      ReliableLog oldLog = this.log;
      this.log = newLog;
      logDirname = location;
            MarshalledObject data = new MarshalledObject(location);
      if (activationID != null) {
    try {
//                      if (sharedActivationRef == null) {
            ActivationSystem sys = ActivationGroup.getSystem();
            ActivationDesc desc = sys.getActivationDesc
                                                               (activationID);
            desc = new ActivationDesc(desc.getGroupID(),
                    desc.getClassName(),
                    desc.getLocation(),
                    data,
                    desc.getRestartMode());
            sys.setActivationDesc(activationID, desc);
//                      } else {//in a shared activation group
//                          sharedActivationRef.setInitializationData(activationID,
//                                                                    data);
//                      }//endif
    } catch (ActivationException e) {
        throw new LogException("activation system problem", e);
    }
      }
      oldLog.deletePersistentStore();
  } finally {
      concurrentObj.writeUnlock();
  }
    }
View Full Code Here

  objectServiceType = resolver.resolve(new ServiceType(Object.class,
                   null, null));
  String host = System.getProperty("java.rmi.server.hostname");
  if (host == null)
      host = InetAddress.getLocalHost().getHostName();
  log = new ReliableLog(logDirname, new LocalLogHandler());
  inRecovery = true;
  resolver.setInRecovery(true);
  log.recover();
  resolver.setInRecovery(false);
  inRecovery = false;
View Full Code Here

            persistDir = (String)Config.getNonNullEntry(config,
                                                        COMPONENT_NAME,
                                                        "persistenceDirectory",
                                                        String.class);
            /* Recover the state that was persisted on prior runs (if any) */
            log = new ReliableLog(persistDir, new LocalLogHandler());
            inRecovery = true;
            log.recover();
            inRecovery = false;
        }//endif(persistent)

View Full Code Here

     

      logToSnapshotThreshold = Config.getIntEntry(config,
                MERCURY, "logToSnapshotThreshold", 50, 0, Integer.MAX_VALUE);
     
            log = new ReliableLog(persistenceDirectory, new LocalLogHandler());

      if (initLogger.isLoggable(Level.FINEST)) {
                initLogger.log(Level.FINEST, "Recovering persistent state");
      }
            inRecovery = true;
View Full Code Here

        } else {
      throw e;
        }
    }
    ActLogHandler handler = new ActLogHandler();
    ReliableLog log = new ReliableLog(logName, handler);
    log.recover();
    Activation state = handler.getState();
    if (state == null) {
        log.snapshot();
        state = handler.getState();
    }
    state.init(log, login, config, configOptions, starter);
    if (starter == null) {
        // prevent exit
View Full Code Here

    ProxyPreparer.class, recoveredLocatorPreparer);
      persistenceSnapshotWeight = Config.getFloatEntry(
    config, COMPONENT, "persistenceSnapshotWeight",
    persistenceSnapshotWeight, 0F, Float.MAX_VALUE);

      log = new ReliableLog(persistenceDirectory, new LocalLogHandler());
      if (logger.isLoggable(Level.CONFIG)) {
    logger.log(Level.CONFIG, "using persistence directory {0}",
         new Object[]{ persistenceDirectory });
      }
      inRecovery = true;
View Full Code Here

                           SnapshotHandler snapshotHandler) throws StoreException {
        this.snapshotHandler = snapshotHandler;
        storeLocation = new File(logDir);

        try {
            log = new ReliableLog(storeLocation.getCanonicalPath(), logHandler);
        } catch(IOException e) {
            throw new CorruptedStoreException("Failure creating reliable log", e);
        }

        try {
View Full Code Here

        }

        // Inherit JavaDoc from super-type
        public void setDirectory(File dir) throws IOException {
            try {
                log = new ReliableLog(dir.getCanonicalPath(), this);
                log.recover();
            } catch(IOException e) {
                logger.error("Problem recovering/creating log", e);
                throw new IOException("ServiceBeanContextManager: log ["
                                      + dir.getCanonicalPath()
View Full Code Here

TOP

Related Classes of com.sun.jini.reliableLog.ReliableLog

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.