Author: kkolinko Date: Wed Mar 6 01:38:50 2013 New Revision: 1453119 URL: http://svn.apache.org/r1453119 Log: Merged revision 1453112 from tomcat/trunk: 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. I removed it from xform.xsl stylesheet 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/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml tomcat/tc7.0.x/trunk/webapps/manager/status.xsd tomcat/tc7.0.x/trunk/webapps/manager/xform.xsl Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1453112 Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1453119&r1=1453118&r2=1453119&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Mar 6 01:38:50 2013 @@ -136,6 +136,11 @@ Disable support for comments on Changelog page of Tomcat documentation. (kkolinko) </update> + <fix> + Fix several issues with <code>status.xsd</code> schema in Manager web + application, testing it against actual output of StatusTransformer + class. (kkolinko) + </fix> </changelog> </subsection> <subsection name="Other"> Modified: tomcat/tc7.0.x/trunk/webapps/manager/status.xsd URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/manager/status.xsd?rev=1453119&r1=1453118&r2=1453119&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/manager/status.xsd (original) +++ tomcat/tc7.0.x/trunk/webapps/manager/status.xsd Wed Mar 6 01:38:50 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/tc7.0.x/trunk/webapps/manager/xform.xsl URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/manager/xform.xsl?rev=1453119&r1=1453118&r2=1453119&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/manager/xform.xsl (original) +++ tomcat/tc7.0.x/trunk/webapps/manager/xform.xsl Wed Mar 6 01:38:50 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