users@glassfish.java.net

Interceptors question: partial annotation, partial dd possible?

From: Laird Nelson <ljnelson_at_gmail.com>
Date: Sun, 27 May 2012 16:53:21 -0400

I have a situation that I'm not clear about the specification's position on.

I have an interceptor class. It is packaged up in a jar in my ear file's
lib directory. It is annotated with the @Interceptor annotation. It also
features an @AroundInvoke annotation on one of its (conformant) methods.

Meanwhile, in another area of the .ear :-) I have an EJB jar file. It has
an ejb-jar.xml file in META-INF. The ejb-jar.xml file has an
<assembly-descriptor> section that refers by classname to the class name of
the interceptor packaged in that other jar.

When I deploy this particular configuration of things, Glassfish 3.1.2
tells me it can't deploy it because the assembly-descriptor binding refers
to a class that has not been marked as an interceptor.

But that class HAS been marked as an interceptor (via the @Interceptor
annotation).

Is it required that if I use the DD to bind an interceptor, I must also
identify the interceptor in the DD?

Best,
Laird

-- 
http://about.me/lairdnelson