4 Replies Latest reply on Dec 2, 2009 6:45 AM by tomeicher

    ScheduledEventListener

    tomeicher

      Hello,

      can someone please drop me a note about the idea behind the
      ScheduledEventListener interface...?

      If I'm a ScheduledEventMessageComposer as a listener in a service, I'll
      create a message, that is then processed in the action pipeline, ok.

      But if I'm a ScheduledEventListener, I can not produce a message for the
      pipeline, processing takes place in the ScheduledEventListener.onSchedule().
      However, I'm still forced to put some action in the action pipeline, since the
      XSD enforces it. But I have no message to process.

      What is the idea (good or bad) behind that ? Shall I just put a "NOOPAction" ?

      My use case: I want to periodically do stuff, like, log queue statistics, so
      an action pipeline is not really involved...

      Thanks, Cheers, Tom.

        • 1. Re: ScheduledEventListener
          kconner

          You shouldn't need to specify the actions, can you show us your jboss-esb.xml?

          • 2. Re: ScheduledEventListener
            tomeicher

            Hi Kevin,

            well, looking at the jbossesb-1.1.0.xsd (also 1.0.1), everything in
            jbossesb/services/service/actions/action
            is "minOccurs 1", so I think a listener that does not produce a message
            doesn't make sense, does it ?

            <service category="XXJmsDefault"
             description="Monitor error queues"
             invmScope="GLOBAL" name="XXErrorMonitor">
             <listeners>
             <scheduled-listener name="altertingListenerPosLog" schedule-frequency="60"
             event-processor="xxx.AlertingListener">
             <property name="queueName" value="queue/XX_POS_LOG_ERROR"/>
             </scheduled-listener>
             </listeners>
             <actions>
             <!-- action is minOccurs=1 ... need to put a NOOP action here... -->
             <action class="xxx.NOOPAction" name="alertingNOOPAction"/>
             </actions>
            </service>
            


            Cheers, Tom.



            • 3. Re: ScheduledEventListener
              kconner

              Yes, but actions is minOccurs="0"

              <xsd:element maxOccurs="1" minOccurs="0" ref="jesb:actions" />
              


              The pipeline should only be instantiated if using ScheduledEventMessageComposer, in which case it will need actions.

              Kev

              • 4. Re: ScheduledEventListener
                tomeicher

                Ah, funny how one can check, and still not see the obvious...
                Sorry about that.
                Cheers, Tom.