Results 1 to 4 of 4

Thread: Quartz question

  1. #1
    Join Date
    Jul 2005
    Posts
    3

    Default Quartz question

    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

  2. #2
    Join Date
    Jul 2005
    Posts
    12

    Default

    Did you wait for the appropriate time to pass? Did you wait until 11:00 or 16:00, which is when one of the triggers will fire?

  3. #3
    Join Date
    Jul 2005
    Posts
    3

    Default

    Yes, I did..I launched the process at 11:30 and as per scheduler, TRInvoker should have fired up since it happens every 10 minutes after 11:00 am...


    -Kuns

  4. #4
    Join Date
    Jul 2005
    Posts
    3

    Default

    This works fine now...I saw the msgs from both the schedulers, just changed the order in the scheduler...

    Thanks,

    -Kunal

Similar Threads

  1. Migrating to new version of Quartz
    By ramkris in forum Container
    Replies: 4
    Last Post: Nov 15th, 2005, 02:51 AM
  2. Forgot password (e.g. secret question) using Acegi
    By lowerymb77 in forum Security
    Replies: 1
    Last Post: Oct 16th, 2005, 10:46 PM
  3. Spring + Quartz question
    By viniciuscarvalho in forum Container
    Replies: 2
    Last Post: Jun 2nd, 2005, 08:17 AM
  4. Quartz - Couldn't retrieve job
    By newreaders in forum Container
    Replies: 4
    Last Post: Jun 1st, 2005, 08:12 PM
  5. Replies: 2
    Last Post: Apr 19th, 2005, 09:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •