Dan OConnor wrote:
>
> 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.
Again with Dan on this... no-nonsense defaults is our Rule #1.
The link is optional because in the case there is one datasource
(95%cases) your stuff is overkill, even BEA WL does it like that AFAIK
(but you are the WL power user of the year Rickard;-). Implicit is
possible and good because simple. Simple is good. Again check
ContainerMetaData for code, trivial adaptation with your MLET thingy and
the tag of the type.
If not, we all agree that the work fall on the deployer (3 of 5 on the
board wow!!! I think oleg is asleep ;-)
marc
>
> >
> > 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]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]