Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Another way of doing this is to implement the org.jboss.soa.esb.schedule.ScheduledEventListener class.</p> <p>As such your jboss-esb.xml would look like so:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;jbossesb parameterReloadSecs="5" xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.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.3.0.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd"&gt; &lt;providers&gt; &lt;schedule-provider name="myDaemonProvider"&gt; &lt;cron-schedule cronExpression="0 */1 * * * ?" scheduleid="my-daemon-trigger"/&gt; &lt;/schedule-provider&gt; &lt;/providers&gt; &lt;services&gt; &lt;service category="Cron" description="My Cron Daemon" name="MyDaemon"&gt; &lt;listeners&gt; &lt;scheduled-listener event-processor="com.myCompany.esb.myDaemon.main.MyDaemonScheduledEventListener" name="my-daemon-listener" scheduleidref="my-daemon-trigger"/&gt; &lt;/listeners&gt; &lt;/service&gt; &lt;/services&gt; &lt;/jbossesb&gt; </code></pre> <p>And then your com.myCompany.esb.myDaemon.main.MyDaemonScheduledEventListener would look like:</p> <pre><code>package com.myCompany.esb.myDaemon.main; import org.jboss.soa.esb.ConfigurationException; import org.jboss.soa.esb.helpers.ConfigTree; import org.jboss.soa.esb.schedule.ScheduledEventListener; import org.jboss.soa.esb.schedule.SchedulingException; public class MyDaemonScheduledEventListener implements ScheduledEventListener { public void initialize(ConfigTree arg0) throws ConfigurationException { System.out.println("Initializing the Cron Daemon..."); } public void uninitialize() { System.out.println("Uninitializing the Cron Daemon..."); } public void onSchedule() throws SchedulingException { System.out.println("Scheduled Execution!"); } } </code></pre> <p>So when you deploy this, it will cause the onSchedule() to run every minute.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload