1 Reply Latest reply on Feb 11, 2010 9:28 AM by Arnie Morein

    scheduled-listener - invoked how many times?

    Arnie Morein Newbie

      I have an ESB project with two message composer classes that are each invoked from their own CRON schedules (see below).

       

      I've read the manuals multiple times and no where was it stated how many times per schedule would the event-processor be called - so I assume the answer is ONCE.

       

      Yet, my composMessage class is being called MANY times in a row - because the breakpoint keeps stopping it.

       

      I have these schedules set to every 5 and 15 minutes. It does take 5 and 15 minutes for them to first be invoked...but they are invoked over and over and over again.

       

      What gives?

       

      <?xml version="1.0" encoding="utf-8"?>
      <jbossesb parameterReloadSecs="5" xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
          <providers>
              <schedule-provider name="PiaPasScheduleProvider">
                  <cron-schedule scheduleid="piaPas-trigger" cronExpression="* */5 * * * ?" />
                  <cron-schedule scheduleid="piaPasDLQ-trigger" cronExpression="* */15 * * * ?" />
              </schedule-provider>

       

              <jms-provider name="PiaPasJmsProvider" connection-factory="ConnectionFactory">
             
                  <jms-bus busid="PiaPasJmsTransferBus">
                      <jms-message-filter dest-type="QUEUE" dest-name="queue/piaPas_transfer" selector="serviceName='PasTransfer'" />
                  </jms-bus>
                 
                  <jms-bus busid="PiaPasJmsEmailBus">
                      <jms-message-filter dest-type="QUEUE" dest-name="queue/piaPas_emailer" selector="serviceName='PasEmailer'" />
                  </jms-bus>
                 
              </jms-provider>
          </providers>
         
          <services>
              <service category="PiaXfer" name="PasDispatch" description="PIA-PAS to CPD dispatcher">
                  <listeners>
                      <scheduled-listener name="piaPas-cron" scheduleidref="piaPas-trigger"
                          event-processor="us.tx.state.oag.esb.pia.pas.CheckForNewRecords"
                          is-gateway="false" transacted="true" maxThreads="1" />
                  </listeners>
                  <actions mep="OneWay">
                      <action name="action" class="us.tx.state.oag.esb.Emailer" />
                  </actions>
              </service>
             
              <service category="PiaXfer" name="PasTransfer" description="PIA-PAS to CPD data mover">
                  <listeners>
                      <jms-listener name="piaPas-transfer-listener" busidref="PiaPasJmsTransferBus"
                          is-gateway="false" maxThreads="1" />
                  </listeners>
                  <actions mep="OneWay">
                      <action name="moveContact" class="us.tx.state.oag.esb.pia.pas.MessageMoveContact" />
                  </actions>
              </service>
             
              <service category="PiaXfer" name="PasEmailer"  description="sends out emails">
                  <listeners>
                      <jms-listener name="piaPas-transfer-listener" busidref="PiaPasJmsEmailBus"
                          is-gateway="false" maxThreads="1" />
                  </listeners>
                  <actions mep="OneWay">
                      <action name="action" class="us.tx.state.oag.esb.Emailer" />
                  </actions>
              </service>
             
              <service category="PiaXfer" name="PasDlqMonitor" description="logs info on DLQ messages to the console">
                  <listeners>
                      <scheduled-listener name="piaPas-cron" scheduleidref="piaPasDLQ-trigger"
                          event-processor="us.tx.state.oag.esb.pia.pas.CheckForDlqRecords" is-gateway="false"
                          maxThreads="1" />
                  </listeners>
                  <actions mep="OneWay">
                      <action name="NoOp" class="us.tx.state.oag.esb.NoOp" />
                  </actions>
              </service>
             
          </services>
         
      </jbossesb>