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 2010/08/25 16:04:57 UTC

DO NOT REPLY [Bug 49821] New: Tomcat CLI

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

           Summary: Tomcat CLI
           Product: Tomcat 7
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Manager
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: pidster@apache.org


Using JMX the CLI enables simple status checks of hosts, apps and connectors;
it also permits an application to be reloaded, deployed and undeployed. The
'find leaks' function is also exposed.

The targeted process is identified either by passing a PID, JMX URI, or a JMX
port. The CLI can also exploit Java 6 management features to connect to a
process localised JMX/RMI connector.

A number of additional strategies are possible, including using the
non-standard* Attach API in the Sun/Oracle JVM to enable a management agent and
initialise a local JMX/RMI connector if one is not active.

This, in effect, means that for a single Tomcat running it would be possible to
guess which process is the correct target process, attach to it, inject an
agent and then connect via JMX, all without having to perform manual JMX
configuration.

I will attach code shortly.

* So reflection is used, allowing the CLI to degrade gracefully on other JVMs.
In theory, at least.

-- 
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 49821] Tomcat CLI

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

Pid <pi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #25949|0                           |1
        is obsolete|                            |

--- Comment #5 from Pid <pi...@apache.org> 2010-08-31 19:59:35 EDT ---
Created an attachment (id=25966)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25966)
complete rewrite

Ground up rewrite, smaller & better in many ways.

-- 
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 49821] Tomcat CLI

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

--- Comment #2 from Pid <pi...@apache.org> 2010-08-25 14:42:46 EDT ---
Created an attachment (id=25940)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25940)
Eclipse project directory, inc source code etc.

The Eclipse project isn't very big, so I've targz the whole thing.

There's every possibility that I'll refactor the whole thing.

-- 
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 49821] Tomcat CLI

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

Pid <pi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #25948|0                           |1
        is obsolete|                            |

--- Comment #4 from Pid <pi...@apache.org> 2010-08-26 07:49:11 EDT ---
Created an attachment (id=25949)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25949)
An actual working jar for testing

java -cp catalina.jar:tomcat-cli.jar org.apache.tomcat.cli.CLI start

needs catalina.jar on the classpath, because webapp.state is an enum, not an
integer.

-- 
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 49821] Tomcat CLI

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

--- Comment #1 from Pid <pi...@apache.org> 2010-08-25 14:39:20 EDT ---
Created an attachment (id=25939)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25939)
Prebuilt jar for quick testing

Try some commands:

 jar -jar tomcat-cli.jar help
 jar -jar tomcat-cli.jar help status

With a fresh Tomcat installed and running, it should automatically find it and
attach to it on a Sun JVM.

-- 
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 49821] Tomcat CLI

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

Pid <pi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #25939|0                           |1
        is obsolete|                            |

--- Comment #3 from Pid <pi...@apache.org> 2010-08-26 07:13:29 EDT ---
Created an attachment (id=25948)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25948)
Improved jar for testing

Fixed some functions, can start, stop, reload an application. status now
displays more useful stats

-- 
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


[Bug 49821] Tomcat CLI [PATCH/Contribution]

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

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Tomcat CLI                  |Tomcat CLI
                   |                            |[PATCH/Contribution]

-- 
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