Hi,

I would like to know if is possible to invoke a specific method from a
component inside an interceptor. For example, let's suppose the following
scenario: A component *CalcComponent* that has the operations *add* and *sub
*, and a reference to a *AddComponent* and a *SubComponent*. The *add *method
uses the reference to the *AddComponent* to invoke the *addMethod *(that is
part of the service interface of the *AddComponent*)*.* The *sub *method
works similarly to the *add*. Suppose that I am using some policy (like
logging) in the *add* and *sub* methods.

The simplified invocation chain would work like that:

1) add -> Interceptor for the add -> Interceptor for the addMethod ->
addMethod
2) sub -> Interceptor for the sub -> Interceptor for the subMethod ->
subMethod

So, is possible, for example, in some interceptor at the fist invocation
chain, invoke the *subMethod* instead of the *addMethod*, or return to the *
add* method a combination of results of the *addMethod* and *subMethod*?

Thanks,

-- 
Douglas Siqueira Leite
Graduate student at University of Campinas (Unicamp), Brazil

Reply via email to