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 23:01:02 -0400

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

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

Will do. Yes, generics are involved. So:

public interface DAO<K extends Serializable, V extends Serializable>

public interface PersonManager extends DAO<Long, Person>

public abstract class AbstractDAO<K extends Serializable, V extends
Serializable, E extends V> implements DAO<K, V>

@Stateless
public class PersonBean extends AbstractDAO<Long, Person, PersonEntity>
implements PersonManager

Then persist() is defined in DAO like this:

public V persist(final V persistee);

So at that point V is (at least) Serializable.

But as I said there is no other persist() method overloaded anywhere, so
the issue is clearly that if you leave the <method-params> block off the
persist() method is silently skipped or never detected.

My company's user conference is all next week so I probably won't get to
filing an issue with a test case until later in the week at the earliest.

Hope this all helps.

Best,
Laird

-- 
http://about.me/lairdnelson