code: public void shutdown(boolean clear) {
          if (executionQueue != null) {
              executionQueue.shutdownNow();
          }
  
          if (joynrInjector != null) {
              // switch to lp receiver and call servlet shutdown to be able to receive responses
              ServletMessageReceiver servletReceiver = joynrInjector.getInstance(ServletMessageReceiver.class);
              servletReceiver.switchToLongPolling();
  
              for (JoynrApplication app : apps) {
                  try {
                      app.shutdown();
                  } catch (Exception e) {
                      logger.debug("error shutting down app: " + app.getClass(), e);
                  }
              }
              servletReceiver.shutdown(clear);
          }
          try {
              if (executionQueue != null) {
                  executionQueue.awaitTermination(timeout, TimeUnit.SECONDS);
              }
          } catch (InterruptedException e) {
              return;
          }
  
      }
docs: TODO support clear properly