Author: andreasmyth
Date: Wed Aug 8 03:39:47 2007
New Revision: 563804
URL: http://svn.apache.org/viewvc?view=rev&rev=563804
Log:
[JIRA CXF-861] RM feature to setup interceptors and configure properties other
then the RMAssertion parameters, e.g. sequence termination policies, persistent
store etc.
Also added store attribute to rmManager bean, and new bean to configure the
transactional store.
Added:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/feature/
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/feature/RMFeature.java
(with props)
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMFeatureBeanDefinitionParser.java
(with props)
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMTxStoreBeanDefinitionParser.java
(with props)
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/manager-bean.xml
(with props)
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreConfigurationTest.java
(with props)
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-bean.xml
(with props)
Removed:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/oneway-client-crash.xml
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/NamespaceHandler.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMManagerBeanDefinitionParser.java
incubator/cxf/trunk/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager-types.xsd
incubator/cxf/trunk/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager.xsd
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerConfigurationTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent-message-loss-server.xml
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent.xml
Added:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/feature/RMFeature.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/feature/RMFeature.java?view=auto&rev=563804
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/feature/RMFeature.java
(added)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/feature/RMFeature.java
Wed Aug 8 03:39:47 2007
@@ -0,0 +1,106 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.ws.rm.feature;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.interceptor.InterceptorProvider;
+import org.apache.cxf.ws.rm.RMInInterceptor;
+import org.apache.cxf.ws.rm.RMManager;
+import org.apache.cxf.ws.rm.RMOutInterceptor;
+import org.apache.cxf.ws.rm.manager.DeliveryAssuranceType;
+import org.apache.cxf.ws.rm.manager.DestinationPolicyType;
+import org.apache.cxf.ws.rm.manager.SourcePolicyType;
+import org.apache.cxf.ws.rm.persistence.RMStore;
+import org.apache.cxf.ws.rm.policy.RMAssertion;
+import org.apache.cxf.ws.rm.soap.RMSoapInterceptor;
+
+/**
+ *
+ */
+public class RMFeature extends AbstractFeature {
+
+ private RMAssertion rmAssertion;
+ private DeliveryAssuranceType deliveryAssurance;
+ private SourcePolicyType sourcePolicy;
+ private DestinationPolicyType destinationPolicy;
+ private RMStore store;
+
+ private RMInInterceptor rmLogicalIn = new RMInInterceptor();
+ private RMOutInterceptor rmLogicalOut = new RMOutInterceptor();
+ private RMSoapInterceptor rmCodec = new RMSoapInterceptor();
+
+ public void setDeliveryAssurance(DeliveryAssuranceType da) {
+ deliveryAssurance = da;
+ }
+
+ public void setDestinationPolicy(DestinationPolicyType dp) {
+ destinationPolicy = dp;
+ }
+
+ public void setRMAssertion(RMAssertion rma) {
+ rmAssertion = rma;
+ }
+
+ public void setSourcePolicy(SourcePolicyType sp) {
+ sourcePolicy = sp;
+ }
+
+ public void setStore(RMStore store) {
+ this.store = store;
+ }
+
+ @Override
+ protected void initializeProvider(InterceptorProvider provider, Bus bus) {
+
+ RMManager manager = bus.getExtension(RMManager.class);
+ if (null != rmAssertion) {
+ manager.setRMAssertion(rmAssertion);
+ }
+ if (null != deliveryAssurance) {
+ manager.setDeliveryAssurance(deliveryAssurance);
+ }
+ if (null != sourcePolicy) {
+ manager.setSourcePolicy(sourcePolicy);
+ }
+ if (null != destinationPolicy) {
+ manager.setDestinationPolicy(destinationPolicy);
+ }
+ if (null != store) {
+ manager.setStore(store);
+ }
+
+ rmLogicalIn.setBus(bus);
+ rmLogicalOut.setBus(bus);
+
+ provider.getInInterceptors().add(rmLogicalIn);
+ provider.getInInterceptors().add(rmCodec);
+
+ provider.getOutInterceptors().add(rmLogicalOut);
+ provider.getOutInterceptors().add(rmCodec);
+
+ provider.getInFaultInterceptors().add(rmLogicalIn);
+ provider.getInFaultInterceptors().add(rmCodec);
+
+ provider.getOutFaultInterceptors().add(rmLogicalOut);
+ provider.getOutFaultInterceptors().add(rmCodec);
+
+ }
+}
Propchange:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/feature/RMFeature.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/feature/RMFeature.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java?view=diff&rev=563804&r1=563803&r2=563804
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java
Wed Aug 8 03:39:47 2007
@@ -144,18 +144,34 @@
public void setDriverClassName(String dcn) {
driverClassName = dcn;
}
+
+ String getDriverClassName() {
+ return driverClassName;
+ }
public void setPassword(String p) {
password = p;
}
+ String getPassword() {
+ return password;
+ }
+
public void setUrl(String u) {
url = u;
}
+
+ String getUrl() {
+ return url;
+ }
public void setUserName(String un) {
userName = un;
}
+
+ String getUserName() {
+ return userName;
+ }
public void setConnection(Connection c) {
connection = c;
@@ -566,6 +582,7 @@
Class.forName(driverClassName);
} catch (ClassNotFoundException ex) {
LogUtils.log(LOG, Level.SEVERE, "CONNECT_EXC", ex);
+ return;
}
try {
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/NamespaceHandler.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/NamespaceHandler.java?view=diff&rev=563804&r1=563803&r2=563804
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/NamespaceHandler.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/NamespaceHandler.java
Wed Aug 8 03:39:47 2007
@@ -22,6 +22,8 @@
public class NamespaceHandler extends NamespaceHandlerSupport {
public void init() {
- registerBeanDefinitionParser("rmManager", new
RMManagerBeanDefinitionParser());
+ registerBeanDefinitionParser("rmManager", new
RMManagerBeanDefinitionParser());
+ registerBeanDefinitionParser("reliableMessaging", new
RMFeatureBeanDefinitionParser());
+ registerBeanDefinitionParser("jdbcStore", new
RMTxStoreBeanDefinitionParser());
}
}
Added:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMFeatureBeanDefinitionParser.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMFeatureBeanDefinitionParser.java?view=auto&rev=563804
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMFeatureBeanDefinitionParser.java
(added)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMFeatureBeanDefinitionParser.java
Wed Aug 8 03:39:47 2007
@@ -0,0 +1,71 @@
+/**
+ * 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.
+ */
+package org.apache.cxf.ws.rm.spring;
+
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Element;
+
+import org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser;
+import org.apache.cxf.ws.rm.feature.RMFeature;
+import org.apache.cxf.ws.rm.policy.RMAssertion;
+import org.springframework.beans.factory.support.BeanDefinitionBuilder;
+import org.springframework.beans.factory.xml.ParserContext;
+
+public class RMFeatureBeanDefinitionParser extends
AbstractBeanDefinitionParser {
+
+ private static final String RM_CFG_NS =
"http://cxf.apache.org/wsrm-config";
+
+ @Override
+ protected void parseChildElements(Element element, ParserContext ctx,
BeanDefinitionBuilder bean) {
+ mapElementToJaxbProperty(element, bean,
+ new QName(RM_CFG_NS, "deliveryAssurance"),
"deliveryAssurance");
+ mapElementToJaxbProperty(element, bean,
+ new QName(RM_CFG_NS, "sourcePolicy"), "sourcePolicy");
+ mapElementToJaxbProperty(element, bean,
+ new QName(RM_CFG_NS, "destinationPolicy"),
"destinationPolicy");
+ mapElementToJaxbProperty(element, bean,
+ new QName("http://schemas.xmlsoap.org/ws/2005/02/rm/policy",
"RMAssertion"),
+ "RMAssertion",
+ RMAssertion.class);
+
+ super.parseChildElements(element, ctx, bean);
+ ctx.getDelegate().parsePropertyElements(element,
bean.getBeanDefinition());
+ }
+
+ @Override
+ protected void mapElement(ParserContext ctx, BeanDefinitionBuilder bean,
Element e, String name) {
+ if ("store".equals(name)) {
+ setFirstChildAsProperty(e, ctx, bean, name);
+ }
+ }
+
+ @Override
+ protected Class getBeanClass(Element element) {
+ return RMFeature.class;
+ }
+
+ @Override
+ protected boolean shouldGenerateIdAsFallback() {
+ return true;
+ }
+
+
+
+}
Propchange:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMFeatureBeanDefinitionParser.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMFeatureBeanDefinitionParser.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMManagerBeanDefinitionParser.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMManagerBeanDefinitionParser.java?view=diff&rev=563804&r1=563803&r2=563804
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMManagerBeanDefinitionParser.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMManagerBeanDefinitionParser.java
Wed Aug 8 03:39:47 2007
@@ -18,11 +18,11 @@
*/
package org.apache.cxf.ws.rm.spring;
+
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
-import org.apache.cxf.Bus;
import org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser;
import org.apache.cxf.ws.rm.RMManager;
import org.apache.cxf.ws.rm.policy.RMAssertion;
@@ -50,11 +50,20 @@
ctx.getDelegate().parsePropertyElements(element,
bean.getBeanDefinition());
String bus = element.getAttribute("bus");
- if (bus == null || "".equals(bus) &&
ctx.getRegistry().containsBeanDefinition(Bus.DEFAULT_BUS_ID)) {
- bean.addPropertyReference("bus", Bus.DEFAULT_BUS_ID);
+ if (bus == null || "".equals(bus) &&
ctx.getRegistry().containsBeanDefinition("cxf")) {
+ bean.addPropertyReference("bus", "cxf");
} else {
bean.addPropertyReference("bus", bus);
}
+
+ super.parseChildElements(element, ctx, bean);
+ }
+
+ @Override
+ protected void mapElement(ParserContext ctx, BeanDefinitionBuilder bean,
Element e, String name) {
+ if ("store".equals(name)) {
+ setFirstChildAsProperty(e, ctx, bean, name);
+ }
}
@Override
@@ -72,4 +81,9 @@
return "org.apache.cxf.ws.rm.manager";
}
+ @Override
+ protected boolean shouldGenerateIdAsFallback() {
+ return true;
+ }
+
}
Added:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMTxStoreBeanDefinitionParser.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMTxStoreBeanDefinitionParser.java?view=auto&rev=563804
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMTxStoreBeanDefinitionParser.java
(added)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMTxStoreBeanDefinitionParser.java
Wed Aug 8 03:39:47 2007
@@ -0,0 +1,38 @@
+/**
+ * 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.
+ */
+package org.apache.cxf.ws.rm.spring;
+
+import org.w3c.dom.Element;
+
+import org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser;
+import org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore;
+
+public class RMTxStoreBeanDefinitionParser extends
AbstractBeanDefinitionParser {
+
+ @Override
+ protected Class getBeanClass(Element element) {
+ return RMTxStore.class;
+ }
+
+ @Override
+ protected boolean shouldGenerateIdAsFallback() {
+ return true;
+ }
+
+}
Propchange:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMTxStoreBeanDefinitionParser.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/spring/RMTxStoreBeanDefinitionParser.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager-types.xsd
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager-types.xsd?view=diff&rev=563804&r1=563803&r2=563804
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager-types.xsd
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager-types.xsd
Wed Aug 8 03:39:47 2007
@@ -26,6 +26,12 @@
elementFormDefault="qualified"
attributeFormDefault="unqualified"
jaxb:version="2.0">
+
+ <xs:annotation>
+ <xs:documentation>
+ This schema defines types used in the configuration of the Reliable
Messaging components.
+ </xs:documentation>
+ </xs:annotation>
<xs:import namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
schemaLocation="http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd"/>
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager.xsd
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager.xsd?view=diff&rev=563804&r1=563803&r2=563804
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager.xsd
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager.xsd
Wed Aug 8 03:39:47 2007
@@ -17,7 +17,6 @@
specific language governing permissions and limitations
under the License.
-->
-
<xs:schema targetNamespace="http://cxf.apache.org/ws/rm/manager"
xmlns:tns="http://cxf.apache.org/ws/rm/manager"
@@ -27,27 +26,135 @@
xmlns:cxf-beans="http://cxf.apache.org/configuration/beans"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
+
+ <xs:annotation>
+ <xs:documentation>
+ This schema defines features and beans to configure the CXF Reliable
Messaging components.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:include
schemaLocation="http://cxf.apache.org/schemas/configuration/wsrm-manager-types.xsd"/>
+ <xs:import namespace="http://www.springframework.org/schema/beans"
schemaLocation="http://www.springframework.org/schema/beans/spring-beans.xsd"/>
+ <xs:import namespace="http://cxf.apache.org/configuration/beans"
schemaLocation="http://cxf.apache.org/schemas/configuration/cxf-beans.xsd"/>
+ <xs:import namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
schemaLocation="http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd"/>
+
+ <xs:element name="reliableMessaging">
+ <xs:annotation>
+ <xs:documentation>
+ This feature enables and controls the use of WS-Reliable Messaging.
+ It ensures that the reliable messaging interceptors are added to the
interceptor chains,
+ and allows to configure behaviour of the reliable messaging
infrastructure
+ that goes beyond what can be described by the attributes in the
RMAssertion type.
+ Note that addition of the addressing interceptors is not part of this
feature. It should
+ therefore always be used in conjunction with the addressing feature.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:group ref="tns:rmElements"/>
+ <xs:attribute name="id" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
- <xs:include
schemaLocation="http://cxf.apache.org/schemas/configuration/wsrm-manager-types.xsd"/>
- <xs:import namespace="http://www.springframework.org/schema/beans"
schemaLocation="http://www.springframework.org/schema/beans/spring-beans.xsd"/>
- <xs:import namespace="http://cxf.apache.org/configuration/beans"
schemaLocation="http://cxf.apache.org/schemas/configuration/cxf-beans.xsd"/>
- <xs:import namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
schemaLocation="http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd"/>
+ <xs:element name="rmManager">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="beans:identifiedType">
+ <xs:group ref="tns:rmElements"/>
+ <xs:attributeGroup ref="cxf-beans:beanAttributes"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:group name="rmElements">
+ <xs:sequence>
+ <xs:element ref="wsrmp:RMAssertion" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ The RMAssertion to be used.
+ The parameters of this RMAssertion element supercede those
specified
+ in policy attachments.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:deliveryAssurance" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ The delivery assurance to be used by the reliable messaging
manager.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:sourcePolicy" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ The source policy to be used by the reliable messaging manager.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:destinationPolicy" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ The destination policy to be used by the reliable messaging
manager.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="store" type="xs:anyType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ The store to use when persisting messages.
+ The child element of this element must be a bean whose bean
class implements
+ org.apache.cxf.ws.rm.persistence.RMStore, or a reference to such
a bean.
+ By default, messages are only persisted in memory, and thus
delivery cannot be
+ guaranteed in the presence of application crashes.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="beans:property" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>
+ Deprecated.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:group>
- <xs:element name="rmManager">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="beans:identifiedType">
- <xs:sequence>
- <xs:element ref="wsrmp:RMAssertion" minOccurs="0"/>
- <xs:element ref="tns:deliveryAssurance" minOccurs="0"/>
- <xs:element ref="tns:sourcePolicy" minOccurs="0"/>
- <xs:element ref="tns:destinationPolicy" minOccurs="0"/>
- <xs:element ref="beans:property" minOccurs="0"
maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attributeGroup ref="cxf-beans:beanAttributes"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
+ <xs:element name="jdbcStore">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="beans:identifiedType">
+ <xs:attributeGroup ref="cxf-beans:beanAttributes"/>
+ <xs:attribute name="driverClassName" type="xs:string"
default="org.apache.derby.jdbc.EmbeddedDriver">
+ <xs:annotation>
+ <xs:documentation>
+ The JDBC driver class name.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="url" type="xs:string"
default="jdbc:derby:rmdb;create=true">
+ <xs:annotation>
+ <xs:documentation>
+ The connection URL.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="userName" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ The username.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="password" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ The password.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
</xs:schema>
Modified:
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerConfigurationTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerConfigurationTest.java?view=diff&rev=563804&r1=563803&r2=563804
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerConfigurationTest.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerConfigurationTest.java
Wed Aug 8 03:39:47 2007
@@ -35,9 +35,9 @@
public class RMManagerConfigurationTest extends Assert {
@Test
- public void testConfiguration() {
+ public void testManagerBean() {
SpringBusFactory factory = new SpringBusFactory();
- Bus bus =
factory.createBus("org/apache/cxf/ws/rm/custom-rmmanager.xml");
+ Bus bus = factory.createBus("org/apache/cxf/ws/rm/manager-bean.xml");
RMManager manager = bus.getExtension(RMManager.class);
assertNotNull(manager);
assertTrue(manager.getSourcePolicy().getSequenceTerminationPolicy().isTerminateOnShutdown());
@@ -46,8 +46,7 @@
assertEquals(10000L,
manager.getRMAssertion().getAcknowledgementInterval()
.getMilliseconds().longValue());
TestStore store = (TestStore)manager.getStore();
- assertEquals("here", store.getLocation());
-
+ assertEquals("here", store.getLocation());
}
static class TestStore implements RMStore {
@@ -57,12 +56,6 @@
public TestStore() {
// this(null);
}
-
- /*
- public TestStore(String l) {
- location = l;
- }
- */
public String getLocation() {
return location;
Added:
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/manager-bean.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/manager-bean.xml?view=auto&rev=563804
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/manager-bean.xml
(added)
+++
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/manager-bean.xml
Wed Aug 8 03:39:47 2007
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:cxf-beans="http://cxf.apache.org/configuration/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
+ xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+ xsi:schemaLocation="
+http://cxf.apache.org/ws/rm/manager
http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd
+http://schemas.xmlsoap.org/ws/2005/02/rm/policy
http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
+
+http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <import resource="rmmanager.xml"/>
+
+ <wsrm-mgr:rmManager name="{http://cxf.apache.org}ws.rm.RMManager">
+ <wsrm-policy:RMAssertion>
+ <wsrm-policy:BaseRetransmissionInterval Milliseconds="10000"/>
+ <wsrm-policy:AcknowledgementInterval Milliseconds="10000"/>
+ </wsrm-policy:RMAssertion>
+ <wsrm-mgr:sourcePolicy>
+ <wsrm-mgr:sequenceTerminationPolicy terminateOnShutdown="true"/>
+ </wsrm-mgr:sourcePolicy>
+ <wsrm-mgr:destinationPolicy>
+ <wsrm-mgr:acksPolicy intraMessageThreshold="0"/>
+ </wsrm-mgr:destinationPolicy>
+ <wsrm-mgr:store>
+ <bean
class="org.apache.cxf.ws.rm.RMManagerConfigurationTest$TestStore">
+ <property name="location" value="here"/>
+ </bean>
+ </wsrm-mgr:store>
+ </wsrm-mgr:rmManager>
+
+</beans>
Propchange:
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/manager-bean.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/manager-bean.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/manager-bean.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreConfigurationTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreConfigurationTest.java?view=auto&rev=563804
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreConfigurationTest.java
(added)
+++
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreConfigurationTest.java
Wed Aug 8 03:39:47 2007
@@ -0,0 +1,49 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.ws.rm.persistence.jdbc;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.ws.rm.RMManager;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ *
+ */
+public class RMTxStoreConfigurationTest extends Assert {
+
+ @Test
+ public void testTxStoreBean() {
+ // connect exception only results in a log message
+ SpringBusFactory factory = new SpringBusFactory();
+ Bus bus =
factory.createBus("org/apache/cxf/ws/rm/persistence/jdbc/txstore-bean.xml");
+ RMManager manager = bus.getExtension(RMManager.class);
+ assertNotNull(manager);
+ RMTxStore store = (RMTxStore)manager.getStore();
+ assertNotNull(store);
+ assertNull("Connection should be null", store.getConnection());
+ assertEquals("org.apache.derby.jdbc.NoDriver",
store.getDriverClassName());
+ assertEquals("scott", store.getUserName());
+ assertEquals("tiger", store.getPassword());
+ assertEquals("jdbc:derby://localhost:1527/rmdb;create=true",
store.getUrl());
+ }
+
+}
Propchange:
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreConfigurationTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreConfigurationTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-bean.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-bean.xml?view=auto&rev=563804
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-bean.xml
(added)
+++
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-bean.xml
Wed Aug 8 03:39:47 2007
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:cxf-beans="http://cxf.apache.org/configuration/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
+ xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+ xsi:schemaLocation="
+http://cxf.apache.org/ws/rm/manager
http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd
+http://schemas.xmlsoap.org/ws/2005/02/rm/policy
http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
+
+http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <import resource="classpath:/org/apache/cxf/ws/rm/rmmanager.xml"/>
+
+ <wsrm-mgr:rmManager>
+ <wsrm-mgr:store>
+ <ref bean="testStore"/>
+ </wsrm-mgr:store>
+ </wsrm-mgr:rmManager>
+
+ <wsrm-mgr:jdbcStore id="testStore"
+ userName="scott"
+ password="tiger"
+ url="jdbc:derby://localhost:1527/rmdb;create=true"
+ driverClassName="org.apache.derby.jdbc.NoDriver"/>
+
+</beans>
Propchange:
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-bean.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-bean.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-bean.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent-message-loss-server.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent-message-loss-server.xml?view=diff&rev=563804&r1=563803&r2=563804
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent-message-loss-server.xml
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent-message-loss-server.xml
Wed Aug 8 03:39:47 2007
@@ -19,70 +19,34 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:cxf="http://cxf.apache.org/core"
+ xmlns:wsa="http://cxf.apache.org/ws/addressing"
xmlns:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
xsi:schemaLocation="
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://schemas.xmlsoap.org/ws/2005/02/rm/policy
http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
http://cxf.apache.org/ws/rm/manager
http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd
http://cxf.apache.org/configuration/beans
http://cxf.apache.org/schemas/configuration/cxf-beans.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-
- <bean class="org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore"/>
-
- <wsrm-mgr:rmManager id="org.apache.cxf.ws.rm.RMManager">
- <wsrm-policy:RMAssertion>
- <wsrm-policy:BaseRetransmissionInterval
Milliseconds="60000" />
- </wsrm-policy:RMAssertion>
- <property name="store"
ref="org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore"/>
- </wsrm-mgr:rmManager>
-
- <bean id="mapAggregator"
class="org.apache.cxf.ws.addressing.MAPAggregator"/>
- <bean id="mapCodec" class="org.apache.cxf.ws.addressing.soap.MAPCodec"/>
- <bean id="rmLogicalOut" class="org.apache.cxf.ws.rm.RMOutInterceptor">
- <property name="bus" ref="cxf"/>
- </bean>
- <bean id="rmLogicalIn" class="org.apache.cxf.ws.rm.RMInInterceptor">
- <property name="bus" ref="cxf"/>
- </bean>
- <bean id="rmCodec" class="org.apache.cxf.ws.rm.soap.RMSoapInterceptor"/>
+
<bean id="messageLoss"
class="org.apache.cxf.systest.ws.rm.MessageLossSimulator"/>
-
- <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
- <property name="inInterceptors">
- <list>
- <ref bean="mapAggregator"/>
- <ref bean="mapCodec"/>
- <ref bean="rmLogicalIn"/>
- <ref bean="rmCodec"/>
- </list>
- </property>
- <property name="inFaultInterceptors">
- <list>
- <ref bean="mapAggregator"/>
- <ref bean="mapCodec"/>
- <ref bean="rmLogicalIn"/>
- <ref bean="rmCodec"/>
- </list>
- </property>
- <property name="outInterceptors">
- <list>
- <ref bean="mapAggregator"/>
- <ref bean="mapCodec"/>
- <ref bean="rmLogicalOut"/>
- <ref bean="rmCodec"/>
- <ref bean="messageLoss"/>
- </list>
- </property>
- <property name="outFaultInterceptors">
- <list>
- <ref bean="mapAggregator"/>
- <ref bean="mapCodec"/>
- <ref bean="rmLogicalOut"/>
- <ref bean="rmCodec"/>
- </list>
- </property>
- </bean>
-
-
-
+
+ <cxf:bus>
+ <cxf:features>
+ <wsa:addressing/>
+ <wsrm-mgr:reliableMessaging>
+ <wsrm-policy:RMAssertion>
+ <wsrm-policy:BaseRetransmissionInterval
Milliseconds="60000" />
+ </wsrm-policy:RMAssertion>
+ <wsrm-mgr:store>
+ <wsrm-mgr:jdbcStore/>
+ </wsrm-mgr:store>
+ </wsrm-mgr:reliableMessaging>
+ </cxf:features>
+ <cxf:outInterceptors>
+ <ref bean="messageLoss"/>
+ </cxf:outInterceptors>
+ </cxf:bus>
+
</beans>
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent.xml?view=diff&rev=563804&r1=563803&r2=563804
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent.xml
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent.xml
Wed Aug 8 03:39:47 2007
@@ -19,17 +19,25 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:cxf="http://cxf.apache.org/core"
+ xmlns:wsa="http://cxf.apache.org/ws/addressing"
xmlns:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
xsi:schemaLocation="
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://cxf.apache.org/ws/rm/manager
http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
- <import resource="rminterceptors.xml"/>
+ <cxf:bus>
+ <cxf:features>
+ <wsa:addressing/>
+ <wsrm-mgr:reliableMessaging>
+ <wsrm-mgr:store>
+ <ref bean="testStore"/>
+ </wsrm-mgr:store>
+ </wsrm-mgr:reliableMessaging>
+ </cxf:features>
+ </cxf:bus>
- <bean class="org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore"/>
-
- <wsrm-mgr:rmManager id="org.apache.cxf.ws.rm.RMManager">
- <property name="store"
ref="org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore"/>
- </wsrm-mgr:rmManager>
+ <wsrm-mgr:jdbcStore id="testStore"/>
</beans>