}
if (asyncJobServiceEnabled)
{
AsynchronousDispatcher asyncDispatcher = new AsynchronousDispatcher(providerFactory);
asyncDispatcher.setMaxCacheSize(asyncJobServiceMaxJobResults);
asyncDispatcher.setMaxWaitMilliSeconds(asyncJobServiceMaxWait);
asyncDispatcher.setThreadPoolSize(asyncJobServiceThreadPoolSize);
asyncDispatcher.setBasePath(asyncJobServiceBasePath);
asyncDispatcher.getUnwrappedExceptions().addAll(unwrappedExceptions);
dispatcher = asyncDispatcher;
asyncDispatcher.start();
}
else
{
SynchronousDispatcher dis = new SynchronousDispatcher(providerFactory);
dis.getUnwrappedExceptions().addAll(unwrappedExceptions);