Thursday, December 16, 2010

CommonJ timer with OSB, SOA Suite, SOA Scheduler

an excellent document on SOA Scheduler here:

I have tested it and it works beautifully! You can specify the cron parameters in a single place. Of course it can be improved but it's a good starting point.
Here the code (I hope Robert Baumgartner doesn't mind).
I feel it would be better to have the Scheduler post an EDN event using
oracle.integration.platform.blocks.event.SendEvent and wake up a Mediator instance,
rather than synchronously invoke the WS to trigger the BPEL process.

This SendEvent class is in C:\Oracle1\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar
Unfortunately it looks like the only way to use it is by invoking its main(...) procedure after having set the System properties with: dbconn,dbuser, dbpass, eventName, eventBody,event parameters. Internally it uses a SAQRemoteBusinessEventConnectionFactory and a BusinessEventBuilder. All this make it a bit complicated to generate events programmatically.

here is CommonJ doc: with coverage of "cluster-wide" timers.

Here the excellent tutorial by James Bayer:

and more here:

and a very nice tutorial on CommonJ TimerManager here

here the code

Other alternatives:

EJB 3.0 Timer:

more specifically in a cluster:

I really feel a pain comparing the SOA Suite support for scheduling with the one offered by Apache Camel:

(17-Jan-2011) I discover there is a PICK activity in BPEL allowing you to schedule a BPEL process at given interval. This is most likely the simplest solution:

1 comment:

Matt said...

Rubicon Red provide an out of the box scheduler for the Oracle SOA Suite, enabling you to schedule:

- Execution of a synchronous web service
- Execution of one way or two way asynchronous web service
- Publication of an EDN event to the SOA Suite Event Delivery Network

See for further details