You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2006/03/31 16:20:06 UTC
svn commit: r390425 [2/2] - in
/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management:
./ src/org/apache/axis2/management/console/web/
src/org/apache/axis2/management/console/web/stubs/
src/org/apache/axis2/management/core/admi...
Modified: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/interfaces/ws/AxisServiceStats.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/interfaces/ws/AxisServiceStats.java?rev=390425&r1=390424&r2=390425&view=diff
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/interfaces/ws/AxisServiceStats.java (original)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/interfaces/ws/AxisServiceStats.java Fri Mar 31 06:20:02 2006
@@ -1,69 +1,72 @@
-package org.apache.axis2.management.interfaces.ws;
-
-import org.apache.axis2.management.core.managers.DynamicStatsManager;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.context.ConfigurationContext;
-
-import org.apache.ws.commons.om.OMAbstractFactory;
-import org.apache.ws.commons.om.OMElement;
-import org.apache.ws.commons.om.OMFactory;
-import org.apache.ws.commons.om.OMNamespace;
-
-import javax.xml.stream.XMLStreamException;
-
-public class AxisServiceStats extends AbstractDMService {
-
- private MessageContext msgContext = null;
- private ConfigurationContext configContext = null;
-
- public void init(MessageContext context) {
- msgContext = context;
- configContext = context.getConfigurationContext();
- }
-
-
- public OMElement getInfo() throws XMLStreamException {
-
- System.out.println("INFO: " + msgContext.getAxisService().getName());
-
- return packValue("This is the AxisServiceStats service.");
- }
-
-
- public void setServiceToMonitor(OMElement element) throws XMLStreamException {
-
- String[] params = getParameters(element);
-
- DynamicStatsManager dynamicStatsManager = (DynamicStatsManager)configContext.getProperty("dynamic_stats");
- dynamicStatsManager.setServiceToMonitor(params[0]);
- }
-
-
- public OMElement getInMessages(OMElement element) throws XMLStreamException {
-
- String[] params = getParameters(element);
-
- DynamicStatsManager dynamicStatsManager = (DynamicStatsManager)configContext.getProperty("dynamic_stats");
-
- int totalRequests = 0;
- try {
- totalRequests = dynamicStatsManager.getMonitoredService(params[0]).getInMessages();
- } catch(AxisFault af) {System.out.println("===== EXCEPTION: " + af.getMessage() + "=====");}
-
- return packValue(new Integer(totalRequests).toString());
- }
-
-
- public void clearInMessages(OMElement element) throws XMLStreamException {
-
- String[] params = getParameters(element);
-
- DynamicStatsManager dynamicStatsManager = (DynamicStatsManager)configContext.getProperty("dynamic_stats");
-
- try {
- dynamicStatsManager.getMonitoredService(params[0]).clearInMessages();
- } catch(AxisFault af) {System.out.println("===== EXCEPTION: " + af.getMessage() + "=====");}
- }
-}
+package org.apache.axis2.management.interfaces.ws;
+
+import org.apache.axis2.management.core.managers.DynamicStatsManager;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.ConfigurationContext;
+
+import org.apache.ws.commons.om.OMAbstractFactory;
+import org.apache.ws.commons.om.OMElement;
+import org.apache.ws.commons.om.OMFactory;
+import org.apache.ws.commons.om.OMNamespace;
+
+import javax.xml.stream.XMLStreamException;
+
+public class AxisServiceStats extends AbstractDMService {
+
+ private MessageContext msgContext = null;
+ private ConfigurationContext configContext = null;
+
+ public void init(MessageContext context) {
+ msgContext = context;
+ configContext = context.getConfigurationContext();
+ }
+
+
+ public OMElement getInfo() throws XMLStreamException {
+
+ System.out.println("INFO: " + msgContext.getAxisService().getName());
+
+ return packValue("This is the AxisServiceStats service.");
+ }
+
+
+ public OMElement setServiceToMonitor(OMElement element) throws XMLStreamException {
+
+ System.out.println("INFO: AxisServiceStats.setServiceToMonitor invoked.");
+ String[] params = getParameters(element);
+
+ DynamicStatsManager dynamicStatsManager = (DynamicStatsManager)configContext.getProperty("dynamic_stats");
+ dynamicStatsManager.setServiceToMonitor(params[0]);
+
+ return packValue("Successfully completed the operation.");
+ }
+
+
+ public OMElement getInMessages(OMElement element) throws XMLStreamException {
+
+ String[] params = getParameters(element);
+
+ DynamicStatsManager dynamicStatsManager = (DynamicStatsManager)configContext.getProperty("dynamic_stats");
+
+ int totalRequests = 0;
+ try {
+ totalRequests = dynamicStatsManager.getMonitoredService(params[0]).getInMessages();
+ } catch(AxisFault af) {System.out.println("===== EXCEPTION: " + af.getMessage() + "=====");}
+
+ return packValue(new Integer(totalRequests).toString());
+ }
+
+
+ public void clearInMessages(OMElement element) throws XMLStreamException {
+
+ String[] params = getParameters(element);
+
+ DynamicStatsManager dynamicStatsManager = (DynamicStatsManager)configContext.getProperty("dynamic_stats");
+
+ try {
+ dynamicStatsManager.getMonitoredService(params[0]).clearInMessages();
+ } catch(AxisFault af) {System.out.println("===== EXCEPTION: " + af.getMessage() + "=====");}
+ }
+}
Modified: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/xdocs/management.html
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/xdocs/management.html?rev=390425&r1=390424&r2=390425&view=diff
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/xdocs/management.html (original)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/xdocs/management.html Fri Mar 31 06:20:02 2006
@@ -1,49 +1,58 @@
-
-<html>
- <head>
- <title>Axis2 - Management Interface</title>
- </head>
-
- <body>
-
- <h1>Axis2 - Management Interface</h1>
-
- <h2>Introduction</h2>
-
- <p align="left">Axis2 - Management Interface wraps manageable components of Axis2 and provides interfaces to manage remote Axis2 engines using management applications.
- Currently it only provides web services interface. But it can be extended to support other interfaces like JMX. It also provides a web based management console
- to monitor and configure remote Axis2 engines.</p>
-
- <h2>Building and installing the management interface</h2>
-
- <p>Axis2 - Management interface consists of four componenets:
-
- <ul>
- <li>Management classes - management.jar</li>
- <li>Management module - management.mar</li>
- <li>Management web services - management.aar</li>
- <li>Web based management console - axis2console.war</li>
- </ul>
-
- <p align="left">A maven build script is provided to compile and build all these components. As management components depend on Axis2 libraries,
- first check out Axis2 source and build it. This will download all necessary jars to the Maven repository. Then follow the steps provided below
- to build and install the management interface:</p>
-
- <ul>
- <li>Deploy "axis2.war" in a servlet container. This will extract the Axis2 directory structure.<li>Check out the management interface code.</li>
- <li>Type "maven all" to compile and make the management components. The components mentioned above will be built in the "target" directory.</li>
- <li>Copy "management.jar" to "axis2\WEB-INF\lib" directory of the extracted directory structure.</li>
- <li>Copy "management.mar" to "axis2\WEB-INF\modules" directory of the extracted directory structure.</li>
- <li>Copy "management.aar" to "axis2\WEB-INF\services" directory of the extracted directory structure..</li>
- <li>Add a new phase called "monitorPhase" to all flows in the "axis2\WEB-INF\conf\axis2.xml" file.</li>
- <li>Deploy "axis2console.war" in a servlet container.</li>
- <li>Restart Axis2.</li>
- </ul>
-
- <p align="left">Now Axis2 is management enabled. To test the management interface, open Axis2 Console in a web browser by typing the address
- "http://<host>/axis2console/login".
- This will bring up the login screen of the management console. Type the address of the remote Axis2 engine and click "Login". This will display the configuration
- of the remote engine and provides methods to configure it.</p>
-
- </body>
+
+<html>
+ <head>
+ <title>Axis2 - Management Interface</title>
+ </head>
+
+ <body>
+
+ <h1>Axis2 - Management Interface</h1>
+
+ <h2>Introduction</h2>
+
+ <p align="left">Axis2 - Management Interface wraps manageable components of Axis2 and provides interfaces to manage remote Axis2 engines using management applications.
+ It exposes the management functionalities using web services and JMX. It also provides a web based management console
+ to monitor and configure remote Axis2 engines.</p>
+
+ <h2>Building and installing the management interface</h2>
+
+ <p>Axis2 - Management interface consists of four componenets:
+
+ <ul>
+ <li>Management classes - management.jar</li>
+ <li>Management module - management.mar</li>
+ <li>Management web services - management.aar</li>
+ <li>Web based management console - axis2console.war</li>
+ </ul>
+
+ <p align="left">A maven build script is provided to compile and build all these components. As management components depend on Axis2 libraries,
+ first check out Axis2 source and build it. This will download all necessary jars to the Maven repository. Then follow the steps provided below
+ to build and install the management interface:</p>
+
+ <ul>
+ <li>Deploy "axis2.war" in a servlet container. This will extract the Axis2 directory structure.<li>Check out the management interface code.</li>
+ <li>Type "maven all" to compile and make the management components. The components mentioned above will be built in the "target" directory.</li>
+ <li>Copy "management.jar" to "axis2\WEB-INF\lib" directory of the extracted directory structure.</li>
+ <li>Copy "management.mar" to "axis2\WEB-INF\modules" directory of the extracted directory structure.</li>
+ <li>Copy "management.aar" to "axis2\WEB-INF\services" directory of the extracted directory structure..</li>
+ <li>Add a new phase called "monitorPhase" to all flows in the "axis2\WEB-INF\conf\axis2.xml" file.</li>
+ <li>Deploy "axis2console.war" in a servlet container.</li>
+ <li>Make the Axis2 jars accessible from axis2console classes as it uses Axis2 as a web services client. In Tomcat, this can be done by copying the jar files in "webapps\axis2\WEB-INF\lib" to the "shared\lib" directory.</li>
+ <li>Restart Axis2.</li>
+ </ul>
+
+ <p align="left">Now Axis2 is management enabled. To test the management interface, open Axis2 Console in a web browser by typing the address
+ "http://<host>/axis2console/login".
+ This will bring up the login screen of the management console. Type the address of the remote Axis2 engine and click "Login". This will display the configuration
+ of the remote engine and provides methods to configure it.</p>
+
+ <h2>JMX Support</h2>
+
+ <p>Axis2 Management Subsystem exposes its interface using JMX for the compatibility with JMX based management applications.
+ JVM running Axis2 should be JMX enabled in order to use the JMX interface. After that, JMX management applications can connect to the JVM
+ and manage Axis2 using exposed MBeans.</p>
+
+ <ul
+
+ </body>
</html>