4 Replies Latest reply on Aug 21, 2009 9:59 PM by oyesiji77

    Asynchronous method executes without invocation

    oyesiji77

      I configured quartz for my application and I have the following class





      @Name("indexer")
      @Scope(ScopeType.APPLICATION)
      public class Indexer {
           @Asynchronous 
           @Transactional
           public QuartzTriggerHandle startIndex(@Expiration Date when,@IntervalDuration long interval){
                System.out.println(">>>>>>>>><<<<Executed");
                return null;
           }





      But i am surprised that without my invoking the method startIndex. The Method starts on its one and continues printing out

      >>>>Executed

        • 1. Re: Asynchronous method executes without invocation
          kapitanpetko

          Are you using a database job store? If so, you might have jobs registered in a previous deployment. If not, hm, are you sure no other class
          references your Indexer?

          • 2. Re: Asynchronous method executes without invocation
            oyesiji77

            Nope No other class references Indexer. And i am currently not using a DataStore


            This is a copy of my quartz Properties



            #==============================================================
            # Configure Main Scheduler Properties
            #==============================================================
            
            org.quartz.scheduler.instanceName Sched1
            org.quartz.scheduler.instanceId 1
            org.quartz.scheduler.rmi.export false
            org.quartz.scheduler.rmi.proxy false
            
            #==============================================================
            # Configure ThreadPool
            #==============================================================
            
            org.quartz.threadPool.class org.quartz.simpl.SimpleThreadPool
            org.quartz.threadPool.threadCount 3
            
            #==============================================================
            # Configure JobStore
            #==============================================================
            
            org.quartz.jobStore.misfireThreshold 60000
            org.quartz.jobStore.class org.quartz.simpl.RAMJobStore
            



            • 3. Re: Asynchronous method executes without invocation
              kapitanpetko

              Looks OK to me. But strange indeed... Could you show your components.xml as well?
              When is the method executed (on startup, periodically, etc.)?
              You could use a startup component to list the jobs scheduled in Quartz on startup
              and if there are none, set breakpoints in QuartzDispatcher to see when the job gets scheduled.


              HTH


              • 4. Re: Asynchronous method executes without invocation
                oyesiji77

                Thanks everyone for the reply. Surprisingly its working perfectly now


                Thanks