On 18 May 00, at 17:36, Rickard �berg wrote:

> >     And this is from the ejb-jar.xml of TestBeans.jar
> >
> > --------------------------------
> > <ejb-ref>
> >   <description>An EJB ref for this bean to test</description>
> >   <ejb-ref-name>ejb/myEJBRef</ejb-ref-name>
> >   <ejb-ref-type>Stateless</ejb-ref-type>
> >   <home>org.jboss.zol.testbean.interfaces.StatelessSessionHome</home>
> >   <remote>org.jboss.zol.testbean.interfaces.StatelessSession</remote>
> > </ejb-ref>
> > --------------------------------
> >
> >     And...   that's all :-)
>
> Ok, no link set, then this is not surprising.. Ya need to set the
> reference to link some bean, or otherwise it won't (of course) work.
>
> /Rickard
>

Hi Rickard,

Obviously you are correct that somewhere, the reference name
needs to be bound to some EJB in the global namespace.  I just
wanted to clarify that this isn't done by using the optional ejb-link of
the deployment descriptor.  (Not that you said that, but the
juxtaposition of the above XML and the "no link set" comment
could be misread.)

The ejb names and ejb references are bound to actual EJBs in the
global namespace in the same way that a JDBC resource
reference would be (for instance): with a level of indirection.  So the
ejb name "Customer" could be bound to the global namespace
under the name "WebCustomer."  The method to do this binding is
container-specific.  The ejb reference "ejb/Customer" could be
bound to this EJB resource by mapping "ejb/Customer" to
"WebCustomer" in the container-specific deployment tool (which
could be a fancy Swing GUI, or could be as simple as an XML file
that is edited by hand).  The ejb-link mechanism, if present, can be
used to ensure that whatever global namespace name is used for a
particular ejb (e.g. "WebCustomer" used for Customer) is ALSO
used for a particular ejb reference (e.g. "WebCustomer" also used
for ejb/Customer).

For convenience, we could provide an option to remove this level of
indirection if the ejb-link field is present, and assume that the bean
will be bound to the global namespace using its EJB name.

-Dan



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

Reply via email to