facebook

EJB Naming Conventions

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #204216 Reply

    Walter Riley
    Member

    I am using ME 3.7RC2 amd trying to follow basic EJB naming conventions:
    see https://jjguidelines.dev.java.net/ch01s03.html#d0e911

    Simply put, I want to name the Bean with an EJB or Bean suffix and have all generated interfaces drop the suffix before appending. for example:
    ProductBean as EJB name
    Product as remote interface name
    ProductHome as home interface name
    etc.

    The EJB creation wizard writes the @ejb.bean name=”ProductBean” attribute automatically. This prevents <ejbdoclet>’s ejbClassNameSuffix attribute from taking effect. If the ejb.bean name attribute is removed, this problem will be fixed as XDoclet will pick up the bean name from the class itself and by default will remove Bean or EJB suffixes when generating interfaces.

    It would also be nice if you provided simple build.xml and build.properties files. Build.xml should have a “clean” target as well as an “ejbdoclet” target that does <tstamp /> before calling
    <ant antfile=”xdoclet-build.xml” /> (or you could put the tstamp in the generated xdoclet-build.xml file). We could then set the version in build.properties and that coupled with the time stamp would produce proper documented comments in the generated interface files.

    #204256 Reply

    Walter Riley
    Member

    Looked at the suffix issue some more. It appears that although removing the name attribute from @ejb.bean will cause the generated interface files to properly strip the suffix, the Util.java files will not generate and @ejb.create-method won’t work properly unless the name attribute is present, so I guess we’re left with manually setting the stripped name unless the ejb creation wizard can do it for us.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: EJB Naming Conventions

You must be logged in to post in the forum log in