2008-11-11 06:54:09 +07:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!-- $Id: scheduler-service.xml 59789 2007-01-18 17:30:15Z dimitris@jboss.org $ -->
|
|
|
|
|
|
|
|
<server>
|
|
|
|
|
|
|
|
<!-- ==================================================================== -->
|
|
|
|
<!-- Scheduler Service -->
|
|
|
|
<!-- ==================================================================== -->
|
|
|
|
|
|
|
|
<!--
|
|
|
|
| JDK5 javax.management.timer.Timer appears to be using a single
|
|
|
|
| threaded implementation for executing scheduled tasks.
|
|
|
|
| If you want to revert to the JBossMX timer implementation that
|
|
|
|
| uses a dynamically extensible thread pool to execute scheduled
|
|
|
|
| tasks, uncomment the JBossTimer service below. The Scheduler
|
|
|
|
| service will use this, instead of creating a new Timer.
|
|
|
|
|
|
|
|
<mbean code="org.jboss.mx.timer.JBossTimer"
|
|
|
|
name="jboss:service=Timer">
|
|
|
|
</mbean>
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!--
|
|
|
|
| This example shows how to use a pluggable Schedulable impl
|
|
|
|
|
|
|
|
<mbean code="org.jboss.varia.scheduler.Scheduler"
|
|
|
|
name=":service=Scheduler">
|
|
|
|
<attribute name="StartAtStartup">true</attribute>
|
|
|
|
<attribute name="SchedulableClass">org.jboss.varia.scheduler.example.SchedulableExample</attribute>
|
|
|
|
<attribute name="SchedulableArguments">Schedulabe Test,12345</attribute>
|
|
|
|
<attribute name="SchedulableArgumentTypes">java.lang.String,int</attribute>
|
|
|
|
<attribute name="InitialStartDate">0</attribute>
|
|
|
|
<attribute name="SchedulePeriod">10000</attribute>
|
|
|
|
<attribute name="InitialRepetitions">-1</attribute>
|
|
|
|
<attribute name="FixedRate">true</attribute>
|
|
|
|
</mbean>
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!--
|
|
|
|
| NOTE: If a Timer service is not already running, the scheduler will create
|
|
|
|
| one with a default object name of jboss:service=Timer. This will not be
|
|
|
|
| redeployed upon redeploying your scheduler. To change the object name
|
|
|
|
| for the Timer service to be created, declare an attribute named TimerName.
|
|
|
|
| For more info on scheduler, see http://www.jboss.org/wiki/Wiki.jsp?page=Scheduler.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!--
|
|
|
|
| This example shows how to use a target MBean
|
|
|
|
|
|
|
|
<mbean code="org.jboss.varia.scheduler.example.SchedulableMBeanExample"
|
|
|
|
name=":name=SchedulableMBeanExample">
|
|
|
|
</mbean>
|
|
|
|
<mbean code="org.jboss.varia.scheduler.Scheduler"
|
|
|
|
name=":service=Scheduler,name=SchedulableMBeanExample">
|
|
|
|
<attribute name="StartAtStartup">true</attribute>
|
|
|
|
<attribute name="SchedulableMBean">:name=SchedulableMBeanExample</attribute>
|
|
|
|
<attribute name="SchedulableMBeanMethod">hit( NOTIFICATION, DATE, REPETITIONS, SCHEDULER_NAME, java.lang.String )</attribute>
|
|
|
|
<attribute name="InitialStartDate">NOW</attribute>
|
|
|
|
<attribute name="SchedulePeriod">10000</attribute>
|
|
|
|
<attribute name="InitialRepetitions">10</attribute>
|
|
|
|
<attribute name="FixedRate">true</attribute>
|
|
|
|
</mbean>
|
|
|
|
-->
|
|
|
|
|
|
|
|
</server>
|