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 de...@apache.org on 2006/03/08 10:01:53 UTC
svn commit: r384160 [4/4] - in
/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module: ./
management/ management/etc/ management/resources/
management/resources/management-console/
management/resources/management-console/css/ management/r...
Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/interfaces/ws/AxisTransports.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/interfaces/ws/AxisTransports.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/interfaces/ws/AxisTransports.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/interfaces/ws/AxisTransports.java Wed Mar 8 01:01:46 2006
@@ -0,0 +1,118 @@
+package org.apache.axis2.management.interfaces.ws;
+
+import org.apache.axis2.management.core.managers.TransportManager;
+
+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 AxisTransports extends AbstractDMService {
+
+
+ public OMElement getInfo() throws XMLStreamException {
+ return packValue("This is the AxisTransports transport management web transport.");
+ }
+
+
+ public OMElement getTransportInParameters(OMElement element) throws XMLStreamException {
+
+ String[] params = getParameters(element);
+
+ TransportManager transportManager = getTransportManager();
+ String[] transportParameters = transportManager.getTransportInParameters(params[0]);
+
+ return packValues(transportParameters);
+ }
+
+
+ public OMElement isTransportInParameter(OMElement element) {
+
+ String[] params = getParameters(element);
+
+ TransportManager transportManager = getTransportManager();
+ boolean available = transportManager.isTransportInParameter(params[0], params[1]);
+
+ OMElement result;
+ if(available)
+ result = packValue("TRUE");
+ else
+ result = packValue("FALSE");
+
+ return result;
+ }
+
+
+ public OMElement addTransportInParameter(OMElement element) throws XMLStreamException {
+
+ String[] params = getParameters(element);
+
+ TransportManager transportManager = getTransportManager();
+ transportManager.addTransportInParameter(params[0], params[1], params[2]);
+
+ return packValue("OUT NOT AVAILABLE");
+ }
+
+
+ public OMElement editTransportInParameter(OMElement element) throws XMLStreamException {
+
+ String[] params = getParameters(element);
+
+ TransportManager transportManager = getTransportManager();
+ String result = transportManager.editTransportInParameter(params[0], params[1], params[2]);
+
+ return packValue(result);
+ }
+
+
+ public OMElement getTransportOutParameters(OMElement element) throws XMLStreamException {
+
+ String[] params = getParameters(element);
+
+ TransportManager transportManager = getTransportManager();
+ String[] transportParameters = transportManager.getTransportOutParameters(params[0]);
+
+ return packValues(transportParameters);
+ }
+
+
+ public OMElement isTransportOutParameter(OMElement element) {
+
+ String[] params = getParameters(element);
+
+ TransportManager transportManager = getTransportManager();
+ boolean available = transportManager.isTransportOutParameter(params[0], params[1]);
+
+ OMElement result;
+ if(available)
+ result = packValue("TRUE");
+ else
+ result = packValue("FALSE");
+
+ return result;
+ }
+
+
+ public OMElement addTransportOutParameter(OMElement element) throws XMLStreamException {
+
+ String[] params = getParameters(element);
+
+ TransportManager transportManager = getTransportManager();
+ transportManager.addTransportOutParameter(params[0], params[1], params[2]);
+
+ return packValue("OUT NOT AVAILABLE");
+ }
+
+
+ public OMElement editTransportOutParameter(OMElement element) throws XMLStreamException {
+
+ String[] params = getParameters(element);
+
+ TransportManager transportManager = getTransportManager();
+ String result = transportManager.editTransportOutParameter(params[0], params[1], params[2]);
+
+ return packValue(result);
+ }
+}
Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/invoker/DMHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/invoker/DMHandler.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/invoker/DMHandler.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/invoker/DMHandler.java Wed Mar 8 01:01:46 2006
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.management.invoker;
+
+import org.apache.axis2.management.core.managers.DynamicStatsManager;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.Handler;
+import org.apache.axis2.handlers.AbstractHandler;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.xml.namespace.QName;
+
+public class DMHandler extends AbstractHandler implements Handler {
+ private Log log = LogFactory.getLog(getClass());
+ private QName name;
+
+ public QName getName() {
+ return name;
+ }
+
+ public void invoke(MessageContext msgContext) throws AxisFault {
+
+ DynamicStatsManager dynamicStatsManager = (DynamicStatsManager)msgContext.getConfigurationContext().getProperty("dynamic_stats");
+ dynamicStatsManager.updateStats(msgContext);
+ }
+
+ public void revoke(MessageContext msgContext) {
+
+ }
+
+ public void setName(QName name) {
+ this.name = name;
+ }
+
+}
Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/invoker/DMModule.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/invoker/DMModule.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/invoker/DMModule.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/invoker/DMModule.java Wed Mar 8 01:01:46 2006
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.axis2.management.invoker;
+
+import org.apache.axis2.management.core.admin.DMAdmin;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.description.AxisDescription;
+import org.apache.axis2.description.AxisModule;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.modules.Module;
+
+import javax.xml.namespace.QName;
+
+public class DMModule implements Module {
+
+
+ // initialize the module
+ public void init(ConfigurationContext configContext, AxisModule module) throws AxisFault {
+
+ System.out.println("STARTING AXIS2-DM - AXIS2 DISTRIBUTED MANAGEMENT FRAMEWORK");
+ new DMAdmin().initManagement(configContext);
+ AxisConfiguration axisConfig = configContext.getAxisConfiguration();
+ axisConfig.engageModule(new QName("management"));
+ }
+
+ public void engageNotify(AxisDescription axisDescription) throws AxisFault {
+ }
+
+ // shutdown the module
+ public void shutdown(AxisConfiguration axisSystem) throws AxisFault {
+ }
+
+ public String[] getPolicyNamespaces() {
+ return null;
+ }
+}
Added: 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=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/xdocs/management.html (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/xdocs/management.html Wed Mar 8 01:01:46 2006
@@ -0,0 +1,49 @@
+
+<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>
\ No newline at end of file