#66 Gen constants for ejb-ref COMP_NAMEs

ejbdoclet (28)

XDoclet should generate constants for the
COMP_NAMEs declared in the ejb-refs for a bean.

Ie For BeanA that has an ejb-ref to BeanB, I declare an
ejb:ejb-ref (or
ejb:ejb-external-ref) tag and an appserver tag to bind the
to a JNDI_NAME for BeanA. During BeanA's
setSessionContext() I would like to
resolve the reference to BeanB's Home using the
COMP_NAME. At the moment you must manually
include a second String specifying the same
declared in the ejb-ref tag in BeanA's header.

It seems sensible to automatically generate the
COMP_NAME constant for beans that are *referenced*.

NB The BeanUtil class that XDoclet can generate is not
a solution as it (aberrantly IMO) generates a
COMP_NAME for the bean itself and the beans
that are referenced.

Kind of like putting the cart before the horse :-)


  • Andy Stevens

    Andy Stevens - 2002-07-10

    Logged In: YES

    For that matter, why do we generate the COMP_NAME and
    JNDI_NAME in the Home interface, rather than in the Util
    class that uses them? Is it just historical (they predate the
    Util class generation), or is there some other reason?

    Having them in the Home is causing me problems with
    Powerbuilder proxy object generation for my EJBs, which
    would go away if the constants were in the utility class

  • William Ferguson

    Logged In: YES

    IMO the COMP_NAME shouldn't reside on either the HOME
    or Util class of the target bean. The COMP_NAME is specific
    to the client that is targetting the bean.

    The JNDI_NAME is another matter as it is absolute.

    We use the attached XDoclet Template to get most of the
    way there.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks