Thread Groups

Threads are organized into groups. The default structure is:

  • main: main thread waiting for the nugget shutdown
  • j5m-fundamentals: main nugget thread that monitors run-levels and may invoke a final shutdown
  • j5m-fundamentals-daemons: main nugget thread group with support threads
    • console: thread that communicates with an admin via console (if the console is activated)
    • j5m-nugget: main nugget thread group
      • nugget-api-bus: thread that reads all middleware requests from a system bus and writes the respective responses into the system bus
      • nugget-dead-queue: thread that processes instances which were moved to ZOMBIE or DEAD state
      • nugget-dead-queue-retry: thread that helps the nugget-dead-queue thread to retry the killing action on resistent objects
      • nugget-heartbeat-queue: threads that maintains registration process of user objects and also operates as their watch dog
      • registry: thread group of the nugget registry service
        • object: thread that processes registry requests related to (distant) objects
        • configuration: thread that processes registry requests related to configuration queries
        • boot: thread that processes registry requests related to boot and start-up configurations
      • app:XYZ: thread group of a user application "XYZ"
        • /object/name: thread of a distant object "/object/name" (if it implements Runnable interface) in the application "XYZ"
        • ...: more "XYZ" application threads as requested
      • app:...: more application thread groups as requested

How to check the threads

An administrator with console access can check the current threads and threads groups with the threads command. It prints out the structure of threads and threads groups in the living j5m system:

//domain1/1403992212097 > threads                                                                                                                                                                                                            
java.lang.ThreadGroup[name=system,maxpri=10]                                                                                                                                                                                                 
   Thread[Reference Handler,10,system]                                                                                                                                                                                                       
   Thread[Finalizer,8,system]                                                                                                                                                                                                                
   Thread[Signal Dispatcher,9,system]                                                                                                                                                                                                        
   Thread[RMI TCP Accept-0,5,system]                                                                                                                                                                                                         
   Thread[RMI Reaper,5,system]                                                                                                                                                                                                               
   Thread[GC Daemon,2,system]                                                                                                                                                                                                                
   java.lang.ThreadGroup[name=main,maxpri=10]                                                                                                                                                                                                
      Thread[main,5,main]                                                                                                                                                                                                                    
      Thread[j5m-fundamentals,5,main]                                                                                                                                                                                                        
      java.lang.ThreadGroup[name=mcast-init,maxpri=10]                                                                                                                                                                                       
      java.lang.ThreadGroup[name=j5m-fundamentals-daemons,maxpri=10]                                                                                                                                                                         
         Thread[console,5,j5m-fundamentals-daemons]
         java.lang.ThreadGroup[name=j5m-nugget,maxpri=10]
            Thread[nugget-dead-queue-retry,5,j5m-nugget]
            Thread[nugget-dead-queue,5,j5m-nugget]
            Thread[nugget-heartbeat-queue,5,j5m-nugget]
            Thread[nugget-api-bus,5,j5m-nugget]
            java.lang.ThreadGroup[name=registry,maxpri=10]
               Thread[object,5,registry]
            java.lang.ThreadGroup[name=app:66a3edf055174f32dbfcfd9c9a67d4938f1c169d,maxpri=10]
               Thread[/walker,5,app:66a3edf055174f32dbfcfd9c9a67d4938f1c169d]
   java.lang.ThreadGroup[name=RMI Runtime,maxpri=10]
OK: done