On 18 May 00, at 18:09, Rickard �berg wrote:

Hi Rickard,

>
> Sorry, but you are wrong. :-)

It's been known to happen.  :-)

>
> (see 14.3.2)
>
> Here is the Truth (I knew it was out there..):
> The "ejb-ref" in a EJB-reference is the local name that the bean itself
> uses to lookup another bean.

Agreed.

>
> *If* the referenced bean exists within the same application (likely, but
> not necessary), then the ejb-link refers to the "ejb-name" of that bean.

Agreed.

>
> So far we have no proprietary settings involved. The Bean Developer can
> say "I need a reference to this type of bean", and the Assembler can
> link this to another bean in the same app.

Agreed.

>
> The only time a Deployer would get involved with fixing references is if
> the reference should point to a bean in another application, or another
> server. Then this reference must be pointed to a global JNDI-name, which
> only the Deployer can do (the Assembler doesn't have this kind of
> information at hand).

I don't understand what you mean by "fixing references."  The
problem is that ejb-link remains an optional component of the
deployment descriptor at every stage of the process.  (I've reread
14.3.2.  Nowhere does it make ejb-link mandatory.)  If this ejb-link
is specified, well then you're all set.  The deployment tool will
automatically bind the ejb-ref to whatever global-namespace name
the linked bean used.  We can optionally allow this global-
namespace name to be the same as the name of the enterprise
bean.

If, on the other hand, the optional ejb-link field is not provided, the
deployer must manually bind the name of the ejb-ref to a global-
namespace name that has an appropriate associated bean.


>
> So:
> ejb-ref is for the bean, and is set by Bean Developer
> ejb-link refers to bean in same app., and is set by Assembler
> jndi-name (in jboss.xml) may be set to a JNDI-name in the global
> namespace, and is set by Deployer.

This is optionally true.  However, the specification says, "The
Application Assembler CAN [emphasis mine] use the ejb-link
element in the deployment descriptor to link an EJB reference to a
target enterprise bean."  Notice that it does not say must.

By the way, this was the way the reference implementation worked
the last time I used it.  However, I haven't used it since they fixed
all the bugs, so don't put too much stock in this.

-Dan

>
> Clear?
>
> /Rickard
>
> --
> Rickard �berg
>
> @home: +46 13 177937
> Email: [EMAIL PROTECTED]
> http://www.telkel.com
> http://www.jboss.org
> http://www.dreambean.com
>
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
>




--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to