Information Technology Reference
In-Depth Information
Base Map
Base Map
WaitingList
makeReservation
start
WaitingList
makeReservation
start
Partner Hotel
A
s1
addToWaitingList
[fail]
addToWaitingList
P
[fail]
P
A
fail
fail
e1
[success]
Partner Hotel
[success]
n
success
success
o
p
Book with Partner Hotel Aspect
Book with Partner Hotel Aspect
Partner Hotel
Partner Hotel
WaitingList
start
start
s1
A
d
v
i
c
e
makeReservation
makeReservation
[false]
[false]
P
e1
success
success
[true]
[true]
b) Result of Step 3
P
o
i
n
t
c
u
t
WaitingList
addToWaitingList
a) Initial Mappings and Plug-in Bindings
Fig. 21. Composition with strong around advice
on the advice map, the algorithm also performs a scan of the advice map that
reveals the existence of a [false] branch leading directly to the pointcut stub.
This indicates a strong around advice. In step 3, the stubs without in-paths or
out-paths are used and additional start and end points have to be added for the
path segment between the two Partner Hotel stubs (s1 and e1 in the base map
of Fig. 21b.
Note that the replaced path between the Partner Hotel stubs in Fig. 21b can
optionally be deleted from the base map by the composition algorithm as the
path does not serve any purpose in the composed system anymore. It is also
possible to merge the two Partner Hotel stubs into one stub. This, however, can
only be done if the stubs are on the same map. The example in Fig. 21 shows
the general case where the two stubs couldbeondifferentmapsandmergingis
not possible.
Besides illustrating around advice, this example also shows that aspects can
be defined on other aspects because the base map in Fig. 20 is an advice map
and is only a base map relative to the topic with hotel partner aspect.
4.3
Complete Example of Composed System
The complete composed system is shown in Fig. 22. It is very similar to the non-
aspectual UCM model in Fig. 5 except that no root maps are used but the impact
of other concerns is shown directly on the maps for making and canceling a
reservation. Multiple disjoint plug-in maps for making or canceling a reservation
are therefore avoided. The authorization stubs appear in making and canceling
a reservation but they are added automatically by the composition algorithm.
Search WWH ::




Custom Search