Package com.arjuna.ats.arjuna.recovery

Examples of com.arjuna.ats.arjuna.recovery.RecoveryModule


/*     */
/* 187 */     Enumeration modules = _recoveryModules.elements();
/*     */
/* 189 */     while (modules.hasMoreElements())
/*     */     {
/* 191 */       RecoveryModule m = (RecoveryModule)modules.nextElement();
/*     */
/* 193 */       m.periodicWorkFirstPass();
/*     */
/* 195 */       if (tsLogger.arjLogger.isDebugEnabled())
/*     */       {
/* 197 */         tsLogger.arjLogger.debug(16L, 4L, 2048L, " ");
/*     */       }
/*     */
/*     */     }
/*     */
/* 204 */     if (interrupted)
/*     */     {
/* 206 */       interrupted = false;
/*     */
/* 208 */       _workerService.signalDone();
/*     */     }
/*     */
/*     */     try
/*     */     {
/* 216 */       Thread.sleep(_backoffPeriod * 1000);
/*     */     }
/*     */     catch (InterruptedException ie)
/*     */     {
/* 220 */       interrupted = true;
/*     */     }
/*     */
/* 223 */     if (_terminate)
/*     */     {
/* 225 */       return true;
/*     */     }
/*     */
/* 228 */     tsLogger.arjLogger.info("Periodic recovery - second pass <" + _theTimestamper.format(new Date()) + ">");
/*     */
/* 231 */     modules = _recoveryModules.elements();
/*     */
/* 233 */     while (modules.hasMoreElements())
/*     */     {
/* 235 */       RecoveryModule m = (RecoveryModule)modules.nextElement();
/*     */
/* 237 */       m.periodicWorkSecondPass();
/*     */
/* 239 */       if (tsLogger.arjLogger.isDebugEnabled())
/*     */       {
/* 241 */         tsLogger.arjLogger.debug(16L, 4L, 2048L, " ");
/*     */       }
View Full Code Here


/*     */     try
/*     */     {
/* 351 */       Class c = Thread.currentThread().getContextClassLoader().loadClass(className);
/*     */       try
/*     */       {
/* 355 */         RecoveryModule m = (RecoveryModule)c.newInstance();
/* 356 */         _recoveryModules.add(m);
/*     */       }
/*     */       catch (ClassCastException e)
/*     */       {
/* 360 */         if (tsLogger.arjLoggerI18N.isWarnEnabled())
View Full Code Here

/*      */     {
/* 1067 */       Enumeration modules = recoveryModules.elements();
/*      */
/* 1069 */       while (modules.hasMoreElements())
/*      */       {
/* 1071 */         RecoveryModule m = (RecoveryModule)modules.nextElement();
/*      */
/* 1073 */         if ((m instanceof XARecoveryModule))
/*      */         {
/* 1075 */           return ((XARecoveryModule)m).getNewXAResource(this._tranID);
/*      */         }
View Full Code Here

    {
      Enumeration modules = recoveryModules.elements();

      while (modules.hasMoreElements())
      {
        RecoveryModule m = (RecoveryModule) modules.nextElement();

        if (m instanceof XARecoveryModule)
        {
          return ((XARecoveryModule) m).getNewXAResource(_tranID);
        }
View Full Code Here

  Enumeration modules = _recoveryModules.elements();

  while (modules.hasMoreElements())
  {
      RecoveryModule m = (RecoveryModule) modules.nextElement();

      m.periodicWorkFirstPass();

      if (tsLogger.arjLogger.isDebugEnabled())
      {
    tsLogger.arjLogger.debug( DebugLevel.FUNCTIONS,
            VisibilityLevel.VIS_PUBLIC,
            FacilityCode.FAC_CRASH_RECOVERY,
            " " );
      }
  }

  if (interrupted)
  {
      interrupted = false;

      _workerService.signalDone();
  }

  // wait for a bit to avoid catching (too many) transactions etc. that
  // are really progressing quite happily

  try
  {
      Thread.sleep( _backoffPeriod * 1000 );
  }
  catch ( InterruptedException ie )
  {
      interrupted = true;
  }

  if ( _terminate )
  {
      return true;
  }

  tsLogger.arjLogger.info("Periodic recovery - second pass <"+
        _theTimestamper.format(new Date()) + ">" );

  modules = _recoveryModules.elements();

  while (modules.hasMoreElements())
  {
      RecoveryModule m = (RecoveryModule) modules.nextElement();

      m.periodicWorkSecondPass();

      if (tsLogger.arjLogger.isDebugEnabled())
      {
    tsLogger.arjLogger.debug ( DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_CRASH_RECOVERY, " " );
      }
View Full Code Here

         {
       Class c = Thread.currentThread().getContextClassLoader().loadClass( className );

            try
            {
               RecoveryModule m = (RecoveryModule) c.newInstance();
               _recoveryModules.add(m);
            }
            catch (ClassCastException e)
            {
    if (tsLogger.arjLoggerI18N.isWarnEnabled())
View Full Code Here

    {
      Enumeration modules = recoveryModules.elements();

      while (modules.hasMoreElements())
      {
        RecoveryModule m = (RecoveryModule) modules.nextElement();

        if (m instanceof XARecoveryModule)
        {
            /*
             * Blaargh! There are better ways to do this!
View Full Code Here

TOP

Related Classes of com.arjuna.ats.arjuna.recovery.RecoveryModule

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.