首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

疑问:Spring配置Quartz例子出错,请看上.多谢

2012-11-08 
疑问:Spring配置Quartz例子出错,请看下.谢谢研究了一天,在官方论坛也查询了很多,就是锁定不了原因。请各位

疑问:Spring配置Quartz例子出错,请看下.谢谢
研究了一天,在官方论坛也查询了很多,就是锁定不了原因。请各位朋友帮忙看看
spring的配置如下:

   </bean>  

你没定义 id=EmailJobBean   为什么这句不报错呢   </bean> 

你没定义 id=EmailJobBean   为什么这句不报错呢

赫赫 ,这个地方就是那个jobClass的值 就是一个类的完整名称,
我这个类没有包名,所以直接就是这么写的。</list>
</property>
<property name="quartzProperties">
<props>
<prop key="org.quartz.jobStore.class">
org.quartz.simpl.RAMJobStore
</prop>
</props>
</property>
</bean></list>
</property>
<property name="quartzProperties">
<props>
<prop key="org.quartz.jobStore.class">
org.quartz.simpl.RAMJobStore
</prop>
</props>
</property>
</bean>
autowire真是一个万恶的家伙, 这个问题整了我一个下午,怒了.
设置org.quartz.jobStore.class为org.quartz.simpl.RAMJobStore也是没有用的.
因为

A Spring-specific subclass of Quartz' JobStoreCMT will be used. It is therefore strongly recommended to perform all operations on the Scheduler within Spring-managed (or plain JTA) transactions. Else, database locking will not properly work and might even break (e.g. if trying to obtain a lock on Oracle without a transaction).

Supports both transactional and non-transactional DataSource access. With a non-XA DataSource and local Spring transactions, a single DataSource argument is sufficient. In case of an XA DataSource and global JTA transactions, SchedulerFactoryBean's "nonTransactionalDataSource" property should be set, passing in a non-XA DataSource that will not participate in global transactions.

See Also:
setNonTransactionalDataSource
setQuartzProperties
setTransactionManager
LocalDataSourceJobStore

热点排行