Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
xml
<composite ....>
    <component name="Timer">
      <f3:implementation.timer class="..." repeatInterval="10000"/>
      <producer name="channel" target="SomeChannel"/>
   </component>
</composite>

Further, to limit timed events to a highly-available single source in a clustered zone (i.e. a clustered singleton), mark the implementation with @Scope("DOMAIN"):

Code Block
java
java

@Scope("DOMAIN")
public class SomeTime implements Runnable&nbsp;{

   @Producer
   protected Channel channel;

   public void run() {
      Event event = ...
      channel.publish(event);
   }
}