https://bz.apache.org/bugzilla/show_bug.cgi?id=60927

            Bug ID: 60927
           Summary: JMX domain name for embed tomcat is inconsistent with
                    standard tomcat
           Product: Tomcat 9
           Version: 9.0.0.M18
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: huxing.zh...@gmail.com
  Target Milestone: -----

Background:

Tomcat provides the org.apache.catalina.startup.Tomcat class to easily build
embedded web applications. By default, it set the name "Tomcat" for both
Service and Engine component.

However, for a "standard" tomcat instance, the default name is "Catalina",
which is configured via server.xml.

Because the name is part of the object name for JMX, external programs will
suffer from inconsistent object names when monitoring tomcat under such two
scenarios. For example, a spring-boot application uses embedded tomcat as
default servlet container, to query the tomcat version exposed by
StandardServer, one must use 'Tomcat:type=Server' as object name.


Proposal:

Ensure the object name of all internal components are consistent for both
standard and embedded tomcat scenarios.

Details improvements includes:
1. Change the default name of embedded tomcat to 'Catalina', to achieve this, I
think we just need to remove the explicit call to 'setName( "Tomcat" )' since
'Catalina' is the default name.
2. Provide a programmable interface for org.apache.catalina.startup.Tomcat (
via both constructor and setter) so that the name of Tomcat can be configurable
rather that hard-coded 'Tomcat'.

Any thoughts?

I would like to provide a patch if it is agreed to do so.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to