Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-8071

HDScanner's setScanEnabled() method Fails to enable scanning on first invocation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.0.0.M4
    • 6.0.0.M3
    • Other
    • None
    • Workaround Exists
    • Hide

      Calling the setScanEnabled(true) a second time enables scanning. The first time sets the member variable making the second call setup the activeScan member properly.

      Show
      Calling the setScanEnabled(true) a second time enables scanning. The first time sets the member variable making the second call setup the activeScan member properly.

      he org.jboss.system.server.profileservice.hotdeploy.HDScanner bean's setScanEnabled() method fails when setting to "true" if it was previously set to "false" When enabling, the setter calls the start():

      public synchronized void setScanEnabled(boolean scanEnabled)
      {
      if (scanEnabled == true && activeScan == null && scanExecutor != null)

      { start(); }

      else if (scanEnabled == false && activeScan != null)

      { stop(); }

      this.scanEnabled = scanEnabled;
      }

      However, if the scanEnabled member variable (this.scanEnabled) is false this call does nothing:

      public void start()
      {
      if (scanEnabled)

      { activeScan = scanExecutor.scheduleWithFixedDelay(this, 0, scanPeriod, TimeUnit.MILLISECONDS); }

      }

            rhn-support-miclark Mike Clark
            rhn-support-miclark Mike Clark
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: