I am trying use quarts shceduler using Method invocation but once it loads all the beans in below xml, it does not trigger the job. I get following msg
when i load the xml in weblogic. any help will be appreciated....
[INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean 'jmsconnectionFactory'
[INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean 'destination'
[INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean 'PDInvoker'
[INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean 'TRInvoker'
IN TRINVOKER.setConnectionFactory() METHOD
IN TRINVOKER.setQueue() METHOD
[INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean 'PDJobDetail'
[INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean 'TRJobDetail'
[INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean 'UsCorpWorkerShceduler'
[INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean 'UsCorpReminderScheduler'
[INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean 'scheduler'
[INFO] SimpleThreadPool - -Job execution threads will use class loader of thread: main
[INFO] RAMJobStore - -RAMJobStore initialized.
[INFO] StdSchedulerFactory - -Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
[INFO] StdSchedulerFactory - -Quartz scheduler version: 1.4.5
[INFO] SchedulerFactoryBean - -Starting Quartz scheduler now
[INFO] QuartzScheduler - -Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
XML File:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING/DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="jmsconnectionFactory" class="org.springframework.jndi.JndiObjectFactoryB ean">
<property name="jndiName"><value>myConnectionFactory</value></property>
<property name="jndiEnvironment">
<props>
<prop key="java.naming.factory.initial">weblogic.jndi.WL InitialContextFactory</prop>
<prop key="java.naming.provider.url">t3://gfidev2d.nam.nsroot.net:7001</prop>
</props>
</property>
</bean>
<bean id="destination" class="org.springframework.jndi.JndiObjectFactoryB ean">
<property name="jndiName"><value>myqueue</value></property>
<property name="jndiEnvironment">
<props>
<prop key="java.naming.factory.initial">weblogic.jndi.WL InitialContextFactory</prop>
<prop key="java.naming.provider.url">t3://gfidev2d.nam.nsroot.net:7001</prop>
</props>
</property>
</bean>
<bean id="PDInvoker" class="com.citigroup.gfitech.ipix.traderrouter.ser vice.PDInvoker">
<property name="connectionFactory"><ref bean="jmsconnectionFactory"/></property>
<property name="queue"><ref bean="destination"/></property>
</bean>
<bean id="TRInvoker" class="com.citigroup.gfitech.ipix.traderrouter.ser vice.TRInvoker">
<property name="connectionFactory"><ref bean="jmsconnectionFactory"/></property>
<property name="queue"><ref bean="destination"/></property>
</bean>
<bean id="PDJobDetail" class="org.springframework.scheduling.quartz.Metho dInvokingJobDetailFactoryBean">
<property name="targetObject"><ref bean="PDInvoker"/></property>
<property name="targetMethod"><value>execute</value></property>
</bean>
<bean id="TRJobDetail" class="org.springframework.scheduling.quartz.Metho dInvokingJobDetailFactoryBean">
<property name="targetObject"><ref bean="TRInvoker"/></property>
<property name="targetMethod"><value>execute</value></property>
</bean>
<bean id="UsCorpWorkerShceduler" class="org.springframework.scheduling.quartz.CronT riggerBean">
<property name="jobDetail"><ref bean="PDJobDetail"/></property>
<property name="cronExpression"><value>0 0 11,16 ? * 1-5</value></property>
</bean>
<bean id="UsCorpReminderScheduler" class="org.springframework.scheduling.quartz.CronT riggerBean">
<property name="jobDetail"><ref bean="TRJobDetail"/></property>
<property name="cronExpression"><value>0 9,19,29,39,49,59 11-18 ? * 1-5</value></property>
</bean>
<bean id="scheduler" class="org.springframework.scheduling.quartz.Sched ulerFactoryBean">
<property name="triggers">
<list>
<ref local ="UsCorpReminderScheduler"/>
<ref local ="UsCorpWorkerShceduler"/>
</list>
</property>
</bean>
</beans>
-Kuns


Reply With Quote