[jboss-svn-commits] JBL Code SVN: r25193 - labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/gateway.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Feb 10 02:40:06 EST 2009


Author: kevin.conner at jboss.com
Date: 2009-02-10 02:40:05 -0500 (Tue, 10 Feb 2009)
New Revision: 25193

Modified:
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
Log:
Rolled back 25163: JBESB-2179

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java	2009-02-10 07:35:21 UTC (rev 25192)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java	2009-02-10 07:40:05 UTC (rev 25193)
@@ -32,11 +32,9 @@
 import org.jboss.remoting.marshal.http.HTTPMarshaller;
 import org.jboss.remoting.security.SSLSocketBuilder;
 import org.jboss.remoting.transport.Connector;
-import org.jboss.remoting.transport.http.HTTPMetadataConstants;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.actions.ActionUtils;
 import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.couriers.FaultMessageException;
 import org.jboss.soa.esb.helpers.ConfigTree;
 import org.jboss.soa.esb.helpers.KeyValuePair;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
@@ -351,13 +349,6 @@
     public Object invoke(InvocationRequest invocationRequest) throws Throwable {
         try {
             if (synchronous) {
-                /* This is a quick fix for clients sending HTTP OPTIONS commands
-                 *  as a ping. In theory we should examine the request URI and reply accordingly. 
-                 */
-                String method = (String) invocationRequest.getRequestPayload().get("MethodType");
-                if (method != null && method.equals("OPTIONS")) {
-		   return "";
-		}
                 Object response = messageDeliveryAdapter.deliverSync(invocationRequest, serviceInvokerTimeout);
                 if(logger.isDebugEnabled()) {
                     logger.debug("Returning response [" + response + "].");
@@ -367,23 +358,6 @@
             } else {
                 messageDeliveryAdapter.deliverAsync(invocationRequest);
             }
-        }catch (FaultMessageException fme) {
-           logger.error("JBoss Remoting Gateway failed to " + (synchronous ? "synchronously" : "asynchronously") + " deliver message to target service ["
-			+ messageDeliveryAdapter.getDeliveryAdapter().getServiceCategory() + ":"
-			+ messageDeliveryAdapter.getDeliveryAdapter().getServiceName() + "].", fme);
-	   if (fme.getCause() == null) {
-	      throw fme;
-	   }
-	   /*
-	    * This code should go into a MessageComposer but since the
-	    * MessageComposer interface does not have a method to decompose
-	    * exceptions, this will compose an http response that is easier to
-	    * interpret by software and humans than the default CoyoteInvoker
-	    * exception handling.
-	    */
-	   invocationRequest.getReturnPayload().put(HTTPMetadataConstants.RESPONSE_CODE, new Integer(500));
-	   invocationRequest.getReturnPayload().put(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE, "Server exception type " + fme.getCause().getClass().getSimpleName());
-	   return fme.getCause().getMessage();  
         } catch (Throwable t) {
             logger.error("JBoss Remoting Gateway failed to " + (synchronous ? "synchronously" : "asynchronously") + " deliver message to target service [" +
                     messageDeliveryAdapter.getDeliveryAdapter().getServiceCategory() + ":" +




More information about the jboss-svn-commits mailing list