Hi Satish,

there is a good reason for having <ejb-ref> tag in your deployment
descriptor. Although it isn't neccessary to put your beans in the reference
list, you might do it in order to support the 'write-once' paradigm.

Suppose that there are 3 beans in your jar. Each bean references the other
in some way. If you map your references via <ejb-ref> (e.g. "ejb/a",
"ejb/b", "ejb/c") you are free to deploy each bean under any name in your
JNDI tree without loosing your references.

What I try to say is, that you might use "ejb/foo/BEAN_A" on one server and
"ejb/another_foo/EJB_A" on another. Your references within the bean code (->
"ejb/a") will still work without changing your code.

<ejb-ref> is a MAPPING of JNDI-NAME-REFERENCES. One might wonder why in the
world anyone would deploy his beans using different JNDI-NAMES, but
sometimes there are naming conventions on one server that differ from those
on other servers...

Hartmut

-----Ursprüngliche Nachricht-----
Von: Globetrot Communications [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 24. Januar 2001 19:07
An: Orion-Interest
Betreff: Rationale for <ejb-ref> element?


What is the rationale for having <ejb-ref> element? I
know the spec says that with this approach and ejb-ref
is visible only within the scope of the referencing
ejb. But that also means that each referenced ejb has
to be included as a <ejb-ref> element of each
referencing ejb. Doesn't this get away from the
'write-once' paradigm?

Thanks for your input.

Satish

=====
______________________________________________________
5.5 cents calls with 6-second billing no fees. Free toll-fre numbers. No
other charges
4 cents Domestic calls with no fees:
5 cents per minute International calls also available
http://globetrot.hypermart.net
e-mail: [EMAIL PROTECTED]
______________________________________________________

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/

Reply via email to