kdlitwak wrote:
>     I'm a little fuzzy on references and links and have a basic question
> or two.  In fact, I assume this is so basic that maybe anyone who
> responds should communicate with me privately so as not to bother the
> list with basic stuff.

Nah, I don't think it's that basic.

> Precisely how do a reference and a link differ semantically or
> connotatively?
>
> A reference, if I understand it correctly, is just the name of the EJB
> and its home interface, so that another bean at runtime can do a JNDI
> lookup, right?  I think that's what it is, but the language about
> reference makes it sound like it is soothing more complicated.
>
> A link is supposed to be a way for an application assembler to provide a
> way for one bean to find another bean.  That sounds like a reference.
> What's the difference?
>
>     I assume that neither of these are an actual object reference to an
> EB's home object, but just the name of the home interface so the caller
> can do a JNDI lookup.  Yes?  Thanks.

If I understand the question correctly, it's something like this:
Both references and links (defined in this context by your above
description) are JNDI names. A "reference" can be used through the
standard JNDI lookup, i.e. the home is found by doing lookup(theRef). A
"link" is an application internal link between beans that, as you note,
the application assembler sets up, and is also a JNDI name but one would
use the "java:comp/env" prefix to use it. I.e. if I have established a
link named "Account" to some Account bean I would use
lookup("java:comp/env/Account") to find the home of it.

Syntactically they're just two different ways of doing lookup.
Semantically the link concept is much more practical as it is a much
more "persistent" way of connecting one bean with another, since the
names will always be the same regardless of the naming implementation.
You can also have several beans using the same link *name*, but in
different beans and also different applications the result will be
different. The result of a link lookup is bean-local.

Makes sense? I think I got it right..

/Rickard

--
Rickard �berg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.dreambean.com
Question reality

===========================================================================
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".

Reply via email to