synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asan...@apache.org
Subject svn commit: r577398 - in /webservices/synapse/trunk/java: ./ modules/transports/src/main/java/org/apache/axis2/transport/nhttp/
Date Wed, 19 Sep 2007 17:36:04 GMT
Author: asankha
Date: Wed Sep 19 10:36:03 2007
New Revision: 577398

URL: http://svn.apache.org/viewvc?rev=577398&view=rev
Log:
Apply patch for NIO from Oleg
Add JMS 1.0.2b and HttpCore alpha6-SNAPSHOT to pom

Modified:
    webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ClientHandler.java
    webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ConnectionPool.java
    webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/HttpCoreNIOSender.java
    webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/LoggingIOSession.java
    webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ServerHandler.java
    webservices/synapse/trunk/java/pom.xml

Modified: webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ClientHandler.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ClientHandler.java?rev=577398&r1=577397&r2=577398&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ClientHandler.java
(original)
+++ webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ClientHandler.java
Wed Sep 19 10:36:03 2007
@@ -117,8 +117,8 @@
         try {
             HttpContext context = conn.getContext();
 
-            context.setAttribute(HttpExecutionContext.HTTP_CONNECTION, conn);
-            context.setAttribute(HttpExecutionContext.HTTP_TARGET_HOST, axis2Req.getHttpHost());
+            context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+            context.setAttribute(ExecutionContext.HTTP_TARGET_HOST, axis2Req.getHttpHost());
 
             context.setAttribute(OUTGOING_MESSAGE_CONTEXT, axis2Req.getMsgContext());
             context.setAttribute(REQUEST_SOURCE_CHANNEL, axis2Req.getSourceChannel());
@@ -128,7 +128,7 @@
             this.httpProcessor.process(request, context);
 
             conn.submitRequest(request);
-            context.setAttribute(HttpExecutionContext.HTTP_REQUEST, request);
+            context.setAttribute(ExecutionContext.HTTP_REQUEST, request);
 
         } catch (IOException e) {
             handleException("I/O Error : " + e.getMessage(), e, conn);
@@ -147,8 +147,8 @@
             HttpContext context = conn.getContext();
             Axis2HttpRequest axis2Req = (Axis2HttpRequest) attachment;
 
-            context.setAttribute(HttpExecutionContext.HTTP_CONNECTION, conn);
-            context.setAttribute(HttpExecutionContext.HTTP_TARGET_HOST, axis2Req.getHttpHost());
+            context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+            context.setAttribute(ExecutionContext.HTTP_TARGET_HOST, axis2Req.getHttpHost());
 
             // allocate temporary buffers to process this request
             context.setAttribute(REQUEST_BUFFER, ByteBuffer.allocate(cfg.getBufferZise()));
@@ -162,7 +162,7 @@
             this.httpProcessor.process(request, context);
 
             conn.submitRequest(request);
-            context.setAttribute(HttpExecutionContext.HTTP_REQUEST, request);
+            context.setAttribute(ExecutionContext.HTTP_REQUEST, request);
 
         } catch (IOException e) {
             handleException("I/O Error : " + e.getMessage(), e, conn);
@@ -359,11 +359,11 @@
             context.setAttribute(RESPONSE_SINK_CHANNEL, responsePipe.sink());
 
             BasicHttpEntity entity = new BasicHttpEntity();
-            if (response.getStatusLine().getHttpVersion().greaterEquals(HttpVersion.HTTP_1_1))
{
+            if (response.getStatusLine().getProtocolVersion().greaterEquals(HttpVersion.HTTP_1_1))
{
                 entity.setChunked(true);
             }
             response.setEntity(entity);
-            context.setAttribute(HttpContext.HTTP_RESPONSE, response);
+            context.setAttribute(ExecutionContext.HTTP_RESPONSE, response);
 
             workerPool.execute(
                 new ClientWorker(cfgCtx, Channels.newInputStream(responsePipe.source()),
response,

Modified: webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ConnectionPool.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ConnectionPool.java?rev=577398&r1=577397&r2=577398&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ConnectionPool.java
(original)
+++ webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ConnectionPool.java
Wed Sep 19 10:36:03 2007
@@ -19,7 +19,7 @@
 package org.apache.axis2.transport.nhttp;
 
 import org.apache.http.nio.NHttpClientConnection;
-import org.apache.http.protocol.HttpExecutionContext;
+import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.HttpHost;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -78,7 +78,7 @@
     public static void release(NHttpClientConnection conn) {
 
         HttpHost host = (HttpHost) conn.getContext().getAttribute(
-            HttpExecutionContext.HTTP_TARGET_HOST);
+            ExecutionContext.HTTP_TARGET_HOST);
         String key = host.getHostName() + ":" + Integer.toString(host.getPort());
 
         List connections = (List) connMap.get(key);

Modified: webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/HttpCoreNIOSender.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/HttpCoreNIOSender.java?rev=577398&r1=577397&r2=577398&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/HttpCoreNIOSender.java
(original)
+++ webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/HttpCoreNIOSender.java
Wed Sep 19 10:36:03 2007
@@ -28,7 +28,6 @@
 import java.util.Map;
 
 import javax.net.ssl.SSLContext;
-import javax.xml.stream.XMLStreamException;
 
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axis2.AxisFault;
@@ -40,7 +39,6 @@
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.TransportOutDescription;
-import org.apache.axis2.engine.AxisEngine;
 import org.apache.axis2.engine.MessageReceiver;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axis2.transport.OutTransportInfo;
@@ -249,8 +247,8 @@
             String headerName = (String) iter.next();
             if (HTTP.CONN_DIRECTIVE.equalsIgnoreCase(headerName) ||
                 HTTP.TRANSFER_ENCODING.equalsIgnoreCase(headerName) ||
-                HTTP.DATE_DIRECTIVE.equalsIgnoreCase(headerName) ||
-                HTTP.SERVER_DIRECTIVE.equalsIgnoreCase(headerName) ||
+                HTTP.DATE_HEADER.equalsIgnoreCase(headerName) ||
+                HTTP.SERVER_HEADER.equalsIgnoreCase(headerName) ||
                 HTTP.CONTENT_TYPE.equalsIgnoreCase(headerName) ||
                 HTTP.CONTENT_LEN.equalsIgnoreCase(headerName) ||
                 HTTP.USER_AGENT.equalsIgnoreCase(headerName)) {

Modified: webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/LoggingIOSession.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/LoggingIOSession.java?rev=577398&r1=577397&r2=577398&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/LoggingIOSession.java
(original)
+++ webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/LoggingIOSession.java
Wed Sep 19 10:36:03 2007
@@ -53,6 +53,10 @@
         this.log = LogFactory.getLog(session.getClass());
     }
 
+    public int getStatus() {
+        return this.session.getStatus();
+    }
+
     public ByteChannel channel() {
         return this.channel;
     }

Modified: webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ServerHandler.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ServerHandler.java?rev=577398&r1=577397&r2=577398&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ServerHandler.java
(original)
+++ webservices/synapse/trunk/java/modules/transports/src/main/java/org/apache/axis2/transport/nhttp/ServerHandler.java
Wed Sep 19 10:36:03 2007
@@ -20,7 +20,6 @@
 
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.transport.nhttp.util.PipeImpl;
-import org.apache.axis2.transport.nhttp.util.NativeWorkerPool;
 import org.apache.axis2.transport.nhttp.util.WorkerPool;
 import org.apache.axis2.transport.nhttp.util.WorkerPoolFactory;
 import org.apache.http.*;
@@ -104,7 +103,7 @@
 
         HttpContext context = conn.getContext();
         HttpRequest request = conn.getHttpRequest();
-        context.setAttribute(HttpContext.HTTP_REQUEST, request);
+        context.setAttribute(ExecutionContext.HTTP_REQUEST, request);
 
         // allocate temporary buffers to process this request
         context.setAttribute(REQUEST_BUFFER, ByteBuffer.allocate(cfg.getBufferZise()));
@@ -117,7 +116,7 @@
             context.setAttribute(RESPONSE_SOURCE_CHANNEL, responsePipe.source());
 
             // create the default response to this request
-            HttpVersion httpVersion = request.getRequestLine().getHttpVersion();
+            ProtocolVersion httpVersion = request.getRequestLine().getProtocolVersion();
             HttpResponse response = responseFactory.newHttpResponse(
                 httpVersion, HttpStatus.SC_OK, context);
             response.setParams(this.params);
@@ -233,7 +232,8 @@
      * @param conn the connection being processed
      */
     public void timeout(final NHttpServerConnection conn) {
-        HttpRequest req = (HttpRequest) conn.getContext().getAttribute(HttpContext.HTTP_REQUEST);
+        HttpRequest req = (HttpRequest) conn.getContext().getAttribute(
+                ExecutionContext.HTTP_REQUEST);
         if (req != null) {
             if (log.isDebugEnabled()) {
                 log.debug("Connection Timeout for request to : " + req.getRequestLine().getUri()
+
@@ -261,7 +261,7 @@
     public void exception(final NHttpServerConnection conn, final HttpException e) {
         HttpContext context = conn.getContext();
         HttpRequest request = conn.getHttpRequest();
-        HttpVersion ver = request.getRequestLine().getHttpVersion();
+        ProtocolVersion ver = request.getRequestLine().getProtocolVersion();
         HttpResponse response = responseFactory.newHttpResponse(
             ver, HttpStatus.SC_BAD_REQUEST, context);
         byte[] msg = EncodingUtils.getAsciiBytes("Malformed HTTP request: " + e.getMessage());

Modified: webservices/synapse/trunk/java/pom.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/pom.xml?rev=577398&r1=577397&r2=577398&view=diff
==============================================================================
--- webservices/synapse/trunk/java/pom.xml (original)
+++ webservices/synapse/trunk/java/pom.xml Wed Sep 19 10:36:03 2007
@@ -328,6 +328,12 @@
             </dependency>
 
             <dependency>
+                <groupId>jms</groupId>
+                <artifactId>jms-1.0.2b-spec</artifactId>
+                <version>${jms.spec.version}</version>
+            </dependency>
+
+            <dependency>
                 <groupId>wsdl4j</groupId>
                 <artifactId>wsdl4j</artifactId>
                 <version>${wsdl4j.version}</version>
@@ -566,6 +572,11 @@
             <version>${httpcore.nio.version}</version>
         </dependency>
         <dependency>
+            <groupId>jms</groupId>
+            <artifactId>jms-1.0.2b-spec</artifactId>
+            <version>${jms.spec.version}</version>
+        </dependency>
+        <dependency>
             <groupId>commons-vfs</groupId>
             <artifactId>commons-vfs</artifactId>
             <version>${commons.vfs.version}</version>
@@ -870,7 +881,8 @@
     <properties>
         <!-- Synapse and related components -->
         <synapse.version>SNAPSHOT</synapse.version>
-        <httpcore.nio.version>4.0-alpha5</httpcore.nio.version>
+        <httpcore.nio.version>4.0-alpha6-SNAPSHOT</httpcore.nio.version>
+        <jms.spec.version>1.0</jms.spec.version>
         <commons.vfs.version>1.0</commons.vfs.version>
         <commons.net.version>1.4.1</commons.net.version>
         <jsch.version>0.1.31</jsch.version>



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Mime
View raw message