Using Aspect Service Engine for Auto-Reconnect
By sujit on Apr 02, 2007
The Aspect Service Engine can be very useful to solve such problem. To know more about aspect oriented programming in JBI and Aspect Service Engine see the following links
In Short the Aspect Oriented programming in JBI tries to solve some of the cross-cutting concerns. Some examples of such cross-cutting concerns are throttling which throttles the number of message going through some subsystems, jbi component or to particular webservice, or caching which cross-cuts all cached objects, or alerting, or message tracking, or auto-reconnect, or queuing, et al. The cross-cutting concern which we are trying to show case is auto-reconnect.
The above diagram shows how we can inject or weave a Auto-Reconnect aspect in between the BPEL Service Engine and the external web service. The Auto-Reconnect aspect is responsible for doing a reconnect if the HelloService is down for some period of time. The number of times the Auto-Reconnect aspect is going to do a retry and the interval between each retry is configurable. Now what does this achieve?
The BPEL Service Engine or the consuming client now does not have to care about whether a particular service is down for a brief period of time. It does not have to put some business logic to handle such issues as this can taken care by injecting Auto-Reconnect aspect as we have seen in the above diagram.