Overloaded methods are not included in remote interface generated by EJBGen (Doc ID 1363109.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle Weblogic Server - Version: 9.2 and later   [Release: and later ]
Information in this document applies to any platform.

Symptoms

EJB that contains overloaded methods with same parameter name are not included in the remote interface generated by EJBGen.

As an example -

An EJB has overloaded methods greet() with same parameter name param1.  Running EJBGen against this bean does not generate all the overloaded methods in the remote interface; instead, only one method is generated.

public class HelloBean extends GenericSessionBean implements SessionBean {
...

  /**
   * @ejbgen:local-method
   * @ejbgen:remote-method
   */
  public int greet(List<Object> param1) throws Exception {
     return 0;
  }

  /**
   * @ejbgen:local-method
   * @ejbgen:remote-method
   */
  public int greet(String param1) throws Exception {
     return 0;
  }

  /**
   * @ejbgen:local-method
   * @ejbgen:remote-method
   */
  public int greet(Integer param1) throws Exception {
     return 0;
  }
}

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms