You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2009/10/27 01:21:11 UTC

DO NOT REPLY [Bug 48059] New: org.apache.catalina.startup.Bootstrap's main method handles 'startd' or 'stopd' wrongly

https://issues.apache.org/bugzilla/show_bug.cgi?id=48059

           Summary: org.apache.catalina.startup.Bootstrap's main method
                    handles 'startd' or 'stopd' wrongly
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: qingyang.xu@qunar.com


String command = "start";
if (args.length > 0) {
    command = args[args.length - 1];
}

if (command.equals("startd")) {
    args[0] = "start";
    daemon.load(args);
    daemon.start();
} else if (command.equals("stopd")) {
    args[0] = "stop";
    daemon.stop();
}

should be: 

String command = "start";
if (args.length > 0) {
    command = args[args.length - 1];
}
if (command.equals("startd")) {
    args[args.length - 1] = "start";
    daemon.load(args);
    daemon.start();
} else if (command.equals("stopd")) {
    args[args.length - 1] = "stop";
    daemon.stop();
} 
... ...

Consider what whould happen if Bootstrap is invoked as :

org.apache.catalina.startup.Bootstrap -nonaming startd


Please refer to the following usage method of 
org.apache.catalina.startup.Catalina:
/**
     * Print usage information for this application.
     */
    protected void usage() {

        System.out.println
            ("usage: java org.apache.catalina.startup.Catalina"
             + " [ -config {pathname} ]"
             + " [ -nonaming ] { start | stop }");

    }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 48059] org.apache.catalina.startup.Bootstrap's main method handles 'startd' or 'stopd' wrongly

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48059

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #2 from Konstantin Kolinko <kn...@gmail.com> 2009-11-02 02:46:05 UTC ---
*** This bug has been marked as a duplicate of bug 47881 ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 48059] org.apache.catalina.startup.Bootstrap's main method handles 'startd' or 'stopd' wrongly

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48059

--- Comment #1 from qingyang.xu <qi...@qunar.com> 2009-10-26 17:38:23 UTC ---
*** Bug 47881 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org