Hi folks, hi Jaap,
This
thread might be dead for years. But I am currently preparing myself for the SCBCD 5 exam and I was confused by Jaaps question, too.
So here are my 5 cents to this.
The first deployment descriptor snippet of Jaaps initial question applies the interceptor class "MyInterceptor" to the method with the signature "interceptFoo(
String)" of the bean named "FooBean". The corresponding metadata annotation could look like this:
The method name "interceptFoo" is a little bit misleading in this example. It might have be named "anyMethod" because it is the method which is to be intercepted. And, there is a enclosing "method" element missing in the snippet. It is expected to embrace the elements "method-name" and "method-params".
The secondond deployment descriptor snippet declares the method named "interceptFoo" of the class "MyInterceptor" to be an around-invoke interception method. The "method-params" element is not legal in this context since any around-invoke interception method is expected to have the signature "Object <any-method-name>(InvocationContext) throws Exception".
The corresponding metadata annotation might look like this:
I hope this of help to somebody.
Rock on,
Dirk