private void initialisePart1() throws Exception
{
// Create the pools - we have two pools - one for non scheduled - and another for scheduled
ThreadFactory tFactory = new HornetQThreadFactory("HornetQ-server-threads" + System.identityHashCode(this), false, getThisClassLoader());
if (configuration.getThreadPoolMaxSize() == -1)
{
threadPool = Executors.newCachedThreadPool(tFactory);
}
else
{
threadPool = Executors.newFixedThreadPool(configuration.getThreadPoolMaxSize(), tFactory);
}
executorFactory = new OrderedExecutorFactory(threadPool);
scheduledPool = new ScheduledThreadPoolExecutor(configuration.getScheduledThreadPoolMaxSize(),
new HornetQThreadFactory("HornetQ-scheduled-threads", false, getThisClassLoader()));
managementService = new ManagementServiceImpl(mbeanServer, configuration);
remotingService = new RemotingServiceImpl(configuration, this, managementService, scheduledPool);