quartz-1.8.6 数据持久化说明

相关数据表:
quartz-all-1.8.6.jar 包中的 quartz-1.8.6\docs\dbTables\ tables_oracle.sql
相关包如下
1、 com.springsource.commonj-sources-1.1.0.jar
是源码只能利用解压后放到项目中相关类如下

quartz-1.8.6 数据持久化说明_第1张图片
 
2、 apache-velocity-velocity-1.5.jar,jasperreports-4.0.1.zip(压缩包下的jasperreports-4.0.1.jar)
这两个包与spring-context-support-3.1.4.RELEASE.jar 有关联,经比对源码,无以上jar包,相关类报错。
   加上以上两包为好

3application-jobconfig.xml配置如下

 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
 xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
 xmlns:context="http://www.springframework.org/schema/context" xmlns:cache="http://www.springframework.org/schema/cache"
 xmlns:task="http://www.springframework.org/schema/task"
 xmlns:p="http://www.springframework.org/schema/p"
 xsi:schemaLocation="
  http://www.springframework.org/schema/task
     http://www.springframework.org/schema/task/spring-task.xsd
     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
     http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
     http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
     http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
     http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-3.1.xsd
     ">

 
  
     
     
  

  
   
   
  

  
  
       
             
                 
                     
                schedulerContextAsMap     
                    
           
     
       
  
       
       
       
       
       
       
       
         
              
         

       

   

 


4quartz.properties配置如下


#============================================================================
# Configure Main Scheduler Properties
#============================================================================
org.quartz.scheduler.instanceName = DefaultQuartzScheduler
org.quartz.scheduler.rmi.export = false
org.quartz.scheduler.rmi.proxy = false
org.quartz.scheduler.wrapJobExecutionInUserTransaction = false

#============================================================================
# Configure ThreadPool   配置数据库连接池
#============================================================================
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool 
org.quartz.threadPool.threadCount = 10
org.quartz.threadPool.threadPriority = 5
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true

#============================================================================
# Configure JobStore  配置做业存储方式
#============================================================================
#相当于扫描频率,如果系统基于秒级,应培植成1000,quartz默认为分级(60000-分钟级别)
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.HSQLDBDelegate
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate  
#org.quartz.jobStore.useProperties = true
org.quartz.jobStore.tablePrefix = QRTZ_ 
org.quartz.jobStore.isClustered = false 
org.quartz.jobStore.maxMisfiresToHandleAtATime=1

#org.quartz.jobStore.dataSource = myOracle
#org.quartz.dataSource.myOracle.driver =oracle.jdbc.driver.OracleDriver
#org.quartz.dataSource.myOracle.URL =jdbc:oracle:thin:@***.***.***.***:orcl
#org.quartz.dataSource.myOracle.user =****
#org.quartz.dataSource.myOracle.password =****
#org.quartz.dataSource.myOracle.maxConnections =5



5、类如下QuartzJobBean 子类案例

quartz-1.8.6 数据持久化说明_第2张图片


你可能感兴趣的:(java)