https://bz.apache.org/bugzilla/show_bug.cgi?id=58827
Bug ID: 58827
Summary: Review/remove references to JSR77 StateManageable
Product: Tomcat 9
Version: unspecified
Hardware: PC
Status: NEW
Severity: minor
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
Inspired by a recent javadoc fix commit r1723681.
/**
- * Support for "stateManageable" JSR77
+ * @return support for "stateManageable" JSR77
*/
public boolean isStateManageable() {
return true;
/**
- * JSR 77. Always return false.
+ * @return JSR 77. Always return <code>false</code>.
*/
public boolean isStateManageable() {
return false;
}
The above methods are implemented by StandardContext and StandardWrapper
respectively.
JSR77:
https://jcp.org/en/jsr/detail?id=77
I have not read JSR77 in detail, just a quick review.
reviewed ch.77.5 State Management
A StateManageable object is defined as implementing the following properties:
state: int
startTime: long
methods:
start()
startRecursive()
stop()
and sending events when a state changes.
The state is defined as 5 states coded by integer values,
0 STARTING
1 RUNNING
2 STOPPING
3 STOPPED
4 FAILED
Actual implementation in Tomcat:
StandardWrapper: - Tomcat 6
========================
public boolean isEventProvider() {
return false;
}
public boolean isStateManageable() {
return false;
}
public boolean isStatisticsProvider() {
return false;
}
The "eventProvider", "stateManageable", "statisticsProvider" properties exposed
to JMX.
The methods start(), stop() are implemented, but are our internal methods --
they are not exposed to JMX.
There is no implementation of getState(), getStartTime(), startRecursive().
StandardWrapper - Tomcat 7
=======
The "eventProvider", "stateManageable", "statisticsProvider" properties exposed
to JMX.
Methods isEventProvider(), isStatisticsProvider() are declared as deprecated.
StandardWrapper - Tomcat 8, 9
=======
"stateManageable" is exposed to JMX.
Methods isEventProvider(), isStatisticsProvider() and their JMX properties
removed.
StandardContext - Tomcat 6
============
StandardContext implements all the above properties / methods, although
"startRecursive" is not exposed to JMX.
[[[
public int getState() {
if( started ) {
return 1; // RUNNING
}
if( initialized ) {
return 0; // starting ?
}
if( ! available ) {
return 4; //FAILED
}
// 2 - STOPPING
return 3; // STOPPED
}
]]]
StandardContext - Tomcat 7
============
Lifecycle was redefined, the getState() method is defined in Lifecycle
interface and now returns a LifecycleState
The "state" property is no longer exposed to JMX.
startRecursive(), isEventProvider(), isStatisticsProvider() methods deprecated.
StandardContext - Tomcat 7/9
============
isStateManageable()/start()/stop()/getStartTime() are OK.
Deprecated methods are removed.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]