Commits

wkratzer  committed 6b8d46d

Submitted by: Bill Kratzer (wkratzer@dev.java.net)

Adding scripts for example 11.

git-svn-id: http://svn.opensymphony.com/svn/quartz/trunk@3969f7d36a-ea1c-0410-88ea-9fd03e4c9665

  • Participants
  • Parent commits 0309fad

Comments (0)

Files changed (4)

File quartz_1x/examples/example11/example11.bat

+@echo off
+
+rem Set Quartz to the base directory of the Quartz Distribution
+@SET QUARTZ=..\..
+
+rem !!!!!!! Please read important information. !!!!!!
+rem If "java" is not in your path, please set the path 
+rem for Java 2 Runtime Environment in the path variable below
+rem for example :
+rem @SET PATH=D:\jdk1.3.1;%PATH%
+rem 
+
+@SET QUARTZ_CP=%QUARTZ%\lib\commons-beanutils.jar;%QUARTZ%\lib\commons-collections.jar;%QUARTZ%\lib\commons-digester.jar;%QUARTZ%\lib\commons-logging.jar;%QUARTZ%\lib\commons-dbcp-1.1.jar;%QUARTZ%\lib\commons-pool-1.1.jar;%QUARTZ%\lib\log4j-1.2.8.djar;%QUARTZ%\lib\jdbc2_0-stdext.jar;%QUARTZ%\lib\quartz.jar;%QUARTZ%\lib\examples.jar
+
+rem Set LOG4J props if you are interested in setting up
+rem a configuraiton file for log4j logging
+rem @SET LOG4J_PROPS="-Dlog4j.configuration=log4j.properties"
+
+rem Set the location and name of the quartz.properties file
+@SET QUARTZ_PROPS="-Dorg.quartz.properties=quartz.properties"
+"java" -cp "%QUARTZ_CP%" %QUARTZ_PROPS% %LOG4J_PROPS% org.quartz.examples.example11.LoadExample 500

File quartz_1x/examples/example11/example11.sh

+#!/bin/sh
+
+# You May Need To Change this to your Quartz installation root
+QUARTZ=../..
+
+# Change this to your JDK installation root
+#
+#JAVA_HOME=/usr/java/j2sdk1.4.0_01
+
+JRE=$JAVA_HOME/jre
+JAVA=$JRE/bin/java
+
+QUARTZ_CP=""
+for jarfile in $QUARTZ/lib/*.jar; do
+  QUARTZ_CP=$QUARTZ_CP:$jarfile
+done
+
+echo "Classpath: " $QUARTZ_CP
+
+# Uncomment the following line if you would like to set log4j 
+# logging properties
+#
+#LOGGING_PROPS="-Dlog4j.configuration=log4j.properties"
+
+# Set the name and location of the quartz.properties file
+QUARTZ_PROPS="-Dorg.quartz.properties=quartz.properties"
+
+$JAVA -classpath $QUARTZ_CP $QUARTZ_PROPS $LOGGING_PROPS org.quartz.examples.example11.LoadExample 500
+

File quartz_1x/examples/example11/quartz.properties

+
+#============================================================================
+# Configure Main Scheduler Properties  
+#============================================================================
+
+org.quartz.scheduler.instanceName = TestScheduler
+org.quartz.scheduler.instanceId = AUTO
+
+#============================================================================
+# Configure ThreadPool  
+#============================================================================
+
+org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
+org.quartz.threadPool.threadCount = 12
+org.quartz.threadPool.threadPriority = 5
+
+#============================================================================
+# Configure JobStore  
+#============================================================================
+
+org.quartz.jobStore.misfireThreshold = 60000
+
+org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
+
+#org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
+#org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
+#org.quartz.jobStore.useProperties = false
+#org.quartz.jobStore.dataSource = myDS
+#org.quartz.jobStore.tablePrefix = QRTZ_
+#org.quartz.jobStore.isClustered = false
+
+#============================================================================
+# Configure Datasources  
+#============================================================================
+
+#org.quartz.dataSource.myDS.driver = org.postgresql.Driver
+#org.quartz.dataSource.myDS.URL = jdbc:postgresql://localhost/dev
+#org.quartz.dataSource.myDS.user = jhouse
+#org.quartz.dataSource.myDS.password = 
+#org.quartz.dataSource.myDS.maxConnections = 5
+

File quartz_1x/examples/example11/readme.txt

+Example 11
+==========
+
+Overview:
+=========
+This example demonstrates how Quartz can handle a large
+number of jobs.   This example starts with 500 jobs.  However, 
+this number can be changed by modifying the start scripts.  
+
+Due to the size of the thread pool (this example uses as thread
+count of 12), only 12 threads will run concurrently in the 
+scheduler.   
+
+You can change this paramaeter in the quartz.properties file.
+
+
+Running the Example:
+====================
+1. Windows users - Modify the example11.bat file (if necessary) 
+to set your JAVA_HOME.  Run example11.bat
+
+2. UNIX/Linux users - Modify the example11.sh file (if necessary)
+to set your JAVA_HOME.  Execute example11.sh
+
+
+Configuration:
+==============
+1.  You can decide to specify a log4j.properties file to
+control logging output (optional)
+
+2.  This example uses the quartz.properties file to 
+configure quartz.   Modify the "threadCount" property to 
+control how many threads are in the Quartz thread pool 
+(this limits the number of jobs that can execute at the 
+same time)
+
+3.  You can also modify the number of jobs that are run
+in this example.  Simply edit the script and pass in a valid
+number into the program.