WLS 8.1 SP3 - EJBGen isn't generating the create() methods properly - CR196453

(Doc ID 775819.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle Weblogic Server / WebLogic Server / 8,1
Information in this document applies to any platform

Goal

DESCRIPTION:
EJBGen is not generating the create(...) methods properly. 

If the following is in BandBean.java:

  public BandPK ejbCreate(String blah, String blah2, BandLocal blah3)
  public BandPK ejbCreate(String blah1, String blah2, String blah3)
  public BandPK ejbCreate(String blah1, String blah2, String blah3,String blah4)
  public BandPK ejbCreate(BandLocal blah1, BandLocal blah2, BandLocal blah3,BandLocal blah4)
  public BandPK ejbCreate(Date blah)
  public BandPK ejbCreate(String name, String founder, Date startDate)
  public BandPK ejbCreate(String blah, String blah2, java.lang.Comparable blah3)
  public BandPK ejbCreate(String blah, java.lang.Comparable blah2, String blah3)
  public BandPK ejbCreate(java.lang.Comparable blah2, String blah3,String blah)
  public BandPK ejbCreate()

Then EJBGen generates the following in BandLocalHome.java:

  public BandLocal create(Comparable blah2, String blah3, String blah)     throws CreateException;
  public BandLocal create(String blah, Comparable blah2, String blah3)     throws CreateException;
  public BandLocal create()     throws CreateException;
  public BandLocal create(String blah1, String blah2, String blah3, String blah4)     throws CreateException;
  public BandLocal create(java.sql.Date blah)     throws CreateException;
  public BandLocal create(String blah, String blah2, BandLocal blah3)     throws CreateException;

From the above can infer the following:

- Among the list of ejbCreate methods with the same number of args, the very first method is picked. 
Result : The following is picked for the above reason:

  public BandPK ejbCreate(String blah, String blah2, BandLocal blah3)
  public BandPK ejbCreate(String blah1, String blah2, String blah3,String blah4)
  public BandPK ejbCreate(Date blah)
  public BandPK ejbCreate()

- Thereafter, the ejbCreate methods with the same first few arg types are not picked.
For instance 
Result : The following are not picked
  public BandPK ejbCreate(String blah1, String blah2, String blah3)
  public BandPK ejbCreate(String blah, String blah2, java.lang.Comparable blah3)

And contrarily the following is picked:
  public BandPK ejbCreate(String blah, java.lang.Comparable blah2, String blah3)
  public BandPK ejbCreate(java.lang.Comparable blah2, String blah3,String blah)

- In the case of ejbCreate with 4 args, the behaviour is more different and skewed.
Result : The following just does not get picked:
  public BandPK ejbCreate(BandLocal blah1, BandLocal blah2, BandLocal blah3,BandLocal blah4)

- The order of writing the create methods in the Home interface is a bottom-up approach, where the first ejbCreate
method picked in Bean class is written as the last create method in Home interface.

CONFIGURATION:
WLS 8.1 SP3

Solution

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