code: @Override
      protected void threadEnd() {
          super.threadEnd();
          boolean finalStatusSent = ((RuntimePartitionExecution) getRuntimeWorkUnitExecution()).isFinalStatusSent();
  
          if (!finalStatusSent) {
              try {
                  // We only need to send Failed FINAL_STATUS message here if there was an exception and the message was not sent previously
                  partitionReplyQueue.add(new PartitionReplyMsg(PartitionReplyMsgType.PARTITION_FINAL_STATUS).setBatchStatus(BatchStatus.FAILED).setExitStatus(BatchStatus.FAILED.toString()).setPartitionPlanConfig(partitionPlanConfig));
  
              } catch (Exception e) {
                  //Just ffdc it.
              } finally {
                  partitionReplyQueue.close();
              }
          }
      }
docs: This method is (basically) the last thing the sub-job partition thread does before ending.
  
  It sends the "partition thread complete" message back to the top-level thread.
  
  Then it closes the partitionReplyQueue.
  
  In the case where the partition thread and top-level thread are running in the same JVM,
  then the partitionReplyQueue is an instance of PartitionReplyQueueLocal, and the close
  does nothing.
  
  In the case where the partition thread and top-level thread are running in separate JVMs
  (multi-JVM mode), then it's an instance of PartitionReplyQueueJms, and the close() call
  closes the JMS connection that was used to send msgs back to the top-level thread.
  
  Note: in the top-level thread, the queue is closed in PartitionedStepControllerImpl.invokeCoreStep.