Information Technology Reference
In-Depth Information
4.1 Advice Interface
An advice of a request/response aspect is referenced by its ID (element I of the
pointcut description). In our implementation, this ID represents the base name
of the Java class that actually implements the advice. A class representing an
advice has to implement a specific Java interface. Its methods are called by the
aspect framework when a join point shadow becomes a join point (i.e, a defined
join point is triggered) for the specific advice. The argument passed to these
two methods is resolved by the expression in the field element
(see pointcut
description) of the aspect. Their return values substitute the original value. If
a wildcard operator is in the field element
F
, multiple attributes match this
expression. Multiple attributes represent multiple fields in a complex data type.
The corresponding advice is applied iteratively to each of these attributes.
The concrete value of the scope of an aspect is either local or global with
respect to communication. The value local means that the join point of the
aspect respects the client, meaning that it is only active for the client that has
woven it in, whereas global indicates that an aspect is active for all clients.
The global scope implicates that no other service is affected by this aspect,
because the affection depends on the actual client in order to determine the
succeeding service. Since web services are loosely-coupled, such a succeeding
service cannot be identified in general. Advice must furthermore define whether
there is a subsequent service that is affected by this advice and to which an
aspect has to be applied. Furthermore, this value ( none , direct , dataflow ,or
controlflow ) controls how such a service is detected. For example, an aspect for
profiling the communication returns none , because there is no other partner. The
value direct might be used for reliable messaging since it affects both partners
that are communicating directly.
F
4.2 Aspect Configurator
The aspect configurator is responsible for validating and weaving aspects and is
realized as a dedicated web service. To decouple the aspect framework from the
conventional web services, the aspect configurator is implemented as a distinct
service, i.e. a remote interface for weaving aspects. It operates on a registry that
contains all necessary information about woven request/response aspects. Since
it is realized as a hashtable, the number of deployed aspects has only a marginal
impact on the overall aspect-weaving runtime.
4.3 Aspect Provider
The activation of (web service) join points is realized as an AspectJ aspect, the
Aspect Provider . It is woven into the global handler chain of Apache Axis. If
a web service is called or sends its response, the around advice is executed. It
checks the registry to find out whether a request/response aspect has been woven
into this concrete web service. If yes, the scope and the caller are identified, and
in case of a complete match, the advice of the request/response aspect gets
executed. For this purpose, the pointcut of the AspectJ aspect matches the
Search WWH ::




Custom Search