code: @Override
  	public synchronized boolean shutdown()
      {
      	if (!started)
      		return false;
      	
      	try
      	{
  	        log.info("Server shutting down ...");
  	        
  	        // Undeploy bridges
  	        undeployBridges();
  	        
  	        // Stop the tcp listener
  	        if (tcpListener != null)
  	        {
  	        	tcpListener.stop();
  	        	tcpListener = null;
  	        }
  	        
  	        // Terminate the admin thread
  	        if (adminThread != null)
  	        {
  	            adminThread.pleaseStop();
  	            try
  	            {
  	                adminThread.join(ADMIN_THREAD_STOP_TIMEOUT*1000);
  	                adminThread = null;
  	            }
  	            catch (InterruptedException e)
  	            {
  	                log.warn("Shutdown was interrupted while waiting for the admin thread to stop");
  	            }
  	        }
  	        
  	        // Undeploy engine
  	        engine.undeploy();
  	        try
  	    	{
  	    		if (jmxAgent != null)
  	    			jmxAgent.unregister(new ObjectName(JMXAgent.JMX_DOMAIN+":type=Engines,engine="+engine.getName()));
  	    	}
  	    	catch (Exception e)
  	    	{
  	    		log.error("Cannot unregister local engine from JMX agent",e);
  	    	}
  	        
  	        // Undeploy JMX
  	        if (jmxAgent != null)
  	        	jmxAgent.stop();
  	        
  	        started = false;
  	        	        
  	        log.info("Shutdown complete.");
  	        
  	        return true;
      	}
      	catch (Exception e)
      	{
      		log.error("Server shutdown failed",e);
      		return false;
      	}
      }
docs: /*
  (non-Javadoc)
  @see net.timewalker.ffmq4.FFMQServerMBean#shutdown()