cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject svn commit: rev 47050 - cocoon/branches/BRANCH_2_1_X/src/blocks/cron/java/org/apache/cocoon/components/cron
Date Wed, 22 Sep 2004 15:02:01 GMT
Author: unico
Date: Wed Sep 22 08:02:00 2004
New Revision: 47050

Modified:
   cocoon/branches/BRANCH_2_1_X/src/blocks/cron/java/org/apache/cocoon/components/cron/QuartzJobExecutor.java
Log:
dispose on correct condition

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/cron/java/org/apache/cocoon/components/cron/QuartzJobExecutor.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/cron/java/org/apache/cocoon/components/cron/QuartzJobExecutor.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/cron/java/org/apache/cocoon/components/cron/QuartzJobExecutor.java
Wed Sep 22 08:02:00 2004
@@ -98,6 +98,7 @@
         Object key = CocoonComponentManager.startProcessing(env);
         CocoonComponentManager.enterEnvironment(env, new WrapperComponentManager(manager),
processor);
         boolean release = false;
+        boolean dispose = false;
         try {
             jobrole = (String)data.get(QuartzJobScheduler.DATA_MAP_ROLE);
 
@@ -106,6 +107,7 @@
                 ContainerUtil.enableLogging(job, logger);
                 ContainerUtil.contextualize(job, appContext);
                 ContainerUtil.service(job, manager);
+                dispose = true;
             } else {
                 job = manager.lookup(jobrole);
                 release = true;
@@ -140,13 +142,15 @@
             CocoonComponentManager.leaveEnvironment();
             CocoonComponentManager.endProcessing(env, key);
 
-            if (release) {
-                manager.release(job);
+            if (manager != null) {
+                manager.release(processor);
+                if (release) {
+                    manager.release(job);
+                }
             }
-            else {
+            if (dispose) {
             	ContainerUtil.dispose(job);
             }
-            manager.release(processor);
         }
     }
 }

Mime
View raw message