threadPool = new PooledExecutor(new LinkedQueue(), 100); threadPool.setMinimumPoolSize(100);
threadPool = new PooledExecutor(new LinkedQueue(), 50); threadPool.setMinimumPoolSize(50);
   public synchronized void start() throws Exception   {      try      {                  if (started)         {            return;         }                  loadClientAOPConfig();                  loadServerAOPConfig();                  log.info(this + " starting");                  mbeanServer = findMBeanServer();            JDBCPersistenceManager jpm = new JDBCPersistenceManager();         jpm.start();         pm = jpm;                  txRepository = new TransactionRepository(pm);         txRepository.loadPreparedTransactions();                        // TODO: is should be possible to share this with other peers         ms = new PersistentMessageStore(serverPeerID, pm);            clientManager = new ClientManagerImpl(this);                  destinationManager = new DestinationManagerImpl(this);                        JDBCStateManager jdbcStateManager = new JDBCStateManager(this);         jdbcStateManager.start();         stateManager = jdbcStateManager;                  //This pooled executor controls how threads are allocated to deliver messages         //to consumers.         //The buffer(queue) of the pool must be unbounded to avoid potential distributed deadlock         //Since the buffer is unbounded, the minimum pool size has to be the same as the maximum.         //Otherwise, we will never have more than getMinimumPoolSize threads running.                              threadPool = new PooledExecutor(new LinkedQueue(), 100);         threadPool.setMinimumPoolSize(100);                   initializeRemoting();            mbeanServer.registerMBean(destinationManager, DESTINATION_MANAGER_OBJECT_NAME);                  mbeanServer.registerMBean(stateManager, STATE_MANAGER_OBJECT_NAME);                  securityManager.init();                  setupConnectionFactories();                  //createRecoverable();                  started = true;            log.info("JMS " + this + " started");      }      catch (Exception e)      {         log.error("Failed to start", e);      }   }