axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From az...@apache.org
Subject svn commit: r889272 - in /webservices/axis2/trunk/java/modules/transport/local/src/org/apache/axis2/transport/local: LocalTransportReceiver.java LocalTransportSender.java
Date Thu, 10 Dec 2009 14:14:36 GMT
Author: azeez
Date: Thu Dec 10 14:14:36 2009
New Revision: 889272

URL: http://svn.apache.org/viewvc?rev=889272&view=rev
Log:
The static configuration context class attribute assumes that their will be only a single
configuration context per server instance. This is not necessarilly true. In a multitenant
service deployment scenario, there will be multiple configuration contexts & axis configurations.
Hence, introducing a new method.


Modified:
    webservices/axis2/trunk/java/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportReceiver.java
    webservices/axis2/trunk/java/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java

Modified: webservices/axis2/trunk/java/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportReceiver.java?rev=889272&r1=889271&r2=889272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportReceiver.java
(original)
+++ webservices/axis2/trunk/java/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportReceiver.java
Thu Dec 10 14:14:36 2009
@@ -50,6 +50,17 @@
         this(CONFIG_CONTEXT);
     }
 
+    public void processMessage(ConfigurationContext configurationContext,
+                               InputStream in,
+                               EndpointReference to,
+                               String action,
+                               OutputStream response) throws AxisFault {
+        if (this.confContext == null) {
+            this.confContext = configurationContext;
+        }
+        processMessage(in, to, action, response);
+    }
+
     public void processMessage(InputStream in, EndpointReference to, String action, OutputStream
response)
             throws AxisFault {
         MessageContext msgCtx = confContext.createMessageContext();
@@ -57,13 +68,13 @@
                 Constants.TRANSPORT_LOCAL);
         TransportOutDescription tOut = confContext.getAxisConfiguration().getTransportOut(
                 Constants.TRANSPORT_LOCAL);
-                
+
         // CAUTION : When using Local Transport of Axis2,  class LocalTransportReceiver changed
the name of LocalTransportSender's class in configContext.
         // We escaped this problem by the following code.
         LocalResponseTransportOutDescription localTransportResOut = new LocalResponseTransportOutDescription(
                 tOut);
         localTransportResOut.setSender(new LocalResponder(response));
-        
+
         try {
             msgCtx.setTransportIn(tIn);
             msgCtx.setTransportOut(localTransportResOut);

Modified: webservices/axis2/trunk/java/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java?rev=889272&r1=889271&r2=889272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java
(original)
+++ webservices/axis2/trunk/java/modules/transport/local/src/org/apache/axis2/transport/local/LocalTransportSender.java
Thu Dec 10 14:14:36 2009
@@ -101,7 +101,12 @@
             ByteArrayOutputStream response = new ByteArrayOutputStream();
 
             LocalTransportReceiver localTransportReceiver = new LocalTransportReceiver(this);
-            localTransportReceiver.processMessage(in, msgContext.getTo(), msgContext.getOptions().getAction(),
response);
+             localTransportReceiver.processMessage(msgContext.getConfigurationContext(),
+                                                  in,
+                                                  msgContext.getTo(),
+                                                  msgContext.getOptions().getAction(),
+                                                  response);
+
             in.close();
             out.close();
             in = new ByteArrayInputStream(response.toByteArray());



Mime
View raw message