tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andygumbre...@apache.org
Subject svn commit: r1511601 - /tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/EjbDaemon.java
Date Thu, 08 Aug 2013 07:13:39 GMT
Author: andygumbrecht
Date: Thu Aug  8 07:13:39 2013
New Revision: 1511601

URL: http://svn.apache.org/r1511601
Log:
Ensure response is processed even on error.

Modified:
    tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/EjbDaemon.java

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/EjbDaemon.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/EjbDaemon.java?rev=1511601&r1=1511600&r2=1511601&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/EjbDaemon.java
(original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/EjbDaemon.java
Thu Aug  8 07:13:39 2013
@@ -237,25 +237,27 @@ public class EjbDaemon implements org.ap
                     return;
             }
 
-            info.outputStream = new CountingOutputStream(rawOut);
-            PROTOCOL_VERSION.writeExternal(info.outputStream);
-            oos = new ObjectOutputStream(info.outputStream);
-
-            clusterHandler.processResponse(clusterResponse, oos, clientMetaData);
-
-            switch (requestType) {
-                case EJB_REQUEST:
-                    processEjbResponse(response, oos, clientMetaData);
-                    break;
-                case JNDI_REQUEST:
-                    processJndiResponse(response, oos, clientMetaData);
-                    break;
-                case AUTH_REQUEST:
-                    processAuthResponse(response, oos, clientMetaData);
-                    break;
-                default:
-                    //Should never get here...
-                    logger.error("\"" + requestType + " " + clientMetaData.getSpec() + "\"
FAIL \"Unknown response type " + requestType);
+            try {
+                info.outputStream = new CountingOutputStream(rawOut);
+                PROTOCOL_VERSION.writeExternal(info.outputStream);
+                oos = new ObjectOutputStream(info.outputStream);
+
+                clusterHandler.processResponse(clusterResponse, oos, clientMetaData);
+            } finally {
+                switch (requestType) {
+                    case EJB_REQUEST:
+                        processEjbResponse(response, oos, clientMetaData);
+                        break;
+                    case JNDI_REQUEST:
+                        processJndiResponse(response, oos, clientMetaData);
+                        break;
+                    case AUTH_REQUEST:
+                        processAuthResponse(response, oos, clientMetaData);
+                        break;
+                    default:
+                        //Should never get here...
+                        logger.error("\"" + requestType + " " + clientMetaData.getSpec()
+ "\" FAIL \"Unknown response type " + requestType);
+                }
             }
 
         } catch (IllegalArgumentException iae) {



Mime
View raw message