From 68fb9a03641e50fbb6c045ac2f39091bf0bf9d08 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Fri, 12 Feb 2010 22:30:38 +0000 Subject: I have added the license header to the files included in this commit. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@909641 13f79535-47bb-0310-9956-ffa450edef68 --- java/management/client/src/main/java/muse.xml | 397 +++--- .../qpid/management/domain/model/QpidEntity.java | 347 ++--- .../wsdm/muse/engine/WSDMAdapterEnvironment.java | 215 ++-- .../muse/engine/WSDMAdapterIsolationLayer.java | 93 +- .../router-entries/adapter/resource-instance-1.xml | 21 + .../consumer/resource-instance-1.xml | 25 +- .../src/main/java/wsdl/SOAP-Envelope-1_2.xsd | 341 ++--- .../src/main/java/wsdl/WS-Addressing-2005_08.xsd | 61 +- .../main/java/wsdl/WS-MetadataExchange-2004_09.xsd | 247 ++-- .../src/main/java/wsdl/WSDM-MUWS-Part1-1_1.xsd | 207 +-- .../src/main/java/wsdl/WSDM-MUWS-Part2-1_1.xsd | 1333 ++++++++++---------- .../src/main/java/wsdl/XML-Namespace-1998.xsd | 71 +- java/management/client/src/test/java/log4j.xml | 41 +- .../java/org/apache/qpid/management/wsdm/web.xml | 23 +- 14 files changed, 1858 insertions(+), 1564 deletions(-) (limited to 'java/management/client/src') diff --git a/java/management/client/src/main/java/muse.xml b/java/management/client/src/main/java/muse.xml index cf651c34ac..29a1c02e0c 100644 --- a/java/management/client/src/main/java/muse.xml +++ b/java/management/client/src/main/java/muse.xml @@ -1,188 +1,209 @@ - - - - java.lang.Object - org.apache.qpid.management.wsdm.muse.serializer.ObjectSerializer - - - java.util.Map - org.apache.qpid.management.wsdm.muse.serializer.MapSerializer - - - java.util.HashMap - org.apache.qpid.management.wsdm.muse.serializer.MapSerializer - - - java.util.UUID - org.apache.qpid.management.wsdm.muse.serializer.UUIDSerializer - - - org.apache.qpid.management.wsdm.capabilities.Result - org.apache.qpid.management.wsdm.muse.serializer.InvocationResultSerializer - - - java.util.Date - org.apache.qpid.management.wsdm.muse.serializer.DateSerializer - - - org.apache.muse.ws.resource.impl.WsResourceRouter - - log/muse.log - SEVERE - - - org.apache.muse.core.routing.RouterFilePersistence - router-entries - - - - consumer - - wsdl/WS-BaseNotification-1_3.wsdl - wsntw:NotificationConsumer - - org.apache.qpid.management.wsdm.common.QManResourceIdFactory - org.apache.muse.core.SimpleResource - - http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer - org.apache.muse.ws.notification.impl.SimpleNotificationConsumer - - - http://amqp.apache.org/qpid/management/qman/consumer - org.apache.qpid.management.wsdm.capabilities.ConsumerCapability - - - - SubscriptionManager - - wsdl/WS-BaseNotification-1_3.wsdl - wsntw:SubscriptionManager - - org.apache.qpid.management.wsdm.common.QManResourceIdFactory - org.apache.muse.ws.resource.impl.SimpleWsResource - - http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata - org.apache.muse.ws.metadata.impl.SimpleMetadataExchange - - - http://docs.oasis-open.org/wsrf/rpw-2/Get - org.apache.muse.ws.resource.properties.get.impl.SimpleGetCapability - - - http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager - org.apache.muse.ws.notification.impl.SimpleSubscriptionManager - - trace-notifications - true - - - - http://docs.oasis-open.org/wsrf/rlw-2/ImmediateResourceTermination - org.apache.muse.ws.resource.lifetime.impl.SimpleImmediateTermination - - - http://docs.oasis-open.org/wsrf/rlw-2/ScheduledResourceTermination - org.apache.muse.ws.resource.lifetime.impl.SimpleScheduledTermination - - - validate-wsrp-schema - false - - - - adapter - - wsdl/QManAdapter.wsdl - qman:QManAdapterPortType - - org.apache.qpid.management.wsdm.common.QManResourceIdFactory - org.apache.muse.ws.resource.impl.SimpleWsResource - - http://amqp.apache.org/qpid/management/qman - org.apache.qpid.management.wsdm.capabilities.QManAdapterCapability - - - http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata - org.apache.muse.ws.metadata.impl.SimpleMetadataExchange - - - http://docs.oasis-open.org/wsrf/rpw-2/Get - org.apache.muse.ws.resource.properties.get.impl.SimpleGetCapability - - - http://docs.oasis-open.org/wsrf/rpw-2/Query - org.apache.muse.ws.resource.properties.query.impl.SimpleQueryCapability - - - http://docs.oasis-open.org/wsrf/sgw-2/ServiceGroup - org.apache.muse.ws.resource.sg.impl.SimpleServiceGroup - - - http://docs.oasis-open.org/wsn/bw-2/NotificationProducer - org.apache.muse.ws.notification.impl.SimpleNotificationProducer - - - validate-wsrp-schema - false - - - - QManWsResource - - - wsdl/QManWsResource.wsdl - qman:QManWsResourcePortType - - org.apache.qpid.management.wsdm.common.ObjectNameIdFactory - org.apache.qpid.management.wsdm.muse.resources.QManWsResource - - http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata - org.apache.qpid.management.wsdm.capabilities.QManMetadataExchangeCapability - - - http://docs.oasis-open.org/wsrf/rpw-2/Get - org.apache.muse.ws.resource.properties.get.impl.SimpleGetCapability - - - http://docs.oasis-open.org/wsrf/rpw-2/Query - org.apache.muse.ws.resource.properties.query.impl.SimpleQueryCapability - - - http://docs.oasis-open.org/wsrf/rpw-2/Set - org.apache.muse.ws.resource.properties.set.impl.SimpleSetCapability - - - http://docs.oasis-open.org/wsrf/rpw-2/Put - org.apache.muse.ws.resource.properties.set.impl.SimpleSetCapability - - - - ServiceGroupEntry - - /wsdl/WS-ServiceGroupEntry-1_2.wsdl - wsrf-sgw:ServiceGroupEntryPortType - - org.apache.qpid.management.wsdm.common.QManResourceIdFactory - org.apache.muse.ws.resource.impl.SimpleWsResource - - http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata - org.apache.muse.ws.metadata.impl.SimpleMetadataExchange - - - http://docs.oasis-open.org/wsrf/rpw-2/Get - org.apache.muse.ws.resource.properties.get.impl.SimpleGetCapability - - - http://docs.oasis-open.org/wsrf/sgw-2/ServiceGroupEntry - org.apache.muse.ws.resource.sg.impl.SimpleEntry - - - validate-wsrp-schema - false - - - \ No newline at end of file + + + + + + java.lang.Object + org.apache.qpid.management.wsdm.muse.serializer.ObjectSerializer + + + java.util.Map + org.apache.qpid.management.wsdm.muse.serializer.MapSerializer + + + java.util.HashMap + org.apache.qpid.management.wsdm.muse.serializer.MapSerializer + + + java.util.UUID + org.apache.qpid.management.wsdm.muse.serializer.UUIDSerializer + + + org.apache.qpid.management.wsdm.capabilities.Result + org.apache.qpid.management.wsdm.muse.serializer.InvocationResultSerializer + + + java.util.Date + org.apache.qpid.management.wsdm.muse.serializer.DateSerializer + + + org.apache.muse.ws.resource.impl.WsResourceRouter + + log/muse.log + SEVERE + + + org.apache.muse.core.routing.RouterFilePersistence + router-entries + + + + consumer + + wsdl/WS-BaseNotification-1_3.wsdl + wsntw:NotificationConsumer + + org.apache.qpid.management.wsdm.common.QManResourceIdFactory + org.apache.muse.core.SimpleResource + + http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer + org.apache.muse.ws.notification.impl.SimpleNotificationConsumer + + + http://amqp.apache.org/qpid/management/qman/consumer + org.apache.qpid.management.wsdm.capabilities.ConsumerCapability + + + + SubscriptionManager + + wsdl/WS-BaseNotification-1_3.wsdl + wsntw:SubscriptionManager + + org.apache.qpid.management.wsdm.common.QManResourceIdFactory + org.apache.muse.ws.resource.impl.SimpleWsResource + + http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata + org.apache.muse.ws.metadata.impl.SimpleMetadataExchange + + + http://docs.oasis-open.org/wsrf/rpw-2/Get + org.apache.muse.ws.resource.properties.get.impl.SimpleGetCapability + + + http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager + org.apache.muse.ws.notification.impl.SimpleSubscriptionManager + + trace-notifications + true + + + + http://docs.oasis-open.org/wsrf/rlw-2/ImmediateResourceTermination + org.apache.muse.ws.resource.lifetime.impl.SimpleImmediateTermination + + + http://docs.oasis-open.org/wsrf/rlw-2/ScheduledResourceTermination + org.apache.muse.ws.resource.lifetime.impl.SimpleScheduledTermination + + + validate-wsrp-schema + false + + + + adapter + + wsdl/QManAdapter.wsdl + qman:QManAdapterPortType + + org.apache.qpid.management.wsdm.common.QManResourceIdFactory + org.apache.muse.ws.resource.impl.SimpleWsResource + + http://amqp.apache.org/qpid/management/qman + org.apache.qpid.management.wsdm.capabilities.QManAdapterCapability + + + http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata + org.apache.muse.ws.metadata.impl.SimpleMetadataExchange + + + http://docs.oasis-open.org/wsrf/rpw-2/Get + org.apache.muse.ws.resource.properties.get.impl.SimpleGetCapability + + + http://docs.oasis-open.org/wsrf/rpw-2/Query + org.apache.muse.ws.resource.properties.query.impl.SimpleQueryCapability + + + http://docs.oasis-open.org/wsrf/sgw-2/ServiceGroup + org.apache.muse.ws.resource.sg.impl.SimpleServiceGroup + + + http://docs.oasis-open.org/wsn/bw-2/NotificationProducer + org.apache.muse.ws.notification.impl.SimpleNotificationProducer + + + validate-wsrp-schema + false + + + + QManWsResource + + + wsdl/QManWsResource.wsdl + qman:QManWsResourcePortType + + org.apache.qpid.management.wsdm.common.ObjectNameIdFactory + org.apache.qpid.management.wsdm.muse.resources.QManWsResource + + http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata + org.apache.qpid.management.wsdm.capabilities.QManMetadataExchangeCapability + + + http://docs.oasis-open.org/wsrf/rpw-2/Get + org.apache.muse.ws.resource.properties.get.impl.SimpleGetCapability + + + http://docs.oasis-open.org/wsrf/rpw-2/Query + org.apache.muse.ws.resource.properties.query.impl.SimpleQueryCapability + + + http://docs.oasis-open.org/wsrf/rpw-2/Set + org.apache.muse.ws.resource.properties.set.impl.SimpleSetCapability + + + http://docs.oasis-open.org/wsrf/rpw-2/Put + org.apache.muse.ws.resource.properties.set.impl.SimpleSetCapability + + + + ServiceGroupEntry + + /wsdl/WS-ServiceGroupEntry-1_2.wsdl + wsrf-sgw:ServiceGroupEntryPortType + + org.apache.qpid.management.wsdm.common.QManResourceIdFactory + org.apache.muse.ws.resource.impl.SimpleWsResource + + http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata + org.apache.muse.ws.metadata.impl.SimpleMetadataExchange + + + http://docs.oasis-open.org/wsrf/rpw-2/Get + org.apache.muse.ws.resource.properties.get.impl.SimpleGetCapability + + + http://docs.oasis-open.org/wsrf/sgw-2/ServiceGroupEntry + org.apache.muse.ws.resource.sg.impl.SimpleEntry + + + validate-wsrp-schema + false + + + diff --git a/java/management/client/src/main/java/org/apache/qpid/management/domain/model/QpidEntity.java b/java/management/client/src/main/java/org/apache/qpid/management/domain/model/QpidEntity.java index a13da559fc..ea0acb5fd1 100644 --- a/java/management/client/src/main/java/org/apache/qpid/management/domain/model/QpidEntity.java +++ b/java/management/client/src/main/java/org/apache/qpid/management/domain/model/QpidEntity.java @@ -1,163 +1,184 @@ -package org.apache.qpid.management.domain.model; - -import java.util.HashMap; -import java.util.Map; - -import javax.management.Attribute; -import javax.management.AttributeList; -import javax.management.DynamicMBean; -import javax.management.MBeanInfo; -import javax.management.NotificationBroadcasterSupport; -import javax.management.ObjectName; -import javax.management.RuntimeOperationsException; - -import org.apache.qpid.management.Messages; -import org.apache.qpid.management.Names; -import org.apache.qpid.management.domain.model.type.Binary; -import org.apache.qpid.management.domain.services.QpidService; -import org.apache.qpid.management.jmx.EntityLifecycleNotification; -import org.apache.qpid.transport.util.Logger; - -/** - * Layer supertype for QMan entities. - */ -public abstract class QpidEntity extends NotificationBroadcasterSupport -{ - /** - * Layer supertype for QMan managed bean entities. - */ - abstract class QManManagedEntity implements DynamicMBean - { - // After mbean is registered with the MBean server this collection holds the mbean attribute values. - Map _attributes = new HashMap(); - - /** - * Creates or replace the given attribute. - * Note that this is not part of the management interface of this object instance and therefore will be accessible only - * from within this class. - * It is used to update directly the object attributes bypassing jmx interface. - * - * @param attributeName the name of the attribute. - * @param property newValue the new value of the attribute. - */ - void createOrReplaceAttributeValue(String attributeName, Object newValue) - { - _attributes.put(attributeName, newValue); - } - - /** - * Get the values of several attributes of the Dynamic MBean. - * - * @param attributes A list of the attributes to be retrieved. - * - * @return The list of attributes retrieved. - */ - public AttributeList getAttributes (String[] attributes) - { - if (attributes == null) - { - throw new RuntimeOperationsException(new IllegalArgumentException("Attributes array must not be null")); - } - - AttributeList result = new AttributeList(attributes.length); - for (int i = 0; i < attributes.length; i++) - { - String attributeName = attributes[i]; - try - { - result.add(new Attribute(attributeName,getAttribute(attributeName))); - } catch(Exception exception) - { - // Already logged. - } - } - return result; - } - - /** - * Returns metadata for this object instance. - */ - // Developer Note : note that this metadata is a member of the outer class definition : in that way we create - // that metadata only once and then it will be shared between all object instances (it's a readonly object) - public MBeanInfo getMBeanInfo () - { - return _metadata; - } - }; - - final Logger _logger = Logger.get(getClass()); - final static JmxService JMX_SERVICE = new JmxService(); - - final String _name; - final Binary _hash; - - final QpidPackage _parent; - MBeanInfo _metadata; - final QpidService _service; - - protected ObjectName _objectName; - - private final String _type; - - /** - * Builds a new class with the given name and package as parent. - * - * @param className the name of the class. - * @param hash the class schema hash. - * @param parentPackage the parent of this class. - */ - QpidEntity(String className, Binary hash, QpidPackage parentPackage,String type) - { - this._name = className; - this._parent = parentPackage; - this._hash = hash; - this._type = type; - this._service = new QpidService(_parent.getOwnerId()); - - _logger.debug( - Messages.QMAN_200020_ENTITY_DEFINITION_HAS_BEEN_BUILT, - _parent.getOwnerId(), - _parent.getName(), - _name); - } - - public String getName() - { - return _name; - } - - public String getPackageName() - { - return _parent.getName(); - } - - /** - * Internal method used to send a schema request for this entity. - * - * @throws Exception when the request cannot be sent. - */ - void requestSchema() throws Exception - { - - _objectName = JMX_SERVICE.createEntityDefinitionName(_parent.getName(), _name,_type); - JMX_SERVICE.registerEntityDefinition(_objectName,this,_parent.getName(),_name); - - try - { - _service.connect(); - _service.requestSchema(_parent.getName(), _name, _hash); - _service.sync(); - } finally - { - _service.close(); - } - - EntityLifecycleNotification notification = new EntityLifecycleNotification( - EntityLifecycleNotification.SCHEMA_REQUESTED_NOTIFICATION_TYPE, - _parent.getName(), - _name, - Names.CLASS, - _objectName); - sendNotification(notification); - } -} +package org.apache.qpid.management.domain.model; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * + */ + + +import java.util.HashMap; +import java.util.Map; + +import javax.management.Attribute; +import javax.management.AttributeList; +import javax.management.DynamicMBean; +import javax.management.MBeanInfo; +import javax.management.NotificationBroadcasterSupport; +import javax.management.ObjectName; +import javax.management.RuntimeOperationsException; + +import org.apache.qpid.management.Messages; +import org.apache.qpid.management.Names; +import org.apache.qpid.management.domain.model.type.Binary; +import org.apache.qpid.management.domain.services.QpidService; +import org.apache.qpid.management.jmx.EntityLifecycleNotification; +import org.apache.qpid.transport.util.Logger; + +/** + * Layer supertype for QMan entities. + */ +public abstract class QpidEntity extends NotificationBroadcasterSupport +{ + /** + * Layer supertype for QMan managed bean entities. + */ + abstract class QManManagedEntity implements DynamicMBean + { + // After mbean is registered with the MBean server this collection holds the mbean attribute values. + Map _attributes = new HashMap(); + + /** + * Creates or replace the given attribute. + * Note that this is not part of the management interface of this object instance and therefore will be accessible only + * from within this class. + * It is used to update directly the object attributes bypassing jmx interface. + * + * @param attributeName the name of the attribute. + * @param property newValue the new value of the attribute. + */ + void createOrReplaceAttributeValue(String attributeName, Object newValue) + { + _attributes.put(attributeName, newValue); + } + + /** + * Get the values of several attributes of the Dynamic MBean. + * + * @param attributes A list of the attributes to be retrieved. + * + * @return The list of attributes retrieved. + */ + public AttributeList getAttributes (String[] attributes) + { + if (attributes == null) + { + throw new RuntimeOperationsException(new IllegalArgumentException("Attributes array must not be null")); + } + + AttributeList result = new AttributeList(attributes.length); + for (int i = 0; i < attributes.length; i++) + { + String attributeName = attributes[i]; + try + { + result.add(new Attribute(attributeName,getAttribute(attributeName))); + } catch(Exception exception) + { + // Already logged. + } + } + return result; + } + + /** + * Returns metadata for this object instance. + */ + // Developer Note : note that this metadata is a member of the outer class definition : in that way we create + // that metadata only once and then it will be shared between all object instances (it's a readonly object) + public MBeanInfo getMBeanInfo () + { + return _metadata; + } + }; + + final Logger _logger = Logger.get(getClass()); + final static JmxService JMX_SERVICE = new JmxService(); + + final String _name; + final Binary _hash; + + final QpidPackage _parent; + MBeanInfo _metadata; + final QpidService _service; + + protected ObjectName _objectName; + + private final String _type; + + /** + * Builds a new class with the given name and package as parent. + * + * @param className the name of the class. + * @param hash the class schema hash. + * @param parentPackage the parent of this class. + */ + QpidEntity(String className, Binary hash, QpidPackage parentPackage,String type) + { + this._name = className; + this._parent = parentPackage; + this._hash = hash; + this._type = type; + this._service = new QpidService(_parent.getOwnerId()); + + _logger.debug( + Messages.QMAN_200020_ENTITY_DEFINITION_HAS_BEEN_BUILT, + _parent.getOwnerId(), + _parent.getName(), + _name); + } + + public String getName() + { + return _name; + } + + public String getPackageName() + { + return _parent.getName(); + } + + /** + * Internal method used to send a schema request for this entity. + * + * @throws Exception when the request cannot be sent. + */ + void requestSchema() throws Exception + { + + _objectName = JMX_SERVICE.createEntityDefinitionName(_parent.getName(), _name,_type); + JMX_SERVICE.registerEntityDefinition(_objectName,this,_parent.getName(),_name); + + try + { + _service.connect(); + _service.requestSchema(_parent.getName(), _name, _hash); + _service.sync(); + } finally + { + _service.close(); + } + + EntityLifecycleNotification notification = new EntityLifecycleNotification( + EntityLifecycleNotification.SCHEMA_REQUESTED_NOTIFICATION_TYPE, + _parent.getName(), + _name, + Names.CLASS, + _objectName); + sendNotification(notification); + } +} diff --git a/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/engine/WSDMAdapterEnvironment.java b/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/engine/WSDMAdapterEnvironment.java index b5d978e0e5..e4d0f25adc 100644 --- a/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/engine/WSDMAdapterEnvironment.java +++ b/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/engine/WSDMAdapterEnvironment.java @@ -1,97 +1,118 @@ -package org.apache.qpid.management.wsdm.muse.engine; - -import java.io.File; -import java.net.URI; - -import javax.servlet.ServletContext; - -import org.apache.muse.core.AbstractEnvironment; -import org.apache.muse.util.FileUtils; -import org.apache.muse.ws.addressing.EndpointReference; -import org.apache.qpid.management.Messages; -import org.apache.qpid.management.Names; -import org.apache.qpid.management.Protocol; -import org.apache.qpid.transport.util.Logger; - -/** - * QMan Adapter enviroment implementation. - * - * @author Andrea Gazzarini - */ -public class WSDMAdapterEnvironment extends AbstractEnvironment -{ - private final static Logger LOGGER = Logger.get(WSDMAdapterEnvironment.class); - private final File _realDirectory; - private final ServletContext _servletContext; - - /** - * Builds a new qman environment with the given application context. - * - * @param servletContext the application context. - */ - public WSDMAdapterEnvironment(ServletContext servletContext) - { - this._servletContext = servletContext; - String realDirectoryPath = servletContext.getRealPath(Names.WEB_APP_CLASSES_FOLDER); - - _realDirectory = (realDirectoryPath != null) - ? new File(realDirectoryPath) - : FileUtils.CURRENT_DIR; - - String defaultURI = getDefaultURIPrefix()+"adapter"; - setDefaultURI(defaultURI); - - LOGGER.info(Messages.QMAN_000029_DEFAULT_URI, defaultURI); - } - - /** - * Returns the endpoint created starting by this application default URI. - * - * @return the endpoint created starting by this application default URI. - */ - public EndpointReference getDeploymentEPR() - { - return new EndpointReference(URI.create(getDefaultURI())); - } - - /** - * Returns the application classes folder. - * - * @return the application classes folder. - */ - public File getRealDirectory() - { - return _realDirectory; - } - - /** - * Returns the default endpoint reference URI. - * - * @return the default endpoint reference URI. - */ - public String getDefaultURIPrefix() - { - return new StringBuilder() - .append("http://") - .append(System.getProperty( - Names.ADAPTER_HOST_PROPERTY_NAME, - Protocol.DEFAULT_QMAN_HOSTNAME)) - .append(":") - .append(System.getProperty( - Names.ADAPTER_PORT_PROPERTY_NAME, - String.valueOf(Protocol.DEFAULT_QMAN_PORT_NUMBER))) - .append(_servletContext.getContextPath()) - .append("/services/") - .toString(); - } - - /** - * Returns the context path name of QMan application. - * - * @return the context path name of QMan application. - */ - public String getContextPath() - { - return _servletContext.getContextPath(); - } -} \ No newline at end of file +package org.apache.qpid.management.wsdm.muse.engine; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * + */ + + +import java.io.File; +import java.net.URI; + +import javax.servlet.ServletContext; + +import org.apache.muse.core.AbstractEnvironment; +import org.apache.muse.util.FileUtils; +import org.apache.muse.ws.addressing.EndpointReference; +import org.apache.qpid.management.Messages; +import org.apache.qpid.management.Names; +import org.apache.qpid.management.Protocol; +import org.apache.qpid.transport.util.Logger; + +/** + * QMan Adapter enviroment implementation. + * + * @author Andrea Gazzarini + */ +public class WSDMAdapterEnvironment extends AbstractEnvironment +{ + private final static Logger LOGGER = Logger.get(WSDMAdapterEnvironment.class); + private final File _realDirectory; + private final ServletContext _servletContext; + + /** + * Builds a new qman environment with the given application context. + * + * @param servletContext the application context. + */ + public WSDMAdapterEnvironment(ServletContext servletContext) + { + this._servletContext = servletContext; + String realDirectoryPath = servletContext.getRealPath(Names.WEB_APP_CLASSES_FOLDER); + + _realDirectory = (realDirectoryPath != null) + ? new File(realDirectoryPath) + : FileUtils.CURRENT_DIR; + + String defaultURI = getDefaultURIPrefix()+"adapter"; + setDefaultURI(defaultURI); + + LOGGER.info(Messages.QMAN_000029_DEFAULT_URI, defaultURI); + } + + /** + * Returns the endpoint created starting by this application default URI. + * + * @return the endpoint created starting by this application default URI. + */ + public EndpointReference getDeploymentEPR() + { + return new EndpointReference(URI.create(getDefaultURI())); + } + + /** + * Returns the application classes folder. + * + * @return the application classes folder. + */ + public File getRealDirectory() + { + return _realDirectory; + } + + /** + * Returns the default endpoint reference URI. + * + * @return the default endpoint reference URI. + */ + public String getDefaultURIPrefix() + { + return new StringBuilder() + .append("http://") + .append(System.getProperty( + Names.ADAPTER_HOST_PROPERTY_NAME, + Protocol.DEFAULT_QMAN_HOSTNAME)) + .append(":") + .append(System.getProperty( + Names.ADAPTER_PORT_PROPERTY_NAME, + String.valueOf(Protocol.DEFAULT_QMAN_PORT_NUMBER))) + .append(_servletContext.getContextPath()) + .append("/services/") + .toString(); + } + + /** + * Returns the context path name of QMan application. + * + * @return the context path name of QMan application. + */ + public String getContextPath() + { + return _servletContext.getContextPath(); + } +} diff --git a/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/engine/WSDMAdapterIsolationLayer.java b/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/engine/WSDMAdapterIsolationLayer.java index 0ca19bc727..e9a74bf60c 100644 --- a/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/engine/WSDMAdapterIsolationLayer.java +++ b/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/engine/WSDMAdapterIsolationLayer.java @@ -1,36 +1,57 @@ -package org.apache.qpid.management.wsdm.muse.engine; - -import javax.servlet.ServletContext; - -import org.apache.muse.core.Environment; -import org.apache.muse.core.platform.mini.MiniIsolationLayer; - -/** - * QMan specific implementation of the Apache Muse isolation layer. - * If you are a Muse expert you were wondering why don't we use the muse default implementation... - * well, - * - * @author Andrea Gazzarini - */ -public class WSDMAdapterIsolationLayer extends MiniIsolationLayer -{ - /** - * Builds a new isolation layer with the given application context. - * - * @param initialContext the application context. - */ - public WSDMAdapterIsolationLayer(ServletContext initialContext) - { - super(null, initialContext); - } - - /** - * WSDMAdapterEnvironment factory method. - * - * @return the environment. - */ - protected Environment createEnvironment() - { - return new WSDMAdapterEnvironment(getInitialContext()); - } -} \ No newline at end of file +package org.apache.qpid.management.wsdm.muse.engine; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * + */ + + +import javax.servlet.ServletContext; + +import org.apache.muse.core.Environment; +import org.apache.muse.core.platform.mini.MiniIsolationLayer; + +/** + * QMan specific implementation of the Apache Muse isolation layer. + * If you are a Muse expert you were wondering why don't we use the muse default implementation... + * well, + * + * @author Andrea Gazzarini + */ +public class WSDMAdapterIsolationLayer extends MiniIsolationLayer +{ + /** + * Builds a new isolation layer with the given application context. + * + * @param initialContext the application context. + */ + public WSDMAdapterIsolationLayer(ServletContext initialContext) + { + super(null, initialContext); + } + + /** + * WSDMAdapterEnvironment factory method. + * + * @return the environment. + */ + protected Environment createEnvironment() + { + return new WSDMAdapterEnvironment(getInitialContext()); + } +} diff --git a/java/management/client/src/main/java/router-entries/adapter/resource-instance-1.xml b/java/management/client/src/main/java/router-entries/adapter/resource-instance-1.xml index f7d72c2903..062791fa3f 100644 --- a/java/management/client/src/main/java/router-entries/adapter/resource-instance-1.xml +++ b/java/management/client/src/main/java/router-entries/adapter/resource-instance-1.xml @@ -1,2 +1,23 @@ + + diff --git a/java/management/client/src/main/java/router-entries/consumer/resource-instance-1.xml b/java/management/client/src/main/java/router-entries/consumer/resource-instance-1.xml index 599ac87a57..062791fa3f 100644 --- a/java/management/client/src/main/java/router-entries/consumer/resource-instance-1.xml +++ b/java/management/client/src/main/java/router-entries/consumer/resource-instance-1.xml @@ -1,2 +1,23 @@ - - \ No newline at end of file + + + + diff --git a/java/management/client/src/main/java/wsdl/SOAP-Envelope-1_2.xsd b/java/management/client/src/main/java/wsdl/SOAP-Envelope-1_2.xsd index 5aba6591fe..ab38b1b7f2 100644 --- a/java/management/client/src/main/java/wsdl/SOAP-Envelope-1_2.xsd +++ b/java/management/client/src/main/java/wsdl/SOAP-Envelope-1_2.xsd @@ -1,160 +1,181 @@ - - - - - - - - - - - - - - - - - - - - - - - Elements replacing the wildcard MUST be namespace qualified, but can be in the targetNamespace - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Fault reporting structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + Elements replacing the wildcard MUST be namespace qualified, but can be in the targetNamespace + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fault reporting structure + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/management/client/src/main/java/wsdl/WS-Addressing-2005_08.xsd b/java/management/client/src/main/java/wsdl/WS-Addressing-2005_08.xsd index 9bf9b10b7f..04b4a688b3 100644 --- a/java/management/client/src/main/java/wsdl/WS-Addressing-2005_08.xsd +++ b/java/management/client/src/main/java/wsdl/WS-Addressing-2005_08.xsd @@ -1,22 +1,43 @@ - + + - - - @@ -24,7 +45,7 @@ - @@ -33,7 +54,7 @@ - @@ -44,10 +65,10 @@ - - @@ -59,7 +80,7 @@ - @@ -73,7 +94,7 @@ - @@ -107,18 +128,18 @@ - - - @@ -127,7 +148,7 @@ - @@ -139,7 +160,7 @@ - diff --git a/java/management/client/src/main/java/wsdl/WS-MetadataExchange-2004_09.xsd b/java/management/client/src/main/java/wsdl/WS-MetadataExchange-2004_09.xsd index 771a801f57..4cef35b510 100644 --- a/java/management/client/src/main/java/wsdl/WS-MetadataExchange-2004_09.xsd +++ b/java/management/client/src/main/java/wsdl/WS-MetadataExchange-2004_09.xsd @@ -1,113 +1,134 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/management/client/src/main/java/wsdl/WSDM-MUWS-Part1-1_1.xsd b/java/management/client/src/main/java/wsdl/WSDM-MUWS-Part1-1_1.xsd index dd74c23681..c24e97a9ce 100644 --- a/java/management/client/src/main/java/wsdl/WSDM-MUWS-Part1-1_1.xsd +++ b/java/management/client/src/main/java/wsdl/WSDM-MUWS-Part1-1_1.xsd @@ -1,93 +1,114 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/management/client/src/main/java/wsdl/WSDM-MUWS-Part2-1_1.xsd b/java/management/client/src/main/java/wsdl/WSDM-MUWS-Part2-1_1.xsd index 51233a0989..5ea0954734 100644 --- a/java/management/client/src/main/java/wsdl/WSDM-MUWS-Part2-1_1.xsd +++ b/java/management/client/src/main/java/wsdl/WSDM-MUWS-Part2-1_1.xsd @@ -1,656 +1,677 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/management/client/src/main/java/wsdl/XML-Namespace-1998.xsd b/java/management/client/src/main/java/wsdl/XML-Namespace-1998.xsd index 998a8001de..f51b67f78f 100644 --- a/java/management/client/src/main/java/wsdl/XML-Namespace-1998.xsd +++ b/java/management/client/src/main/java/wsdl/XML-Namespace-1998.xsd @@ -1,25 +1,46 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/management/client/src/test/java/log4j.xml b/java/management/client/src/test/java/log4j.xml index 34634b7738..891e7908e2 100644 --- a/java/management/client/src/test/java/log4j.xml +++ b/java/management/client/src/test/java/log4j.xml @@ -1,4 +1,25 @@ + + @@ -11,15 +32,15 @@ value="%d{ABSOLUTE} %-5p [%c{1}] %m%n" /> - - - - - - - - - + + + + + + + + + @@ -29,4 +50,4 @@ - \ No newline at end of file + diff --git a/java/management/client/src/test/java/org/apache/qpid/management/wsdm/web.xml b/java/management/client/src/test/java/org/apache/qpid/management/wsdm/web.xml index d0a9eb20a4..df273bd841 100644 --- a/java/management/client/src/test/java/org/apache/qpid/management/wsdm/web.xml +++ b/java/management/client/src/test/java/org/apache/qpid/management/wsdm/web.xml @@ -1,4 +1,25 @@ + + @@ -8,4 +29,4 @@ org.apache.qpid.management.wsdm.QEmuInitializer 1 - \ No newline at end of file + -- cgit v1.2.1