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:36:14 -0400

On Sun, May 27, 2012 at 10:28 PM, Cheng Fang <cheng.fang_at_oracle.com> wrote:

> If your bean class is declared:
> @Stateless
> public class PersonBean extends AbstractDAO implements PersonManager...
>
> then PersonManager is deemed its remote (if it's annotated with @Remote),
> or local (if it's annotated with @Local, or nothing to that effect). So
> business methods can only come from PersonManager. If PersonBean
> indirectly implements DAO, where your persist method is declared, DAO is
> not considered its business interface. Interceptors only apply to business
> methods.
>

Thank you; PersonManager extends DAO as well. Does that change the
equation?

I discovered another workaround, which is to fully specify the method
parameters:

<method>
  <method-name>persist</method-name>
  <method-params>
    <method-param>java.io.Serializable</method-param>
  </method-params>
</method>

With that in there, the method is found. Without the <method-params>
block--even though there's only one persist() method (i.e. it's not
overloaded anywhere)--the method is not found.

Best,
Laird

-- 
http://about.me/lairdnelson