users@glassfish.java.net

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

From: Cheng Fang <cheng.fang_at_oracle.com>
Date: Sun, 27 May 2012 22:49:06 -0400

On 5/27/12 10:36 PM, Laird Nelson wrote:
> On Sun, May 27, 2012 at 10:28 PM, Cheng Fang <cheng.fang_at_oracle.com
> <mailto: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?
Yes, then all methods in DAO should also be included as business
methods. Is generics used in interfaces or business methods? That
could also be a factor. Looks like a GlassFish ejb issue. Can you file
one? Thanks.

-cheng
>
> 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
>