cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: rev 57514 - cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl
Date Fri, 12 Nov 2004 13:21:39 GMT
Author: cziegeler
Date: Fri Nov 12 05:21:38 2004
New Revision: 57514

Modified:
   cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/AbstractCopletAdapter.java
   cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/URICopletAdapter.java
Log:
Fix bug 32199: Error-uri double instatiations in the new portal.

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/AbstractCopletAdapter.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/AbstractCopletAdapter.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/AbstractCopletAdapter.java
Fri Nov 12 05:21:38 2004
@@ -125,6 +125,10 @@
                     } catch (InterruptedException ignore) {
                         // ignored
                     }
+                    error = loader.exception;
+                    if ( error != null && this.getLogger().isWarnEnabled() ) {
+                        this.getLogger().warn("Unable to get content of coplet: " + coplet.getId(),
error);                        
+                    }
                 } else {
                     this.streamContent( coplet, buffer );
                     read = true;
@@ -156,12 +160,14 @@
      * @see org.apache.cocoon.portal.coplet.adapter.CopletAdapter#init(org.apache.cocoon.portal.coplet.CopletInstanceData)
      */
     public void init(CopletInstanceData coplet) {
+        // nothing to do here, can be overwritten in subclasses
     }
     
     /* (non-Javadoc)
      * @see org.apache.cocoon.portal.coplet.adapter.CopletAdapter#destroy(org.apache.cocoon.portal.coplet.CopletInstanceData)
      */
     public void destroy(CopletInstanceData coplet) {
+        // nothing to do here, can be overwritten in subclasses
     }
 
     /* (non-Javadoc)
@@ -183,6 +189,7 @@
      * @see org.apache.cocoon.portal.coplet.adapter.CopletAdapter#logout(org.apache.cocoon.portal.coplet.CopletInstanceData)
      */
     public void logout(CopletInstanceData coplet) {
+        // nothing to do here, can be overwritten in subclasses
     }
     
     /**
@@ -229,8 +236,7 @@
     }
     
     boolean join( final long milis )
-    throws InterruptedException 
-    {
+    throws InterruptedException {
         return this.finished.attempt( milis );
     }
     

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/URICopletAdapter.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/URICopletAdapter.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/URICopletAdapter.java
Fri Nov 12 05:21:38 2004
@@ -149,6 +149,7 @@
                 eventManager = (EventManager)this.manager.lookup(EventManager.ROLE);
                 eventManager.getRegister().unsubscribe( this );
             } catch (Exception ignore) {
+                // ignore
             } finally {
                 this.manager.release( eventManager ); 
             }
@@ -188,6 +189,7 @@
             list.add(event.getTarget());
             service.setTemporaryAttribute(URICopletAdapter.class.getName(), list);
         } catch (ServiceException ignore ) {            
+            // ignore
         } finally {
             this.manager.release(service);
         }
@@ -231,6 +233,7 @@
                     notifyingBuilder= (NotifyingBuilder)this.manager.lookup(NotifyingBuilder.ROLE);
                     currentNotifying = notifyingBuilder.build(this, error);
                 } catch (Exception ignore) {
+                    // ignore
                 } finally {
                     this.manager.release(notifyingBuilder);
                 }
@@ -248,9 +251,10 @@
                     objectModel.remove(org.apache.cocoon.Constants.NOTIFYING_OBJECT);
                     objectModel.remove(ObjectModelHelper.THROWABLE_OBJECT);
                 }
-            }
+            } else {
             
-            this.streamContent( coplet, uri, handler);
+                this.streamContent( coplet, uri, handler);
+            }
                         
             return true;
         }

Mime
View raw message