You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2010/06/24 07:22:50 UTC
svn commit: r957424 - in /camel/trunk/components/camel-quartz/src:
main/java/org/apache/camel/component/quartz/QuartzComponent.java
test/resources/org/apache/camel/component/quartz/myquartz.properties
Author: davsclaus
Date: Thu Jun 24 05:22:49 2010
New Revision: 957424
URL: http://svn.apache.org/viewvc?rev=957424&view=rev
Log:
CAMEL-2844: Added options on quartz component to specify a custom quartz.properties to be used.
Modified:
camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
camel/trunk/components/camel-quartz/src/test/resources/org/apache/camel/component/quartz/myquartz.properties
Modified: camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java?rev=957424&r1=957423&r2=957424&view=diff
==============================================================================
--- camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java (original)
+++ camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java Thu Jun 24 05:22:49 2010
@@ -223,7 +223,9 @@ public class QuartzComponent extends Def
protected Properties loadProperties() throws SchedulerException {
Properties answer = getProperties();
if (answer == null && getPropertiesFile() != null) {
- LOG.info("Loading Quartz properties file from classpath: " + getPropertiesFile());
+ if (LOG.isInfoEnabled()) {
+ LOG.info("Loading Quartz properties file from classpath: " + getPropertiesFile());
+ }
InputStream is = getCamelContext().getClassResolver().loadResourceAsStream(getPropertiesFile());
if (is == null) {
throw new SchedulerException("Quartz properties file not found in classpath: " + getPropertiesFile());
@@ -232,7 +234,7 @@ public class QuartzComponent extends Def
try {
answer.load(is);
} catch (IOException e) {
- throw new SchedulerException("Error loading Quartz properties file from: " + getPropertiesFile(), e);
+ throw new SchedulerException("Error loading Quartz properties file from classpath: " + getPropertiesFile(), e);
}
}
return answer;
@@ -241,6 +243,9 @@ public class QuartzComponent extends Def
protected SchedulerFactory createSchedulerFactory() throws SchedulerException {
Properties prop = loadProperties();
if (prop != null) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Creating SchedulerFactory with properties: " + prop);
+ }
return new StdSchedulerFactory(prop);
} else {
return new StdSchedulerFactory();
Modified: camel/trunk/components/camel-quartz/src/test/resources/org/apache/camel/component/quartz/myquartz.properties
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/test/resources/org/apache/camel/component/quartz/myquartz.properties?rev=957424&r1=957423&r2=957424&view=diff
==============================================================================
--- camel/trunk/components/camel-quartz/src/test/resources/org/apache/camel/component/quartz/myquartz.properties (original)
+++ camel/trunk/components/camel-quartz/src/test/resources/org/apache/camel/component/quartz/myquartz.properties Thu Jun 24 05:22:49 2010
@@ -1,3 +1,20 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+## ------------------------------------------------------------------------
+
org.quartz.scheduler.instanceName = MyScheduler
org.quartz.scheduler.instanceId = 2
org.quartz.scheduler.rmi.export = false