cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject svn commit: rev 54674 - cocoon/branches/BRANCH_2_1_X/src/blocks/cron/java/org/apache/cocoon/components/cron
Date Tue, 12 Oct 2004 15:50:04 GMT
Author: unico
Date: Tue Oct 12 08:50:03 2004
New Revision: 54674

Modified:
   cocoon/branches/BRANCH_2_1_X/src/blocks/cron/java/org/apache/cocoon/components/cron/CocoonQuartzJobExecutor.java
  (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/cron/java/org/apache/cocoon/components/cron/CocoonQuartzJobScheduler.java
  (contents, props changed)
Log:
props

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/cron/java/org/apache/cocoon/components/cron/CocoonQuartzJobExecutor.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/cron/java/org/apache/cocoon/components/cron/CocoonQuartzJobExecutor.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/cron/java/org/apache/cocoon/components/cron/CocoonQuartzJobExecutor.java
Tue Oct 12 08:50:03 2004
@@ -1,80 +1,80 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.cocoon.components.cron;
-
-import java.net.MalformedURLException;
-
-import org.apache.avalon.framework.component.WrapperComponentManager;
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.cocoon.Constants;
-import org.apache.cocoon.Processor;
-import org.apache.cocoon.components.CocoonComponentManager;
-import org.apache.cocoon.environment.background.BackgroundEnvironment;
-import org.quartz.JobDataMap;
-import org.quartz.JobExecutionException;
-
-/**
- * This component is resposible to launch a {@link CronJob}s in a Quart Scheduler.
- *
- * @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
- * @version CVS $Id: QuartzJobExecutor.java 47533 2004-09-30 03:15:55Z vgritsenko $
- *
- * @since 2.1.1
- */
-public class CocoonQuartzJobExecutor extends QuartzJobExecutor {
-
-    private Object m_key;
-    private BackgroundEnvironment m_env;
-    private Processor m_processor;
-
-    protected void setup(JobDataMap data) throws JobExecutionException {
-        super.setup(data);
-        org.apache.cocoon.environment.Context envContext;
-        try {
-            envContext =
-                (org.apache.cocoon.environment.Context) m_context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT);
-        } catch (ContextException e) {
-        	throw new JobExecutionException(e);
-        }
-        
-        try {
-            m_env = new BackgroundEnvironment(m_logger, envContext);
-        } catch (MalformedURLException e) {
-            // Unlikely to happen
-            throw new JobExecutionException(e);
-        }
-
-        try {
-            m_processor = (Processor) m_manager.lookup(Processor.ROLE);
-        } catch (ServiceException e) {
-            throw new JobExecutionException(e);
-        }
-
-        m_key = CocoonComponentManager.startProcessing(m_env);
-        CocoonComponentManager.enterEnvironment(m_env, new WrapperComponentManager(m_manager),
m_processor);
-    }
-
-    protected void release(JobDataMap data) {
-        super.release(data);
-        CocoonComponentManager.leaveEnvironment();
-        CocoonComponentManager.endProcessing(m_env, m_key);
-        if (m_manager != null) {
-            m_manager.release(m_processor);
-        }
-    }
-
-}
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.components.cron;
+
+import java.net.MalformedURLException;
+
+import org.apache.avalon.framework.component.WrapperComponentManager;
+import org.apache.avalon.framework.context.ContextException;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.cocoon.Constants;
+import org.apache.cocoon.Processor;
+import org.apache.cocoon.components.CocoonComponentManager;
+import org.apache.cocoon.environment.background.BackgroundEnvironment;
+import org.quartz.JobDataMap;
+import org.quartz.JobExecutionException;
+
+/**
+ * This component is resposible to launch a {@link CronJob}s in a Quart Scheduler.
+ *
+ * @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
+ * @version CVS $Id$
+ *
+ * @since 2.1.1
+ */
+public class CocoonQuartzJobExecutor extends QuartzJobExecutor {
+
+    private Object m_key;
+    private BackgroundEnvironment m_env;
+    private Processor m_processor;
+
+    protected void setup(JobDataMap data) throws JobExecutionException {
+        super.setup(data);
+        org.apache.cocoon.environment.Context envContext;
+        try {
+            envContext =
+                (org.apache.cocoon.environment.Context) m_context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT);
+        } catch (ContextException e) {
+        	throw new JobExecutionException(e);
+        }
+        
+        try {
+            m_env = new BackgroundEnvironment(m_logger, envContext);
+        } catch (MalformedURLException e) {
+            // Unlikely to happen
+            throw new JobExecutionException(e);
+        }
+
+        try {
+            m_processor = (Processor) m_manager.lookup(Processor.ROLE);
+        } catch (ServiceException e) {
+            throw new JobExecutionException(e);
+        }
+
+        m_key = CocoonComponentManager.startProcessing(m_env);
+        CocoonComponentManager.enterEnvironment(m_env, new WrapperComponentManager(m_manager),
m_processor);
+    }
+
+    protected void release(JobDataMap data) {
+        super.release(data);
+        CocoonComponentManager.leaveEnvironment();
+        CocoonComponentManager.endProcessing(m_env, m_key);
+        if (m_manager != null) {
+            m_manager.release(m_processor);
+        }
+    }
+
+}

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/cron/java/org/apache/cocoon/components/cron/CocoonQuartzJobScheduler.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/cron/java/org/apache/cocoon/components/cron/CocoonQuartzJobScheduler.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/cron/java/org/apache/cocoon/components/cron/CocoonQuartzJobScheduler.java
Tue Oct 12 08:50:03 2004
@@ -1,37 +1,37 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.cocoon.components.cron;
-
-import org.quartz.Job;
-import org.quartz.JobDataMap;
-import org.quartz.JobDetail;
-
-/**
- * QuartzJobScheduler that runs jobs within a Cocoon Environment.
- */
-public class CocoonQuartzJobScheduler extends QuartzJobScheduler {
-
-    protected JobDetail createJobDetail(String name, JobDataMap jobDataMap) {
-        JobDetail detail = new JobDetail(name, DEFAULT_QUARTZ_JOB_GROUP, CocoonQuartzJobExecutor.class);
-        detail.setJobDataMap(jobDataMap);
-        return detail;
-    }
-
-    protected Job createJobExecutor() {
-        return new CocoonQuartzJobExecutor();
-    }
-
-}
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.components.cron;
+
+import org.quartz.Job;
+import org.quartz.JobDataMap;
+import org.quartz.JobDetail;
+
+/**
+ * QuartzJobScheduler that runs jobs within a Cocoon Environment.
+ */
+public class CocoonQuartzJobScheduler extends QuartzJobScheduler {
+
+    protected JobDetail createJobDetail(String name, JobDataMap jobDataMap) {
+        JobDetail detail = new JobDetail(name, DEFAULT_QUARTZ_JOB_GROUP, CocoonQuartzJobExecutor.class);
+        detail.setJobDataMap(jobDataMap);
+        return detail;
+    }
+
+    protected Job createJobExecutor() {
+        return new CocoonQuartzJobExecutor();
+    }
+
+}

Mime
View raw message