Author: richard.opalka(a)jboss.com
Date: 2007-12-04 13:31:13 -0500 (Tue, 04 Dec 2007)
New Revision: 5181
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/api/RMSequence.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/RMHelper.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java
Log:
removing synchronization - proxy instance can't be reused by multiple threads
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-12-04
16:53:09 UTC (rev 5180)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-12-04
18:31:13 UTC (rev 5181)
@@ -107,16 +107,9 @@
private Map<HandlerType, HandlerChainExecutor> executorMap = new
HashMap<HandlerType, HandlerChainExecutor>();
private static HandlerType[] HANDLER_TYPES = new HandlerType[] { HandlerType.PRE,
HandlerType.ENDPOINT, HandlerType.POST };
- // WS-RM locking utility
- private final Lock wsrmLock = new ReentrantLock();
// WS-RM sequence associated with the proxy
private RMSequenceImpl wsrmSequence;
- public final Lock getWSRMLock()
- {
- return this.wsrmLock;
- }
-
public final void setWSRMSequence(RMSequenceImpl wsrmSequence)
{
this.wsrmSequence = wsrmSequence;
@@ -267,52 +260,43 @@
// Invoked by the proxy invokation handler
public Object invoke(QName opName, Object[] args, Map<String, Object>
resContext) throws RemoteException
{
- this.wsrmLock.lock();
-
- try
- {
- // Associate a message context with the current thread
- CommonMessageContext msgContext = new SOAPMessageContextJAXWS();
- MessageContextAssociation.pushMessageContext(msgContext);
+ // Associate a message context with the current thread
+ CommonMessageContext msgContext = new SOAPMessageContextJAXWS();
+ MessageContextAssociation.pushMessageContext(msgContext);
- // The contents of the request context are used to initialize the message
context (see section 9.4.1)
- // prior to invoking any handlers (see chapter 9) for the outbound message. Each
property within the
- // request context is copied to the message context with a scope of HANDLER.
- Map<String, Object> reqContext =
getBindingProvider().getRequestContext();
+ // The contents of the request context are used to initialize the message context
(see section 9.4.1)
+ // prior to invoking any handlers (see chapter 9) for the outbound message. Each
property within the
+ // request context is copied to the message context with a scope of HANDLER.
+ Map<String, Object> reqContext = getBindingProvider().getRequestContext();
- if (this.wsrmSequence != null)
+ if (this.wsrmSequence != null)
+ {
+ if (RMConstant.PROTOCOL_OPERATION_QNAMES.contains(opName) == false)
{
- if (RMConstant.PROTOCOL_OPERATION_QNAMES.contains(opName) == false)
+ if (this.wsrmSequence.getBackPort() != null)
{
- if (this.wsrmSequence.getBackPort() != null)
- {
- // rewrite ReplyTo to use client addressable back port
- Map<String, Object> requestContext =
getBindingProvider().getRequestContext();
- AddressingProperties addressingProps =
(AddressingProperties)requestContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
-
addressingProps.setReplyTo(AddressingBuilder.getAddressingBuilder().newEndpointReference(this.wsrmSequence.getBackPort()));
- }
- Map<String, Object> rmRequestContext = new HashMap<String,
Object>();
- List<QName> outMsgs = new LinkedList<QName>();
- outMsgs.add(RMProvider.get().getConstants().getSequenceQName());
- outMsgs.add(RMProvider.get().getConstants().getAckRequestedQName());
- if (wsrmSequence.isAckRequested())
- {
- // piggy backing
-
outMsgs.add(RMProvider.get().getConstants().getSequenceAcknowledgementQName());
- }
- rmRequestContext.put(RMConstant.PROTOCOL_MESSAGES, outMsgs);
- rmRequestContext.put(RMConstant.SEQUENCE_REFERENCE, wsrmSequence);
- reqContext.put(RMConstant.REQUEST_CONTEXT, rmRequestContext);
+ // rewrite ReplyTo to use client addressable back port
+ Map<String, Object> requestContext =
getBindingProvider().getRequestContext();
+ AddressingProperties addressingProps =
(AddressingProperties)requestContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
+
addressingProps.setReplyTo(AddressingBuilder.getAddressingBuilder().newEndpointReference(this.wsrmSequence.getBackPort()));
}
+ Map<String, Object> rmRequestContext = new HashMap<String,
Object>();
+ List<QName> outMsgs = new LinkedList<QName>();
+ outMsgs.add(RMProvider.get().getConstants().getSequenceQName());
+ outMsgs.add(RMProvider.get().getConstants().getAckRequestedQName());
+ if (wsrmSequence.isAckRequested())
+ {
+ // piggy backing
+
outMsgs.add(RMProvider.get().getConstants().getSequenceAcknowledgementQName());
+ }
+ rmRequestContext.put(RMConstant.PROTOCOL_MESSAGES, outMsgs);
+ rmRequestContext.put(RMConstant.SEQUENCE_REFERENCE, wsrmSequence);
+ reqContext.put(RMConstant.REQUEST_CONTEXT, rmRequestContext);
}
-
- msgContext.putAll(reqContext);
}
- finally
- {
- this.wsrmLock.unlock();
- }
+ msgContext.putAll(reqContext);
+
try
{
Object retObj = invoke(opName, args, false);
@@ -333,42 +317,34 @@
}
finally
{
- CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
- this.wsrmLock.lock();
- try
+ msgContext = MessageContextAssociation.peekMessageContext();
+ if (this.wsrmSequence != null)
{
- if (this.wsrmSequence != null)
+ if (RMConstant.PROTOCOL_OPERATION_QNAMES.contains(opName) == false)
{
- if (RMConstant.PROTOCOL_OPERATION_QNAMES.contains(opName) == false)
+ Map<String, Object> wsrmResCtx = (Map<String, Object>)
msgContext.get(RMConstant.RESPONSE_CONTEXT);
+ if (wsrmResCtx != null)
{
- Map<String, Object> wsrmResCtx = (Map<String, Object>)
msgContext.get(RMConstant.RESPONSE_CONTEXT);
- if (wsrmResCtx != null)
+ RMConstants wsrmConstants = RMProvider.get().getConstants();
+ Map<QName, RMSerializable> mapping = (Map<QName,
RMSerializable>)wsrmResCtx.get(RMConstant.PROTOCOL_MESSAGES_MAPPING);
+ QName seq = wsrmConstants.getSequenceQName();
+ if (mapping.keySet().contains(seq))
{
- RMConstants wsrmConstants = RMProvider.get().getConstants();
- Map<QName, RMSerializable> mapping = (Map<QName,
RMSerializable>)wsrmResCtx.get(RMConstant.PROTOCOL_MESSAGES_MAPPING);
- QName seq = wsrmConstants.getSequenceQName();
- if (mapping.keySet().contains(seq))
- {
- RMHelper.handleSequenceHeader((RMSequence)mapping.get(seq),
this.wsrmSequence);
- }
- QName seqAck = wsrmConstants.getSequenceAcknowledgementQName();
- if (mapping.keySet().contains(seqAck))
- {
-
RMHelper.handleSequenceAcknowledgementHeader((RMSequenceAcknowledgement)mapping.get(seqAck),
this.wsrmSequence);
- }
- QName ackReq = wsrmConstants.getAckRequestedQName();
- if (mapping.keySet().contains(ackReq))
- {
-
RMHelper.handleAckRequestedHeader((RMAckRequested)mapping.get(ackReq),
this.wsrmSequence);
- }
+ RMHelper.handleSequenceHeader((RMSequence)mapping.get(seq),
this.wsrmSequence);
}
+ QName seqAck = wsrmConstants.getSequenceAcknowledgementQName();
+ if (mapping.keySet().contains(seqAck))
+ {
+
RMHelper.handleSequenceAcknowledgementHeader((RMSequenceAcknowledgement)mapping.get(seqAck),
this.wsrmSequence);
+ }
+ QName ackReq = wsrmConstants.getAckRequestedQName();
+ if (mapping.keySet().contains(ackReq))
+ {
+
RMHelper.handleAckRequestedHeader((RMAckRequested)mapping.get(ackReq),
this.wsrmSequence);
+ }
}
}
}
- finally
- {
- this.wsrmLock.unlock();
- }
// Copy the inbound msg properties to the binding's response context
for (String key : msgContext.keySet())
@@ -534,60 +510,52 @@
@SuppressWarnings("unchecked")
public org.jboss.ws.extensions.wsrm.api.RMSequence createSequence(RMAddressingType
addrType) throws RMException
{
- this.getWSRMLock().lock();
+ if (this.wsrmSequence != null)
+ throw new IllegalStateException("Sequence already registered with proxy
instance");
+ if (addrType == null)
+ throw new IllegalArgumentException("Addressing type cannot be null");
+
try
{
- if (this.wsrmSequence != null)
- throw new IllegalStateException("Sequence already registered with proxy
instance");
- if (addrType == null)
- throw new IllegalArgumentException("Addressing type cannot be
null");
-
- try
+ // set up addressing data
+ RMSequenceImpl candidateSequence = new RMSequenceImpl(addrType,
getEndpointMetaData().getConfig().getRMMetaData());
+ String address = getEndpointMetaData().getEndpointAddress();
+ String action = RMConstant.CREATE_SEQUENCE_WSA_ACTION;
+ AddressingProperties addressingProps = null;
+ if (addrType == RMAddressingType.ADDRESSABLE)
{
- // set up addressing data
- RMSequenceImpl candidateSequence = new RMSequenceImpl(addrType,
getEndpointMetaData().getConfig().getRMMetaData());
- String address = getEndpointMetaData().getEndpointAddress();
- String action = RMConstant.CREATE_SEQUENCE_WSA_ACTION;
- AddressingProperties addressingProps = null;
- if (addrType == RMAddressingType.ADDRESSABLE)
- {
- addressingProps = AddressingClientUtil.createDefaultProps(action,
address);
-
addressingProps.setReplyTo(AddressingBuilder.getAddressingBuilder().newEndpointReference(candidateSequence.getBackPort()));
- }
- else
- {
- addressingProps = AddressingClientUtil.createAnonymousProps(action,
address);
- }
- Map requestContext = getBindingProvider().getRequestContext();
- requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND,
addressingProps);
- // set up wsrm request context
- QName createSequenceQN =
RMProvider.get().getConstants().getCreateSequenceQName();
- Map rmRequestContext = new HashMap();
- List outMsgs = new LinkedList();
- outMsgs.add(createSequenceQN);
- rmRequestContext.put(RMConstant.PROTOCOL_MESSAGES, outMsgs);
- rmRequestContext.put(RMConstant.SEQUENCE_REFERENCE, candidateSequence);
- requestContext.put(RMConstant.REQUEST_CONTEXT, rmRequestContext);
- // invoke stub method
- invoke(createSequenceQN, new Object[] {},
getBindingProvider().getResponseContext());
- // read WSRM sequence id from response context
- Map rmResponseContext =
(Map)getBindingProvider().getResponseContext().get(RMConstant.RESPONSE_CONTEXT);
- RMCreateSequenceResponse createSequenceResponse =
((RMCreateSequenceResponse)((Map)rmResponseContext.get(RMConstant.PROTOCOL_MESSAGES_MAPPING)).get(RMProvider.get().getConstants().getCreateSequenceResponseQName()));
- String outboundId = createSequenceResponse.getIdentifier();
- candidateSequence.setClient(this);
- candidateSequence.setOutboundId(outboundId);
-
candidateSequence.setBehavior(createSequenceResponse.getIncompleteSequenceBehavior());
-
candidateSequence.setDuration(RMHelper.durationToLong(createSequenceResponse.getExpires()));
- return this.wsrmSequence = candidateSequence;
+ addressingProps = AddressingClientUtil.createDefaultProps(action, address);
+
addressingProps.setReplyTo(AddressingBuilder.getAddressingBuilder().newEndpointReference(candidateSequence.getBackPort()));
}
- catch (Exception e)
+ else
{
- throw new RMException("Unable to create WSRM sequence", e);
+ addressingProps = AddressingClientUtil.createAnonymousProps(action,
address);
}
+ Map requestContext = getBindingProvider().getRequestContext();
+ requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND,
addressingProps);
+ // set up wsrm request context
+ QName createSequenceQN =
RMProvider.get().getConstants().getCreateSequenceQName();
+ Map rmRequestContext = new HashMap();
+ List outMsgs = new LinkedList();
+ outMsgs.add(createSequenceQN);
+ rmRequestContext.put(RMConstant.PROTOCOL_MESSAGES, outMsgs);
+ rmRequestContext.put(RMConstant.SEQUENCE_REFERENCE, candidateSequence);
+ requestContext.put(RMConstant.REQUEST_CONTEXT, rmRequestContext);
+ // invoke stub method
+ invoke(createSequenceQN, new Object[] {},
getBindingProvider().getResponseContext());
+ // read WSRM sequence id from response context
+ Map rmResponseContext =
(Map)getBindingProvider().getResponseContext().get(RMConstant.RESPONSE_CONTEXT);
+ RMCreateSequenceResponse createSequenceResponse =
((RMCreateSequenceResponse)((Map)rmResponseContext.get(RMConstant.PROTOCOL_MESSAGES_MAPPING)).get(RMProvider.get().getConstants().getCreateSequenceResponseQName()));
+ String outboundId = createSequenceResponse.getIdentifier();
+ candidateSequence.setClient(this);
+ candidateSequence.setOutboundId(outboundId);
+
candidateSequence.setBehavior(createSequenceResponse.getIncompleteSequenceBehavior());
+
candidateSequence.setDuration(RMHelper.durationToLong(createSequenceResponse.getExpires()));
+ return this.wsrmSequence = candidateSequence;
}
- finally
+ catch (Exception e)
{
- this.getWSRMLock().unlock();
+ throw new RMException("Unable to create WSRM sequence", e);
}
}
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceImpl.java 2007-12-04
16:53:09 UTC (rev 5180)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceImpl.java 2007-12-04
18:31:13 UTC (rev 5181)
@@ -30,7 +30,6 @@
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
-import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
@@ -43,6 +42,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.jaxws.client.ClientImpl;
+import org.jboss.ws.core.utils.UUIDGenerator;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.wsrm.config.RMConfig;
import org.jboss.ws.extensions.wsrm.api.RMAddressingType;
@@ -78,13 +78,9 @@
private long creationTime;
private URI backPort;
private ClientImpl client;
- // object states variables
- private boolean terminated;
- private boolean discarded;
private boolean isFinal;
private AtomicBoolean inboundMessageAckRequested = new AtomicBoolean();
private AtomicLong messageNumber = new AtomicLong();
- private final Object lock = new Object();
private AtomicInteger countOfUnassignedMessagesAvailable = new AtomicInteger();
public void unassignedMessageReceived()
@@ -105,7 +101,7 @@
this.wsrmConfig = wsrmConfig;
try
{
- this.backPort = new
URI("http://localhost:8888/temporary_listen_address/666"); // TODO: use
generator;;
+ this.backPort = new
URI("http://localhost:8888/temporary_listen_address/" +
UUIDGenerator.generateRandomUUIDString());
}
catch (URISyntaxException use)
{
@@ -115,27 +111,18 @@
public final Set<Long> getReceivedInboundMessages()
{
- synchronized (lock)
- {
- return Collections.unmodifiableSet(this.receivedInboundMessages);
- }
+ return Collections.unmodifiableSet(this.receivedInboundMessages);
}
public final BindingProvider getBindingProvider()
{
- synchronized (lock)
- {
- return (BindingProvider)this.client;
- }
+ return (BindingProvider)this.client;
}
public final void setFinal()
{
- synchronized (lock)
- {
- this.isFinal = true;
- logger.debug("Sequence " + this.outgoingSequenceId + " state
changed to final");
- }
+ this.isFinal = true;
+ logger.debug("Sequence " + this.outgoingSequenceId + " state changed
to final");
}
public final void ackRequested(boolean requested)
@@ -151,64 +138,43 @@
public final void addReceivedInboundMessage(long messageId)
{
- synchronized (lock)
- {
- this.receivedInboundMessages.add(messageId);
- logger.debug("Inbound Sequence: " + this.incomingSequenceId + ",
received message no. " + messageId);
- }
+ this.receivedInboundMessages.add(messageId);
+ logger.debug("Inbound Sequence: " + this.incomingSequenceId + ",
received message no. " + messageId);
}
- public final void addReceivedMessage(long messageId)
+ public final void addReceivedOutboundMessage(long messageId)
{
- synchronized (lock)
- {
- this.acknowledgedOutboundMessages.add(messageId);
- logger.debug("Outbound Sequence: " + this.outgoingSequenceId + ",
message no. " + messageId + " acknowledged by server");
- }
+ this.acknowledgedOutboundMessages.add(messageId);
+ logger.debug("Outbound Sequence: " + this.outgoingSequenceId + ",
message no. " + messageId + " acknowledged by server");
}
public final void setOutboundId(String outboundId)
{
- synchronized (lock)
- {
- this.outgoingSequenceId = outboundId;
- }
+ this.outgoingSequenceId = outboundId;
}
public final void setInboundId(String inboundId)
{
- synchronized (lock)
- {
- this.incomingSequenceId = inboundId;
- }
+ this.incomingSequenceId = inboundId;
}
public final void setClient(ClientImpl client)
{
- synchronized (lock)
- {
- this.client = client;
- }
+ this.client = client;
}
public final void setDuration(long duration)
{
- synchronized (lock)
+ if (duration > 0)
{
- if (duration > 0)
- {
- this.creationTime = System.currentTimeMillis();
- this.duration = duration;
- }
+ this.creationTime = System.currentTimeMillis();
+ this.duration = duration;
}
}
public final long getDuration()
{
- synchronized (lock)
- {
- return this.duration;
- }
+ return this.duration;
}
public final URI getBackPort()
@@ -229,43 +195,16 @@
return this.messageNumber.get();
}
- public final void discard() throws RMException
+ public final void close() throws RMException
{
- synchronized (lock)
+ try
{
- this.client.getWSRMLock().lock();
- try
- {
- this.client.setWSRMSequence(null);
- this.discarded = true;
- }
- finally
- {
- this.client.getWSRMLock().unlock();
- }
+ sendCloseMessage();
+ sendTerminateMessage();
}
- }
-
- public final void close() throws RMException
- {
- synchronized (lock)
+ finally
{
- if (this.terminated)
- return;
-
- this.terminated = true;
-
- try
- {
- sendCloseMessage();
- sendTerminateMessage();
- }
- finally
- {
- client.getWSRMLock().lock();
- this.client.setWSRMSequence(null); // TODO: do not remove this
- this.client.getWSRMLock().unlock();
- }
+ this.client.setWSRMSequence(null);
}
}
@@ -311,13 +250,10 @@
public final void sendCloseMessage()
{
- synchronized (lock)
+ while (this.isAckRequested())
{
- while (this.isAckRequested())
- {
- logger.debug("Waiting till all inbound sequence acknowledgements will be
sent");
- sendSequenceAcknowledgementMessage();
- }
+ logger.debug("Waiting till all inbound sequence acknowledgements will be
sent");
+ sendSequenceAcknowledgementMessage();
}
Map<String, Object> wsrmReqCtx = new HashMap<String, Object>();
wsrmReqCtx.put(RMConstant.ONE_WAY_OPERATION, false);
@@ -351,25 +287,12 @@
public final void setBehavior(RMIncompleteSequenceBehavior behavior)
{
- synchronized (lock)
+ if (behavior != null)
{
- if (behavior != null)
- {
- this.behavior = behavior;
- }
+ this.behavior = behavior;
}
}
- public final boolean isCompleted()
- {
- return true;
- }
-
- public final boolean isCompleted(int timeAmount, TimeUnit timeUnit)
- {
- return true;
- }
-
public final String getOutboundId()
{
return outgoingSequenceId;
@@ -380,19 +303,4 @@
return incomingSequenceId;
}
- public final boolean isClosed()
- {
- synchronized (lock)
- {
- return this.terminated;
- }
- }
-
- public final boolean isDiscarded()
- {
- synchronized (lock)
- {
- return this.discarded;
- }
- }
}
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/api/RMSequence.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/api/RMSequence.java 2007-12-04
16:53:09 UTC (rev 5180)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/api/RMSequence.java 2007-12-04
18:31:13 UTC (rev 5181)
@@ -21,17 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.api;
-import java.util.concurrent.TimeUnit;
-
public interface RMSequence
{
- String getOutboundId();
- String getInboundId();
- void discard();
- long getDuration();
- boolean isDiscarded();
void close();
- boolean isClosed();
- boolean isCompleted();
- boolean isCompleted(int timeAmount, TimeUnit timeUnit);
}
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/RMHelper.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/RMHelper.java 2007-12-04
16:53:09 UTC (rev 5180)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/RMHelper.java 2007-12-04
18:31:13 UTC (rev 5181)
@@ -95,7 +95,7 @@
{
for (long i = range.getLower(); i <= range.getUpper(); i++)
{
- sequence.addReceivedMessage(i);
+ sequence.addReceivedOutboundMessage(i);
}
}
if (seqAckHeader.isFinal())
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java 2007-12-04
16:53:09 UTC (rev 5180)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java 2007-12-04
18:31:13 UTC (rev 5181)
@@ -28,7 +28,6 @@
import java.io.IOException;
import java.net.URL;
import java.util.Properties;
-import java.util.concurrent.TimeUnit;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
@@ -56,6 +55,10 @@
static
{
+ System.out.println("FIXME [JBWS-515] Provide an initial implementation for
WS-ReliableMessaging");
+ System.out.println("FIXME [JBWS-1699] Implement the basic message exchange
that is required for WS-RM");
+ System.out.println("FIXME [JBWS-1700] Provide a comprehensive test case for
WS-RM");
+
// load test properties
File propertiesFile = new
File("resources/jaxws/wsrm/properties/RMAbstractOneWayTest.properties");
try
@@ -80,17 +83,12 @@
public void testOneWayMethods() throws Exception
{
- System.out.println("FIXME [JBWS-515] Provide an initial implementation for
WS-ReliableMessaging");
- System.out.println("FIXME [JBWS-1699] Implement the basic message exchange
that is required for WS-RM");
- System.out.println("FIXME [JBWS-1700] Provide a comprehensive test case for
WS-RM");
if (true) return; // disable WS-RM tests - they cause regression in hudson
RMSequence sequence = null;
if (emulatorOn)
{
- RMProvider wsrmProvider = (RMProvider)proxy;
- sequence = wsrmProvider.createSequence(getAddressingType());
- System.out.println("Created sequence with id=" +
sequence.getOutboundId());
+ sequence = ((RMProvider)proxy).createSequence(getAddressingType());
}
setAddrProps(proxy, "http://useless/action1", serviceURL);
proxy.method1();
@@ -100,11 +98,7 @@
proxy.method3(new String[] {"Hello","World"});
if (emulatorOn)
{
- if (!sequence.isCompleted(1000, TimeUnit.MILLISECONDS)) {
- fail("Sequence not completed within specified time amount");
- } else {
- sequence.close();
- }
+ sequence.close();
}
}
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java 2007-12-04
16:53:09 UTC (rev 5180)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java 2007-12-04
18:31:13 UTC (rev 5181)
@@ -62,6 +62,9 @@
static
{
+ System.out.println("FIXME [JBWS-515] Provide an initial implementation for
WS-ReliableMessaging");
+ System.out.println("FIXME [JBWS-1699] Implement the basic message exchange
that is required for WS-RM");
+ System.out.println("FIXME [JBWS-1700] Provide a comprehensive test case for
WS-RM");
// load test properties
File propertiesFile = new
File("resources/jaxws/wsrm/properties/RMAbstractReqResTest.properties");
try
@@ -162,18 +165,12 @@
private void doReliableMessageExchange(Object proxyObject, InvocationType
invocationType) throws Exception
{
- System.out.println("FIXME [JBWS-515] Provide an initial implementation for
WS-ReliableMessaging");
- System.out.println("FIXME [JBWS-1699] Implement the basic message exchange
that is required for WS-RM");
- System.out.println("FIXME [JBWS-1700] Provide a comprehensive test case for
WS-RM");
if (true) return; // disable WS-RM tests - they cause regression in hudson
RMSequence sequence = null;
if (emulatorOn)
{
- RMProvider wsrmProvider = (RMProvider)proxyObject;
- sequence = wsrmProvider.createSequence(getAddressingType());
- System.out.println("Created sequence with outbound id=" +
sequence.getOutboundId());
- System.out.println("Created sequence with inbound id=" +
sequence.getInboundId());
+ sequence = ((RMProvider)proxyObject).createSequence(getAddressingType());
}
setAddrProps(proxy, "http://useless/action", serviceURL);
invokeWebServiceMethod(invocationType);
@@ -183,12 +180,7 @@
invokeWebServiceMethod(invocationType);
if (emulatorOn)
{
- if (!sequence.isCompleted(1000, TimeUnit.MILLISECONDS)) {
- sequence.discard();
- fail("Sequence not completed within specified time amount");
- } else {
- sequence.close();
- }
+ sequence.close();
}
}