An deployment descriptor example is included next to the DTD in the EJB 1.1
spec. It shows examples of ejb-ref as Session or Entity EJB, using "Session"
and "Entity" for ejb-ref-type. However the DTD does not specify any limited set
of values for ejb-ref-type, which is PCDATA (any parseable characters). Don't
know what other values could be specified there.
Once you have decided to use a symbolic name, this name will have to be in both
client and server places. The bean-code/ejb-ref-name dependency is similar to
client-code/EJBHome-name dependency.
Laird Nelson wrote:
> In the deployment descriptor DTD, I noticed this:
>
> <!--
> The ejb-ref element is used for the declaration of a reference to
> another enterprise bean's home. The declaration consists of an optional
> description; the EJB reference name used in the code of the referencing
> enterprise bean; the expected type of the referenced enterprise bean;
> the expected home and remote interfaces of the referenced enterprise
> bean; and an optional ejb-link information.
>
> The optional ejb-link element is used to specify the referenced
> enterprise bean. It is used typically in ejb-jar files that contain an
> assembled application.
>
> Used in: entity and session
> -->
> <!ELEMENT ejb-ref (description?, ejb-ref-name, ejb-ref-type, home,
> remote, ejb-link?)>
>
> Could someone give me an example of what this would look like? The element
> that I am having trouble understanding is ejb-ref-name. Is this the JNDI
> name that the referencing bean uses in its code? Isn't that dangerous to
> keep that name in two places? Don't you have to change code if an
> ejb-ref-name is changed in your deployment descriptor?
>
> Cheers,
> Larid
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".