Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2012 The Kuali Foundation Licensed under the Educational Community 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 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.kuali.rice.ksb.messaging.quartz;
A factory bean which reads quartz-related properties from the Config system and generates a Properites instance for use when configuration quartz.

Kuali Rice Team (
    private static final String QUARTZ_PREFIX = "";
    private static final String QUARTZ_IS_CLUSTERED =  + ".jobStore.isClustered";
    private static final String QUARTZ_TABLE_PREFIX =  + ".jobStore.tablePrefix";
    protected Object createInstance() throws Exception {
	Properties properties = new Properties();
	Properties configProps = ConfigContext.getCurrentContextConfig().getProperties();
	boolean useQuartzDatabase = Boolean.valueOf(ConfigContext.getCurrentContextConfig().getProperty(..));
	for (Object keyObj : configProps.keySet()) {
	    if (keyObj instanceof String) {
	    	String key = (String)keyObj;
	    	if (key.startsWith() && !propertyShouldBeFiltered(useQuartzDatabasekey)) {
	    		properties.put(key.substring(4), configProps.get(key));
	return properties;
When we aren't using the quartz database, prevents some of the parameters for quartz database mode from being passed to quartz. If we pass these to quartz when it's using a RAMJobStore, we get an error. So in order to allow us to provide good defaults in common-config-defaults.xml, we will filter these out if useQuartzDatabase=false
    protected boolean propertyShouldBeFiltered(boolean useQuartzDatabaseString propertyName) {
    	if (!useQuartzDatabase) {
    		if (propertyName.startsWith() || propertyName.startsWith()) {
    			return true;
    	return false;
    public Class getObjectType() {
	return Properties.class;
New to GrepCode? Check out our FAQ X