BrokerPool.stopAll();
BrokerPool.stopAll(false);
    public void doGet( HttpServletRequest request,                       HttpServletResponse response )         throws ServletException, IOException {        PrintStream output = new PrintStream( response.getOutputStream() );        response.setContentType( "text/html" );        response.addHeader( "pragma", "no-cache" );        response.addHeader( "Cache-Control", "no-cache" );        output.println( "<h1>eXist Database Server Status</h1>" );        String action = request.getParameter( "action" );        try {            if ( action != null ) {                if ( action.equalsIgnoreCase( "start" ) ) {                    if ( !BrokerPool.isConfigured() ) {                        BrokerPool.configure( 1, 5, configuration );                        output.println( "<p>Server has been started...</p>" );                    }                    else                        output.println( "<p>Server is already running.</p>" );                }                else if ( action.equalsIgnoreCase( "shutdown" ) ) {                    if ( BrokerPool.isConfigured() ) {                        BrokerPool.stopAll();                        output.println( "<p>Server has been shut down...</p>" );                    }                    else                        output.println( "<p>Server is not running ...</p>" );                }            }            if ( !BrokerPool.isConfigured() )                output.println( "<p>Server is not running ...</p>" );            else {                output.println( "<p>The database server is running ...</p>" );                BrokerPool pool = BrokerPool.getInstance();                Configuration conf = pool.getConfiguration();                output.println( "<table  width=\"80%\"><tr>" +                    "<th colspan=\"2\" align=\"left\" bgcolor=\"#0086b2\"><b>Status</b></th></tr>" );                output.println( "<tr><td>Address:</td><td>" + request.getRequestURI() +                    "</td></tr>" );                output.println( "<tr><td>Configuration:</td><td>" + conf.getPath() + "</td></tr>" );                output.println( "<tr><td>Data directory:</td><td>" +                    (String) conf.getProperty( "db-connection.data-dir" ) +                    "</td></tr>" );                output.println( "<tr><td>Active instances:</td><td>" +                    pool.active() + "</td></tr>" );                output.println( "<tr><td>Available instances:</td><td>" +                    pool.available() + "</td></tr>" );                output.println( "</table>" );            }            output.print( "<p><form action=\"" );            output.print( response.encodeURL( request.getRequestURI() ) );            output.println( "\" method=\"GET\">" );            output.print( "<input type=\"submit\" name=\"action\" value=\"start\">" );            output.print( "<input type=\"submit\" name=\"action\" value=\"shutdown\">" );            output.println( "</form></p>" );            output.flush();        } catch ( EXistException e ) {            throw new ServletException( e.getMessage() );        }    }