Author: kkolinko Date: Wed Mar 6 01:08:51 2013 New Revision: 1453112 URL: http://svn.apache.org/r1453112 Log: Fix several issues with the schema, aligning it with actual output generated by StatusTransformer class. 1. Add memorypool element to status.xsd schema. 2. There is no minSpareThreads attribute on threadInfo. Removed it from xsl file as well. 3. There can be 0..many workers 4. There can be 1..many connectors
To test, one can save output of /manager/status?XML=true command and add the following attributes to the root <status> element: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="status.xsd" Modified: tomcat/trunk/webapps/manager/status.xsd tomcat/trunk/webapps/manager/xform.xsl Modified: tomcat/trunk/webapps/manager/status.xsd URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/manager/status.xsd?rev=1453112&r1=1453111&r2=1453112&view=diff ============================================================================== --- tomcat/trunk/webapps/manager/status.xsd (original) +++ tomcat/trunk/webapps/manager/status.xsd Wed Mar 6 01:08:51 2013 @@ -15,9 +15,15 @@ See the License for the specific language governing permissions and limitations under the License. --> -<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by peter lin (consultant) --> -<!--W3C Schema generated by XMLSPY v5 rel. 4 U (http://www.xmlspy.com)--> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + <xs:element name="status"> + <xs:complexType> + <xs:sequence> + <xs:element name="jvm" type="jvm"/> + <xs:element name="connector" type="connector" minOccurs="1" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> <xs:complexType name="connector"> <xs:sequence> <xs:element name="threadInfo" type="threadInfo"/> @@ -29,6 +35,7 @@ <xs:complexType name="jvm"> <xs:sequence> <xs:element name="memory" type="memory"/> + <xs:element name="memorypool" type="memorypool" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:complexType name="memory"> @@ -36,6 +43,14 @@ <xs:attribute name="total" type="xs:long" use="required"/> <xs:attribute name="max" type="xs:long" use="required"/> </xs:complexType> + <xs:complexType name="memorypool"> + <xs:attribute name="name" type="xs:string" use="required"/> + <xs:attribute name="type" type="xs:string" use="required"/> + <xs:attribute name="usageInit" type="xs:long" use="required"/> + <xs:attribute name="usageCommitted" type="xs:long" use="required"/> + <xs:attribute name="usageMax" type="xs:long" use="required"/> + <xs:attribute name="usageUsed" type="xs:long" use="required"/> + </xs:complexType> <xs:complexType name="requestInfo"> <xs:attribute name="maxTime" type="xs:long" use="required"/> <xs:attribute name="processingTime" type="xs:int" use="required"/> @@ -44,17 +59,8 @@ <xs:attribute name="bytesReceived" type="xs:long" use="required"/> <xs:attribute name="bytesSent" type="xs:long" use="required"/> </xs:complexType> - <xs:element name="status"> - <xs:complexType> - <xs:sequence> - <xs:element name="jvm" type="jvm"/> - <xs:element name="connector" type="connector"/> - </xs:sequence> - </xs:complexType> - </xs:element> <xs:complexType name="threadInfo"> <xs:attribute name="maxThreads" type="xs:int" use="required"/> - <xs:attribute name="minSpareThreads" type="xs:int" use="required"/> <xs:attribute name="currentThreadCount" type="xs:int" use="required"/> <xs:attribute name="currentThreadsBusy" type="xs:int" use="required"/> </xs:complexType> @@ -72,7 +78,7 @@ </xs:complexType> <xs:complexType name="workers"> <xs:sequence> - <xs:element name="worker" type="worker"/> + <xs:element name="worker" type="worker" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:schema> Modified: tomcat/trunk/webapps/manager/xform.xsl URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/manager/xform.xsl?rev=1453112&r1=1453111&r2=1453112&view=diff ============================================================================== --- tomcat/trunk/webapps/manager/xform.xsl (original) +++ tomcat/trunk/webapps/manager/xform.xsl Wed Mar 6 01:08:51 2013 @@ -81,9 +81,8 @@ <xsl:template match="threadInfo"> <table><tr> - <td><b>threadInfo </b></td> + <td><b>threadInfo</b></td> <td><b>maxThreads:</b> <xsl:value-of select="@maxThreads"/></td> - <td><b>minSpareThreads:</b> <xsl:value-of select="@minSpareThreads"/></td> <td><b>currentThreadCount:</b> <xsl:value-of select="@currentThreadCount"/></td> <td><b>currentThreadsBusy:</b> <xsl:value-of select="@currentThreadsBusy"/></td> </tr> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org