Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-440

Add JMX management beans for the Kie Scanner

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 6.1.0.Beta2
    • 6.1.0.Beta1
    • None
    • None

      ==== from Mario ====
      Edson,

      I added some of the requested features with this commit: https://github.com/droolsjbpm/drools/commit/d90c02ee3
      In particular:

      1) list all deployed KieScanners

      I added a KieScannersRegistry so you can obtain this list by invoking KieScannersRegistry.getAllKieScanners()

      2) Display the GAV (ReleaseID) the KieScanner was created from. The V should be editable. Changing forces the KieScanner to update to the resulting effective version.

      InternalKieScanner.getScannerReleaseId()

      I don't think that allowing to change the ReleaseId would be a good idea. Actually that RelaseId doesn't belong to the KieScanner but to the KieContainer for which the KieScanner has been created. This implies that I should change it on the KieContainer and I am not sure this is correct. Moreover what happens if you set a version that actually doesn't exist on the maven repo?

      3) Display the effective GAV. i.e. if they say 1.0-SNAPSHOT for 2) this one would show which snapshot was used. Same for version ranges.

      InternalKieScanner.getCurrentReleaseId()

      4) allow “scanNow” to be invoked.

      KieScanner.scanNow()

      5) allow the interval to be edited, including turning off.

      KieScanner.stop()
      KieScanner.start(long pollingInterval)

      Note that if you want to change the pollingInterval you have to first invoke stop and then do a restart with the new pollingInterval.

      6) Display the status, such as “starting, updating, running” (not quite sure we can do this now)

      InternalKieScanner.getStatus()

      I am using the following Status defined in InternalKieScanner (I hope they makes sense but in case you want to change something about them let me know)

      public enum Status

      { STARTING, SCANNING, UPDATING, RUNNING, STOPPED; }

            etirelli@redhat.com Edson Tirelli
            etirelli@redhat.com Edson Tirelli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: