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

If I understand it correctly, a simple reference is to a known bean,
i.e. one that is included in the JAR and is known to exist. A link is to
an unknown bean existing outside the JAR. At deployment type the link
has to be resolved.

For example, my JAR will contain Account and Customer and will have a
link to some Company bean. Another JAR will introduce a Company bean and
at deployment time the link will be resolved between a bean in JAR 1 and
a bean in JAR 2. Of course, that other bean can have a different name,
existing on a different server, etc.

arkin


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

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