throw new IllegalArgumentException("commandInvocation");
}
CountDownLatch latch = new CountDownLatch(1);
DetachedCommandHelper helper = new DetachedCommandHelper(commandInvocation, latch);
commandInvocation.listener(".*", helper);
JobManagerService jobManagerService = Globals.getDefaultHabitat().getService(JobManagerService.class);
jobManagerService.getThreadPool().execute(helper);
try {
latch.await(10, TimeUnit.SECONDS);
} catch (InterruptedException ex) {
RestLogging.restLogger.log(Level.SEVERE, null, ex);
}