Author: dkulp
Date: Wed Jan 21 14:30:05 2009
New Revision: 736453
URL: http://svn.apache.org/viewvc?rev=736453&view=rev
Log:
Merged revisions 736408 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r736408 | cschneider | 2009-01-21 15:36:50 -0500 (Wed, 21 Jan 2009) | 1 line
CXF-1978 Add configurable message selector the selects all messages with the
conduit id to allow permanent queues to be used by several instances
concurrently
........
Modified:
cxf/branches/2.1.x-fixes/ (props changed)
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/resources/schemas/configuration/jms.xsd
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd
cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java
cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 21 14:30:05 2009
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616,702653,702656,702957,703191,703239,703309,703501,703513,703548,704584,704937,704997,705150,705235,705274,705340,705446,705548,705614,705692,705708,706482,706631,706675,706900,706909,707034,707089,707100,707902,708035,708044,708074,708410,708417,708550,708554,709353-709354,709425,710076,710150,71015
4,711193,711388,711410,711490,711635,711949,711975,712194,712198,712238,712272,712299,712312,712670,712893,713082,713095-713096,713099,713584,713597,713737,713804,713899,714167-714168,714245,714255,717937-717961,718281-718448,718565,718620,718640,718665,718970,719017,719210,719215-719218,719222-719273,719305,719327-719680,720053,720119-720218,720238,720293-720316,720497,721221,721241,721501,722117,722129,722412,722988,723024,723338,723378,723716-723791,724333-724372,724433-724438,724449,724481,724485,724668,724780,724782,724785,724793,724795,724940,725071,725316,725332,725335,725348,725364,725418,725425-725426,725455,725506,725554,725562,725651,725671,725688,725754,725773,725799,725839,726342,726524,726631,726634,726637,726639,726692,726724,726769,726992,727096,727445,727521,727568,727692,727754,727781,727792,728070,728087,728696,728897,729051,729430,729449,729460,729863,730082,730139,730889,730891,731598,731604,731615,731631,731635,732036,732050,732320,732363,732411,732450,
732710,732827,733512,733582,733901,734367,734462,734666,734762,734772,734812,734836,734965,735113,735252,735722-735723,735729,735734,735751,735782,735787,735987,736352
+/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616,702653,702656,702957,703191,703239,703309,703501,703513,703548,704584,704937,704997,705150,705235,705274,705340,705446,705548,705614,705692,705708,706482,706631,706675,706900,706909,707034,707089,707100,707902,708035,708044,708074,708410,708417,708550,708554,709353-709354,709425,710076,710150,71015
4,711193,711388,711410,711490,711635,711949,711975,712194,712198,712238,712272,712299,712312,712670,712893,713082,713095-713096,713099,713584,713597,713737,713804,713899,714167-714168,714245,714255,717937-717961,718281-718448,718565,718620,718640,718665,718970,719017,719210,719215-719218,719222-719273,719305,719327-719680,720053,720119-720218,720238,720293-720316,720497,721221,721241,721501,722117,722129,722412,722988,723024,723338,723378,723716-723791,724333-724372,724433-724438,724449,724481,724485,724668,724780,724782,724785,724793,724795,724940,725071,725316,725332,725335,725348,725364,725418,725425-725426,725455,725506,725554,725562,725651,725671,725688,725754,725773,725799,725839,726342,726524,726631,726634,726637,726639,726692,726724,726769,726992,727096,727445,727521,727568,727692,727754,727781,727792,728070,728087,728696,728897,729051,729430,729449,729460,729863,730082,730139,730889,730891,731598,731604,731615,731631,731635,732036,732050,732320,732363,732411,732450,
732710,732827,733512,733582,733901,734367,734462,734666,734762,734772,734812,734836,734965,735113,735252,735722-735723,735729,735734,735751,735782,735787,735987,736352,736408
Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java?rev=736453&r1=736452&r2=736453&view=diff
==============================================================================
---
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
(original)
+++
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
Wed Jan 21 14:30:05 2009
@@ -25,6 +25,7 @@
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.util.Map;
+import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -59,12 +60,21 @@
private JMSConfiguration jmsConfig;
private Map<String, Exchange> correlationMap;
private DefaultMessageListenerContainer jmsListener;
+ private String conduitId;
+ private int messageCount;
public JMSConduit(EndpointInfo endpointInfo, EndpointReferenceType target,
JMSConfiguration jmsConfig) {
super(target);
this.jmsConfig = jmsConfig;
this.endpointInfo = endpointInfo;
correlationMap = new ConcurrentHashMap<String, Exchange>();
+ conduitId = UUID.randomUUID().toString();
+ messageCount = 0;
+ }
+
+ private synchronized String createCorrelationId() {
+ messageCount++;
+ return conduitId + "_" + messageCount;
}
/**
@@ -103,13 +113,14 @@
JmsTemplate jmsTemplate = JMSFactory.createJmsTemplate(jmsConfig,
headers);
if (!exchange.isOneWay() && jmsListener == null) {
- jmsListener = JMSFactory.createJmsListener(jmsConfig, this,
jmsConfig.getReplyDestination());
+ jmsListener = JMSFactory.createJmsListener(jmsConfig, this,
jmsConfig.getReplyDestination(),
+ conduitId);
}
final javax.jms.Destination replyTo = exchange.isOneWay() ? null :
jmsListener.getDestination();
final String correlationId = (headers != null &&
headers.isSetJMSCorrelationID()) ? headers
- .getJMSCorrelationID() : JMSUtils.generateCorrelationId();
+ .getJMSCorrelationID() : createCorrelationId();
MessageCreator messageCreator = new MessageCreator() {
public javax.jms.Message createMessage(Session session) throws
JMSException {
Modified:
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java?rev=736453&r1=736452&r2=736453&view=diff
==============================================================================
---
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
(original)
+++
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
Wed Jan 21 14:30:05 2009
@@ -60,6 +60,7 @@
private String replyDestination;
private String messageType = JMSConstants.TEXT_MESSAGE_TYPE;
private boolean pubSubDomain;
+ private boolean useConduitIdSelector = true;
public boolean isUsingEndpointInfo() {
return this.usingEndpointInfo;
@@ -267,4 +268,12 @@
this.taskExecutor = taskExecutor;
}
+ public void setUseConduitIdSelector(boolean useConduitIdSelector) {
+ this.useConduitIdSelector = useConduitIdSelector;
+ }
+
+ public boolean isUseConduitIdSelector() {
+ return useConduitIdSelector;
+ }
+
}
Modified:
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?rev=736453&r1=736452&r2=736453&view=diff
==============================================================================
---
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
(original)
+++
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
Wed Jan 21 14:30:05 2009
@@ -104,7 +104,7 @@
throw new ConfigurationException(
new
org.apache.cxf.common.i18n.Message("INSUFFICIENT_CONFIGURATION_DESTINATION",
LOG, name));
}
- jmsListener = JMSFactory.createJmsListener(jmsConfig, this,
jmsConfig.getTargetDestination());
+ jmsListener = JMSFactory.createJmsListener(jmsConfig, this,
jmsConfig.getTargetDestination(), null);
}
public void deactivate() {
Modified:
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java?rev=736453&r1=736452&r2=736453&view=diff
==============================================================================
---
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
(original)
+++
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
Wed Jan 21 14:30:05 2009
@@ -74,11 +74,13 @@
* @param jmsConfig configuration information
* @param listenerHandler object to be called when a message arrives
* @param destinationName null for temp dest or a destination name
+ * @param messageSelectorPrefix prefix for the messageselector
* @return
*/
public static DefaultMessageListenerContainer
createJmsListener(JMSConfiguration jmsConfig,
MessageListener listenerHandler,
- String
destinationName) {
+ String
destinationName,
+ String
messageSelectorPrefix) {
DefaultMessageListenerContainer jmsListener = jmsConfig.isUseJms11()
? new DefaultMessageListenerContainer() : new
DefaultMessageListenerContainer102();
jmsListener.setConcurrentConsumers(jmsConfig.getConcurrentConsumers());
@@ -91,6 +93,9 @@
jmsListener.setSessionTransacted(jmsConfig.isSessionTransacted());
jmsListener.setTransactionManager(jmsConfig.getTransactionManager());
jmsListener.setMessageListener(listenerHandler);
+ if (messageSelectorPrefix != null &&
jmsConfig.isUseConduitIdSelector()) {
+ jmsListener.setMessageSelector("JMSCorrelationID LIKE '" +
messageSelectorPrefix + "%'");
+ }
if (jmsConfig.getDestinationResolver() != null) {
jmsListener.setDestinationResolver(jmsConfig.getDestinationResolver());
}
Modified:
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java?rev=736453&r1=736452&r2=736453&view=diff
==============================================================================
---
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
(original)
+++
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
Wed Jan 21 14:30:05 2009
@@ -135,7 +135,8 @@
jmsConfig.setPubSubNoLocal(true);
//if (clientConfig.isSetClientReceiveTimeout()) {
jmsConfig.setReceiveTimeout(clientConfig.getClientReceiveTimeout());
- //}
+ //}
+
jmsConfig.setUseConduitIdSelector(clientConfig.isUseConduitIdSelector());
jmsConfig.setSubscriptionDurable(serverBehavior.isSetDurableSubscriberName());
jmsConfig.setDurableSubscriptionName(serverBehavior.getDurableSubscriberName());
Modified:
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java?rev=736453&r1=736452&r2=736453&view=diff
==============================================================================
---
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
(original)
+++
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
Wed Jan 21 14:30:05 2009
@@ -20,10 +20,7 @@
package org.apache.cxf.transport.jms;
import java.io.UnsupportedEncodingException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
import java.util.ArrayList;
-import java.util.Calendar;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
@@ -285,20 +282,4 @@
return jmsMessage;
}
- /**
- * Create a unique correlation Id from
- * <host>_<user.name>_<currentThread><time>
- * @return correlationId
- */
- public static String generateCorrelationId() {
- String host = "localhost";
- try {
- InetAddress addr = InetAddress.getLocalHost();
- host = addr.getHostName();
- } catch (UnknownHostException ukex) {
- // Default to localhost
- }
- long time = Calendar.getInstance().getTimeInMillis();
- return host + "_" + System.getProperty("user.name") + "_" +
Thread.currentThread() + time;
- }
}
Modified:
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/resources/schemas/configuration/jms.xsd
URL:
http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/resources/schemas/configuration/jms.xsd?rev=736453&r1=736452&r2=736453&view=diff
==============================================================================
---
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/resources/schemas/configuration/jms.xsd
(original)
+++
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/resources/schemas/configuration/jms.xsd
Wed Jan 21 14:30:05 2009
@@ -1,71 +1,74 @@
<?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.
--->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:jms="http://cxf.apache.org/transports/jms"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
- xmlns:beans="http://www.springframework.org/schema/beans"
- xmlns:cxf-beans="http://cxf.apache.org/configuration/beans"
- targetNamespace="http://cxf.apache.org/transports/jms"
- elementFormDefault="qualified" jaxb:version="2.0">
-
- <xs:include schemaLocation="http://cxf.apache.org/schemas/wsdl/jms.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:element name="destination">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="beans:identifiedType">
- <xs:sequence>
- <xs:element name="serverConfig"
type="jms:ServerConfig" minOccurs="0"/>
- <xs:element name="runtimePolicy"
type="jms:ServerBehaviorPolicyType" minOccurs="0"/>
- <xs:element name="sessionPool"
type="jms:SessionPoolType" minOccurs="0"/>
- <xs:element name="address" type="jms:AddressType"
minOccurs="0"/>
- <xs:element name="jmsConfig-ref" type="xs:string"
maxOccurs="1" minOccurs="0"/>
- </xs:sequence>
- <xs:attributeGroup ref="cxf-beans:beanAttributes"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="conduit">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="beans:identifiedType">
- <xs:sequence>
- <xs:element name="clientConfig"
- type="jms:ClientConfig" minOccurs="0" />
- <xs:element name="runtimePolicy"
- type="jms:ClientBehaviorPolicyType"
minOccurs="0" />
- <xs:element name="sessionPool"
- type="jms:SessionPoolType" minOccurs="0" />
- <xs:element name="address"
- type="jms:AddressType" minOccurs="0" />
- <xs:element name="jmsConfig-ref" type="xs:string"
maxOccurs="1" minOccurs="0"/>
- </xs:sequence>
- <xs:attributeGroup ref="cxf-beans:beanAttributes"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
-
+ <!--
+ 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.
+ -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:jms="http://cxf.apache.org/transports/jms"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:beans="http://www.springframework.org/schema/beans"
+ xmlns:cxf-beans="http://cxf.apache.org/configuration/beans"
+ targetNamespace="http://cxf.apache.org/transports/jms"
+ elementFormDefault="qualified" jaxb:version="2.0">
+
+ <xs:include schemaLocation="http://cxf.apache.org/schemas/wsdl/jms.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:element name="destination">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="beans:identifiedType">
+ <xs:sequence>
+ <xs:element name="serverConfig"
type="jms:ServerConfig"
+ minOccurs="0" />
+ <xs:element
name="runtimePolicy" type="jms:ServerBehaviorPolicyType"
+ minOccurs="0" />
+ <xs:element name="sessionPool"
type="jms:SessionPoolType"
+ minOccurs="0" />
+ <xs:element name="address"
type="jms:AddressType"
+ minOccurs="0" />
+ <xs:element
name="jmsConfig-ref" type="xs:string"
+ maxOccurs="1"
minOccurs="0" />
+ </xs:sequence>
+ <xs:attributeGroup
ref="cxf-beans:beanAttributes" />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="conduit">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="beans:identifiedType">
+ <xs:sequence>
+ <xs:element name="clientConfig"
type="jms:ClientConfig"
+ minOccurs="0" />
+ <xs:element
name="runtimePolicy" type="jms:ClientBehaviorPolicyType"
+ minOccurs="0" />
+ <xs:element name="sessionPool"
type="jms:SessionPoolType"
+ minOccurs="0" />
+ <xs:element name="address"
type="jms:AddressType"
+ minOccurs="0" />
+ <xs:element
name="jmsConfig-ref" type="xs:string"
+ maxOccurs="1"
minOccurs="0" />
+ </xs:sequence>
+ <xs:attributeGroup
ref="cxf-beans:beanAttributes" />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
</xs:schema>
Modified:
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd
URL:
http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd?rev=736453&r1=736452&r2=736453&view=diff
==============================================================================
---
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd
(original)
+++
cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd
Wed Jan 21 14:30:05 2009
@@ -48,14 +48,17 @@
</xs:complexType>
<xs:complexType name="ClientConfig">
- <xs:complexContent>
- <xs:extension base="wsdl:tExtensibilityElement">
- <xs:attribute name="clientReceiveTimeout"
type="xs:long" default="60000"/>
- <xs:attribute name="messageTimeToLive" type="xs:long"
default="0" />
- </xs:extension>
- </xs:complexContent>
+ <xs:complexContent>
+ <xs:extension base="wsdl:tExtensibilityElement">
+ <xs:attribute name="clientReceiveTimeout" type="xs:long"
+ default="60000" />
+ <xs:attribute name="messageTimeToLive" type="xs:long"
+ default="0" />
+ <xs:attribute name="useConduitIdSelector"
type="xs:boolean" use="optional" default="true"></xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
</xs:complexType>
-
+
<xs:complexType name="ServerConfig">
<xs:complexContent>
<xs:extension base="wsdl:tExtensibilityElement">
Modified:
cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java?rev=736453&r1=736452&r2=736453&view=diff
==============================================================================
---
cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java
(original)
+++
cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java
Wed Jan 21 14:30:05 2009
@@ -42,6 +42,8 @@
import org.junit.Before;
public abstract class AbstractJMSTester extends Assert {
+ protected static final String MESSAGE_CONTENT = "HelloWorld";
+
private static JMSBrokerSetup broker;
protected Bus bus;
@@ -102,7 +104,7 @@
}
OutputStream os = message.getContent(OutputStream.class);
assertTrue("The OutputStream should not be null ", os != null);
- os.write("HelloWorld".getBytes()); // TODO encoding
+ os.write(MESSAGE_CONTENT.getBytes()); // TODO encoding
os.close();
}
Modified:
cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java?rev=736453&r1=736452&r2=736453&view=diff
==============================================================================
---
cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
(original)
+++
cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
Wed Jan 21 14:30:05 2009
@@ -207,15 +207,19 @@
destination.shutdown();
}
- private void setupMessageHeader(Message outMessage) {
+ private void setupMessageHeader(Message outMessage, String correlationId) {
JMSMessageHeadersType header = new JMSMessageHeadersType();
- header.setJMSCorrelationID("Destination test");
+ header.setJMSCorrelationID(correlationId);
header.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
header.setJMSPriority(1);
header.setTimeToLive(1000);
outMessage.put(JMSConstants.JMS_CLIENT_REQUEST_HEADERS, header);
outMessage.put(Message.ENCODING, "US-ASCII");
}
+
+ private void setupMessageHeader(Message outMessage) {
+ setupMessageHeader(outMessage, "Destination test");
+ }
private void verifyReceivedMessage(Message inMessage) {
ByteArrayInputStream bis =
(ByteArrayInputStream)inMessage.getContent(InputStream.class);
@@ -226,8 +230,8 @@
assertFalse("Read the Destination recieved Message error ", false);
ex.printStackTrace();
}
- String reponse = IOUtils.newStringFromBytes(bytes);
- assertEquals("The reponse date should be equal", reponse,
"HelloWorld");
+ String response = IOUtils.newStringFromBytes(bytes);
+ assertEquals("The response content should be equal",
AbstractJMSTester.MESSAGE_CONTENT, response);
}
private void verifyRequestResponseHeaders(Message inMessage, Message
outMessage) {
@@ -257,8 +261,13 @@
}
private void verifyJmsHeaderEquality(JMSMessageHeadersType outHeader,
JMSMessageHeadersType inHeader) {
- assertEquals("The inMessage and outMessage JMS Header's CorrelationID
should be equals", outHeader
- .getJMSCorrelationID(), inHeader.getJMSCorrelationID());
+ if (outHeader.getJMSCorrelationID() != null) {
+ // only check if the correlation id was explicitly set as
+ // otherwise the in header will contain an automatically
+ // generated correlation id
+ assertEquals("The inMessage and outMessage JMS Header's
CorrelationID should be equals", outHeader
+ .getJMSCorrelationID(),
inHeader.getJMSCorrelationID());
+ }
assertEquals("The inMessage and outMessage JMS Header's JMSPriority
should be equals", outHeader
.getJMSPriority(), inHeader.getJMSPriority());
assertEquals("The inMessage and outMessage JMS Header's
JMSDeliveryMode should be equals", outHeader
@@ -276,7 +285,7 @@
// set up the conduit send to be true
JMSConduit conduit = setupJMSConduit(true, false);
final Message outMessage = new MessageImpl();
- setupMessageHeader(outMessage);
+ setupMessageHeader(outMessage, null);
final JMSDestination destination = setupJMSDestination(true);
// set up MessageObserver for handling the conduit message
@@ -331,7 +340,7 @@
// set up the conduit send to be true
JMSConduit conduit = setupJMSConduit(true, false);
final Message outMessage = new MessageImpl();
- setupMessageHeader(outMessage);
+ setupMessageHeader(outMessage, null);
JMSPropertyType excludeProp = new JMSPropertyType();
excludeProp.setName(customPropertyName);