users@glassfish.java.net

Re: ejb-jar.xml assembly-descriptor question: interceptor recognized, but not loaded?

From: Laird Nelson <ljnelson_at_gmail.com>
Date: Sun, 27 May 2012 22:08:08 -0400

On Sun, May 27, 2012 at 9:52 PM, Laird Nelson <ljnelson_at_gmail.com> wrote:

> It's when I add the <method> stanza. I am using style #3 on page 563 of
> the EJB 3.1 specification.
>

Pretty sure this is the root issue; will build a test case after next week.

For those wishing to investigate: there are likely edge cases where style
#3 of XML-based interceptor declaration does not work (it appears that
Glassfish simply ignores the method specified, or can never locate such a
method, so your interceptor will not be created or fired). The workaround
is to use style #2, grab the Method from the InvocationContext, and
decorate/intercept the stock invocation only if the method name is the
right one.

Best,
Laird

-- 
http://about.me/lairdnelson