tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Patches to Tomcat - number of versions and how to add a JMX attribute
Date Mon, 08 Apr 2013 18:24:59 GMT
2013/4/8 Jason McIntosh <mcintoshj@gmail.com>:
> Devs:
> I wanted to get some input on this patch.  It adds the ability to specify
> how many versions to remove, when undeployOldVersions is set and parallel
> deployments occur.  This is my first attempt at patching tomcat, and I’m
> not totally sure I’ve got everything, have met tomcat standards, etc.
> Specifically, I'm not sure if I should really add more attributes to the
> interface or not, as that could break some things if the API was set for
> 7.0. Here’s the bugzilla link where I submitted this:
>
> https://issues.apache.org/bugzilla/show_bug.cgi?id=54808
>

1. Do not use tab characters. All indenting is done using spaces.

Most of the code uses "Java formatting" as specified by Sun and as is
available in many IDEs, but using spaces instead of tabs+spaces combo.

http://tomcat.apache.org/getinvolved.html

2. BUILDING.txt mentions how to run Checkstyle against the source
code. There may be several quirks. E.g. current trunk does not allow
trailing whitespace on lines.

I usually configure Eclipse IDE to display whitespace characters in Editor.

3. When submitting a patch, please mention for what branch of Tomcat it is.

>
> Additionally, I’m working on adding a patch to add a JMX attribute on what
> “current” versions of any given application should be responding to
> requests (tied to parallel deployments as well).  Any advice on where in
> the code to start on this?

A getter/setter and several lines in mbeans-descriptors.xml file.

I do not understand your description of the feature that you are
trying to add (“current” versions etc.).  Maybe you can explain it in
more details?


> I’m having a hard time finding where the
> parallel deployment process kicks in and how to register the JMX
> attribute.  For example, I saw the HostConfig class (where I added my patch
> code), but I’m not seeing any place where that shows up in JConsole.  Based
> on the mbeans descriptors, I would have thought it’d have shown up under
> Catalina/Listener but there is no such section in JConsole.  I could add a
> new attribute to the Host JMX definitions to track this, but not sure
> that’s the right place either.  Wanted to get some advice on this.

StandardHost and StandardContext should show up.

If I have "examples##1" and "examples##2" then with current Tomcat
trunk I see in JConsole

Catalina -> Host -> localhost
Catalina -> WebModule -> //localhost/examples##1
Catalina -> WebModule -> //localhost/examples##2

Best regards,
Konstantin Kolinko

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


Mime
View raw message