ejb@glassfish.java.net

remove-method and overloaded methods

From: Cheng Fang <Cheng.Fang_at_Sun.COM>
Date: Mon, 18 Sep 2006 11:59:53 -0400

Hi,

If I have overloaded business method named remove(...), does the
following apply to all methods named remove, or just remove()? I would
think it's for all methods, but I couldn't find such specific
requirement in ejb 3 spec or ejb-jar_3_0.xsd.

<remove-method>
  <bean-method>
    <method-name>remove</method-name>
  </bean-method>
  <retain-if-exception>false</retain-if-exception>
</remove-method>

The spec does have detailed rules of overloading for other similar
elements such as <interceptor-binding>(method-level @Interceptors),
<container-transaction> (@TransactionAttribute). They all use
javaee:named-methodType, so it seems reasonable to expect a consistent
behavior. Could someone clarify?

If I only annotate remove() to be remove method in bean class, and have
remove(boolean) as a non-remove-method, the current glassfish will
generate the above descriptor elements, which seems to make all
remove(...) methods to be remove-methods.

We might also want to include <init-method> <timeout-method> in future
clarification.

-- 
Cheng