File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes Quartz Trigger Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Quartz Trigger Issue " Watch "Quartz Trigger Issue " New topic
Author

Quartz Trigger Issue

kalai sanju
Greenhorn

Joined: Jul 24, 2011
Posts: 1
Hi,

In our project we have implemented SimpleTrigger. And we have three job in the quratz.xml and the table mapping also done.

See the below sample code
<bean id="XXXJob" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass" value="com.quartz.job.GetRatesJob"/>
</bean>

<bean id="XXXSimpleTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail">
<ref bean="XXXJob"/>
</property>
<property name="repeatCount">
<value>0</value>
</property>
<property name="startDelay" value="10000"/>
<property name="repeatInterval">
<value>60000</value>
</property>
</bean>
The issue we are facing is the job is not triggered.Our requirtement is whenever we start the server the job should triggered

once.But this not happening and there is no errors in server logs.The server which we are using is WebSphere.Quartz version

is quartz-1.6.5.Th quartz.properties code is as below

#============================================================================

Configure Main Scheduler Properties
#============================================================================

org.quartz.scheduler.instanceName = MSG
org.quartz.scheduler.instanceId = AUTO

#============================================================================

Configure JobStore
#============================================================================

org.quartz.jobStore.misfireThreshold = 60000

org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
org.quartz.jobStore.useProperties = false
org.quartz.jobStore.tablePrefix = QRTZTT_

org.quartz.jobStore.isClustered = true
org.quartz.jobStore.clusterCheckinInterval = 10000

In application.context we have import the quartz configuartion.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jms="http://www.springframework.org/schema/jms"
xsi:schemaLocation="http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-2.5.xsd">

<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>classpath:WEB-INF/application.properties</value>
</property>
</bean>

<!-- Quartz Configuration -->
<import resource="QUARTZ.xml" />


In the web.xml


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp_ID">
<display-name>SGAPP</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
</web-app>

So the issue is job is not geting triggered.
joy b chakravarty
Ranch Hand

Joined: May 16, 2011
Posts: 62

I think you are missing

<bean id="commonScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"
lazy-init="false">
<property name="autoStartup" value="true"/>
<property name="waitForJobsToCompleteOnShutdown" value="true"/>
<property name="triggers">
<list>
<ref bean="XXXSimpleTrigger"/>
</list>
</property>
</bean>

hope this helps


Cheers, Joy [SCJP 1.4, SCBCD 5.0]
get high on alcohol, algorithm or both
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Quartz Trigger Issue