servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r512040 - in /incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http: pom.xml src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java
Date Mon, 26 Feb 2007 22:24:03 GMT
Author: aco
Date: Mon Feb 26 14:24:03 2007
New Revision: 512040

URL: http://svn.apache.org/viewvc?view=rev&rev=512040
Log:
- Made geronimo-servlet spec jar non-provided to workaround exception when compiling an http-su
- Added temp workaround to allow configuration of defaultMep in http consumer endpoint

Modified:
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/pom.xml
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/pom.xml?view=diff&rev=512040&r1=512039&r2=512040
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/pom.xml (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/pom.xml Mon Feb
26 14:24:03 2007
@@ -138,7 +138,6 @@
     <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-servlet_2.4_spec</artifactId>
-      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.geronimo.specs</groupId>

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java?view=diff&rev=512040&r1=512039&r2=512040
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/endpoints/HttpConsumerEndpoint.java
Mon Feb 26 14:24:03 2007
@@ -20,12 +20,14 @@
 import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
+import java.net.URI;
 
 import javax.jbi.messaging.ExchangeStatus;
 import javax.jbi.messaging.Fault;
 import javax.jbi.messaging.MessageExchange;
 import javax.jbi.messaging.NormalizedMessage;
 import javax.jbi.servicedesc.ServiceEndpoint;
+import javax.jbi.management.DeploymentException;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -44,6 +46,7 @@
 import org.apache.servicemix.http.HttpProcessor;
 import org.apache.servicemix.http.SslParameters;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
+import org.apache.servicemix.jbi.messaging.MessageExchangeSupport;
 import org.mortbay.jetty.RetryRequest;
 import org.mortbay.util.ajax.Continuation;
 import org.mortbay.util.ajax.ContinuationSupport;
@@ -63,6 +66,7 @@
     private String locationUri;
     private HttpConsumerMarshaler marshaler = new DefaultHttpConsumerMarshaler();
     private long timeout = 0; // 0 => default to the timeout configured on component
+    private URI defaultMep = MessageExchangeSupport.IN_OUT;
 
     private Map<String, Object> resources = new HashMap<String, Object>();
     private Map<String, Continuation> locks = new ConcurrentHashMap<String, Continuation>();
@@ -151,6 +155,20 @@
         this.ssl = ssl;
     }
 
+    /**
+     * @return defaultMep of the endpoint
+     */
+    public URI getDefaultMep() {
+        return defaultMep;
+    }
+
+    /**
+     * @param defaultMep - defaultMep of the endpoint
+     */
+    public void setDefaultMep(URI defaultMep) {
+        this.defaultMep = defaultMep;
+    }
+
     public void start() throws Exception {
         super.start();
         loadStaticResources();
@@ -347,5 +365,11 @@
     public void sendOut(MessageExchange exchange, NormalizedMessage outMsg, HttpServletRequest
request, HttpServletResponse response) throws Exception {
         marshaler.sendOut(exchange, outMsg, request, response);
     }
-    
+
+    public void validate() throws DeploymentException {
+        super.validate();
+        if (marshaler instanceof DefaultHttpConsumerMarshaler) {
+            ((DefaultHttpConsumerMarshaler)marshaler).setDefaultMep(getDefaultMep());
+        }
+    }
 }



Mime
View raw message