Aspects help to encapsulate cross-cutting expressions in one place. By applying an Advice, at various points in an application called Join-Points, Aspects can alter the behavior of the non-aspect parts of a software application.
The Java Business Integration (JBI) specification, JSR-208, provides a loosely coupled integration model for distributed services within a Service-Oriented Architecture (SOA). The architecture allows dynamic deployment of JBI components and JBI service assemblies that can be used as Aspect and Advice mechanisms to alter the behavior of other services. Once these Aspect and Advice mechanisms are "plugged" in on-the-fly between a Consuming Service and a Provisioning Service through a Service Facade, the architecture provides a mechanism to dynamically define, verify, audit, track, enable, and enforce these cross-cutting concerns.
Aspect-Oriented Programming for Composite Application Development:
Introducing Caching Advice between a Service Consumer and a Service Provider
The Caching Aspect provides caching services to a Service Oriented Architecture.
Queuing
Introducing Queueing Advice between a Service Consumer and a Service Provider
In a one-way web service request scenario, if the service provider is un-available, one can use a Queuing Aspect to queue the requests until the service provider becomes available again.
Auto Reconnect
Introducing Auto-Reconnect Advice between a Service Consumer and a Service Provider
In a one-way web service request scenario, if the service provider is un-available, one can use a Queuing Aspect to queue the requests until the service provider becomes available again.
However, in a request/reply scenario, if the service provider is unavailable, one has to block the sender until the response is received. The Auto-Reconnect Aspect would keep trying to make the call to the destination every configurable seconds for another configurable amount of time until the service provider becomes available again.
Tee
In some scenarios, you want to redirect the same message to two different components. The Tee Aspect introduces a T-juntion that facilitates message redirection to two different components at the same time in a Service Oriented Architecture.
It acts very much like the tee command in Unix where, for example, you may want to save the output of a command in a file, while at the same time see the results on the terminal as it is being produced. Then if you see that the output is in error, you can stop the command.
Operation of the Unix tee command
The tee command in Unix acts like a T-junction. For e.g., the Unix command
ls -al | tee folderdetails
shows all the details of the current folder on the terminal screen and also redirects the details to a file named folderdetails.
Throttling
Introducing Throttling Advice between a Service Consumer and a Service Provider
The Throttling Aspect provides throttling services to a Service Oriented Architecture.
Logging
Introducing Logging Advice between a Service Consumer and a Service Provider
The Logging Aspect provides logging services to a Service Oriented Architecture.
Message Tracking
Introducing Message Tracking Advice between a Service Consumer and a Service Provider
The Message Tracking Aspect tracks messages flowing through a Service Oriented Architecture.