cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r325956 - in /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet: CocoonPortlet.java ManagedCocoonPortlet.java
Date Mon, 17 Oct 2005 18:45:19 GMT
Author: vgritsenko
Date: Mon Oct 17 11:45:14 2005
New Revision: 325956

URL: http://svn.apache.org/viewcvs?rev=325956&view=rev
Log:
    <action dev="VG" type="fix" fixes-bug="35905">
      Do not flush and close output stream, servlet container
      will take care of it.
    </action>


Modified:
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/CocoonPortlet.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/ManagedCocoonPortlet.java

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/CocoonPortlet.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/CocoonPortlet.java?rev=325956&r1=325955&r2=325956&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/CocoonPortlet.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/CocoonPortlet.java Mon Oct 17
11:45:14 2005
@@ -607,20 +607,14 @@
                 ((MultipartActionRequest) request).cleanup();
             }
 
-            try {
-                OutputStream out = res.getPortletOutputStream();
-                out.flush();
-                out.close();
-            } catch (SocketException se) {
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("SocketException while trying to close stream.", se);
-                } else if (getLogger().isWarnEnabled()) {
-                    getLogger().warn("SocketException while trying to close stream.");
-                }
-
-            } catch (Exception e) {
-                getLogger().error("Cocoon got an Exception while trying to close stream.",
e);
-            }
+            /*
+             * Portlet Specification 1.0, PLT.12.3.2 Output Stream and Writer Objects:
+             *   The termination of the render method of the portlet indicates
+             *   that the portlet has satisfied the request and that the output
+             *   object is to be closed.
+             *
+             * Portlet container will close the stream, no need to close it here.
+             */
         }
     }
 

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/ManagedCocoonPortlet.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/ManagedCocoonPortlet.java?rev=325956&r1=325955&r2=325956&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/ManagedCocoonPortlet.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portlet/ManagedCocoonPortlet.java Mon
Oct 17 11:45:14 2005
@@ -622,20 +622,14 @@
                 ctxMap.clear();
             }
 
-            try {
-                OutputStream out = res.getPortletOutputStream();
-                out.flush();
-                out.close();
-            } catch (SocketException se) {
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("SocketException while trying to close stream.", se);
-                } else if (getLogger().isWarnEnabled()) {
-                    getLogger().warn("SocketException while trying to close stream.");
-                }
-
-            } catch (Exception e) {
-                getLogger().error("Cocoon got an Exception while trying to close stream.",
e);
-            }
+            /*
+             * Portlet Specification 1.0, PLT.12.3.2 Output Stream and Writer Objects:
+             *   The termination of the render method of the portlet indicates
+             *   that the portlet has satisfied the request and that the output
+             *   object is to be closed.
+             *
+             * Portlet container will close the stream, no need to close it here.
+             */
         }
     }
 



Mime
View raw message