def worker_thread_ids
      thread_group = java.lang.Thread.currentThread.getThreadGroup
      threads = java.lang.reflect.Array.newInstance(
        java.lang.Thread.java_class, thread_group.activeCount)
      thread_group.enumerate(threads)
      # NOTE: we shall check the name from $servlet_context.getServletContextName
      # but that's an implementation detail of the factory currently that threads
      # are named including their context name. thread grouping should be fine !
      threads.map do |thread| # a convention is to name threads as "worker" :
        thread && thread.getName.index(WORKER_THREAD_ID) ? thread.getName : nil
      end.compact
    end
def worker_thread_ids
      thread_group = java.lang.Thread.currentThread.getThreadGroup
      threads = java.lang.reflect.Array.newInstance(
        java.lang.Thread.java_class, thread_group.activeCount)
      thread_group.enumerate(threads)
      # NOTE: we shall check the name from $servlet_context.getServletContextName
      # but that's an implementation detail of the factory currently that threads
      # are named including their context name. thread grouping should be fine !
      threads.map do |thread| # a convention is to name threads as "worker" :
        thread && thread.getName.index(WORKER_THREAD_ID) ? thread.getName : nil
      end.compact
    end
def worker_thread_ids thread_group = java . lang . Thread . currentThread . getThreadGroup threads = java . lang . reflect . Array . newInstance ( java . lang . Thread . java_class , thread_group . activeCount ) thread_group . enumerate ( threads ) # NOTE: we shall check the name from $servlet_context.getServletContextName # but that's an implementation detail of the factory currently that threads # are named including their context name. thread grouping should be fine ! threads . map do | thread | # a convention is to name threads as "worker" : thread && thread . getName . index ( WORKER_THREAD_ID ) ? thread . getName : nil end . compact end
returns worker thread names that supposely belong to the current application
returns worker thread names that supposely belong to the current application