Hello
I am having an issue with saving Quartz jobs to MYSQL with quartz 2.1.3 and spring 3.1.1.
I have a simple Quartz job and trigger defined in my spring file (config file is attached below). After my server (tomcat) starts up, I don't see the job and trigger in QUARTZ tables. In MYSQL log, I am seeing a rollback being sent right after the INSERT sql for QUARTZ tables. After some debugging, it looks like the rollback is sent by closeConnection in LocalDataSourceJobStore class. I have tried various configuration changes and just not able to change this behavior. Why does it not commit the changes?
The followings are my config info. Thanks in advance.
Code:<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">...</bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">...</bean> <bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="startupDelay" value="15" /> <property name="applicationContextSchedulerContextKey" value="applicationContext" /> <property name="schedulerName" value="myschedule" /> <property name="jobFactory" ref="springBeanJobFactory" /> <property name="dataSource" ref="dataSource" /> <property name="triggers"> <list> <ref bean="dummyTrigger" /> </list> </property> <property name="quartzProperties"> <props> <prop key="org.quartz.scheduler.instanceId">AUTO</prop> <prop key="org.quartz.jobStore.driverDelegateClass">org.quartz.impl.jdbcjobstore.StdJDBCDelegate</prop> </props> </property> </bean> <bean id="testMail" class="org.springframework.scheduling.quartz.JobDetailFactoryBean"> <property name="jobClass"> <value>com.mycompany.testMailClass</value> </property> <property name="name"><value>mail</value></property> <property name="group"><value>test</value></property> </bean> <bean id="dummyTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"> <property name="jobDetail"> <ref bean="testMail"/> </property> <property name="startDelay"> <value>20000</value> </property> <property name="repeatInterval"> <value>100</value> </property> <property name="name"><value>trigger</value></property> <property name="group"><value>test</value></property> </bean>


Reply With Quote