Uploaded image for project: 'FUSE ESB'
  1. FUSE ESB
  2. ESB-1424

Make allowCoreThreadTimeout name consistent across mbeans and properties

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.3.1-fuse-00-00
    • Fix Version/s: 4.4.0-fuse-00-27
    • Component/s: None
    • Labels:
      None

      Description

      4.3.1-fuse-01-09

      Currently different names are used for properties and different in mbean display (and both differs from what is on the thread pool executor)
      org.apache.servicemix.nmr.osgi.ExecutorConfigurator has allowCoreThreadsTimeout (with 's' and small 'o') and this is the name of the property that should be used in config file for it to work (ExecutorConfig in smx-utils has allowCoreThreadsTimeout too).

      Then ExecutorFactoryImpl uses it to populate allowCoreThreadTimeOut property of thread pool executor (no 's', big 'O')

      if (config.isAllowCoreThreadsTimeout()) {
                  try {
                      Method mth = service.getClass().getMethod("allowCoreThreadTimeOut", new Class[]{boolean.class});
                      mth.invoke(service, new Object[]{Boolean.TRUE});
                  }

      and then ManagedExecutor exposes this property as allowsCoreThreadTimeOut (no 's', small 'o')

      public boolean isAllowCoreThreadTimeout() {
              if (this.internalExecutor != null) {
                  ThreadPoolExecutor executor = this.internalExecutor.getThreadPoolExecutor();
                  try {
                      Method m = ThreadPoolExecutor.class.getMethod("allowsCoreThreadTimeOut", null);
                      try {
                          return (Boolean) m.invoke(executor, null);
                      } catch (Exception ex) {

      So three versions of the name of the same property. Probably all should be changed to the one used on ThreadPoolExecutor

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ffang Freeman(Yue) Fang
                Reporter:
                socallag Sean O'Callaghan
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: