You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ve...@apache.org on 2009/03/29 17:38:39 UTC
svn commit: r759708 -
/synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java
Author: veithen
Date: Sun Mar 29 15:38:39 2009
New Revision: 759708
URL: http://svn.apache.org/viewvc?rev=759708&view=rev
Log:
Trigger an exception if the VFS transport sender is invoked in an out-in message exchange pattern. Since the transport doesn't support synchronous responses, doing so would leave an entry in Synapse's callback table that would only be released after a (long) delay. Since this entry holds a reference to the message context of the outgoing message this might quickly lead to resource exhaustion. This change forces the user to set the OUT_ONLY property as necessary.
Modified:
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java
Modified: synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java?rev=759708&r1=759707&r2=759708&view=diff
==============================================================================
--- synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java (original)
+++ synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java Sun Mar 29 15:38:39 2009
@@ -79,6 +79,11 @@
public void sendMessage(MessageContext msgCtx, String targetAddress,
OutTransportInfo outTransportInfo) throws AxisFault {
+ if (waitForSynchronousResponse(msgCtx)) {
+ throw new AxisFault("The VFS transport doesn't support synchronous responses. " +
+ "Please use the appropriate (out only) message exchange pattern.");
+ }
+
VFSOutTransportInfo vfsOutInfo = null;
if (targetAddress != null) {