Hi!

Oleg Nitz wrote:
> Rickard �berg wrote:
> R�> Oleg Nitz wrote:
> >> Now I am up. What are the questions?
> >> * Should ejb-link default to ejb-ref-name?
> >> Yes, at least it is my understanding of 14.3.2.
> >> More precisely, if ejb-link is not specified, ejb-ref-name is used.
> 
> R�> No, this is not stated in 14.3.2.
> This is not stated explicitly, it is my understanding of the spirit of
> 14.3.*.

But it is never stated. And as a container developer I can only go by
the things that are explicitly stated. "Hunches" are not enough.

> R�> The Assembler must specify the ejb-link, or the EJB reference is
> R�> considered incomplete (from a deployment point of view).
> Can you provide any proof of your statement?

Other way round: does it say anywhere that a EJB-reference is considered
valid if ejb-link is not specified? Also, 14.3.4 explicitly says that
the Container should inform the Deployer of any unresolved references.

> >> * Can Deployer set ejb-link in order to bind ejb-ref to an appropriate
> >>   bean?
> >> No, Deployer should use some vendor-specific way, "...for example,
> >> the JNDI LinkRef mechanism..." or jboss.xml.
> >> At least it is my understanding of 14.3.3.
> 
> R�> The Deployer can set the ejb-link (as can the Bean Developer and
> R�> Assembler), but if the bean should reference a bean outside of the
> R�> application, then a properietary setting must be used.
> Okay, I'll try to prove my statement.
> 
> spec> 14.3.3 Deployer�s responsibility
> spec> The Deployer is responsible for the following:
> spec> * The Deployer must ensure that all the declared EJB references
> spec> are bound to the homes of enterprise beans that exist in the
> spec> operational environment. The Deployer may use, for example,
> spec> the JNDI LinkRef mechanism to create a symbolic link to the
> spec> actual JNDI name of the target enterprise bean�s home.
> Nothing is said about setting ejb-link by the Deployer.

See 14.3.4. The Deployer may use either ejb-link or a proprietary
mechanism (and jBoss supports both at this time). But if the Deployer
does not use either of these mechanisms, the reference is considered
incomplete, and the Container must (as is stated in 14.3.4) complain.

> spec> * The Deployer must ensure that the target enterprise bean is
> spec> type-compatible with the types declared for the EJB reference.
> spec> This means that the target enterprise bean must of the type
> spec> indicated in the ejb-ref-type element, and that the home and
> spec> remote interfaces of the target enterprise bean must be Java
> spec> type-compatible with the home and remote interfaces declared in
> spec> the EJB reference.
> Nothing is said about setting ejb-link by the Deployer.
> 
> spec> * If an EJB reference declaration includes the ejb-link element,
> Note:   ^^
> spec> the Deployer must bind the enterprise bean reference to the home
> spec> of the enterprise bean specified as the link�s target.
> I conclude that the EJB reference declaration may not include the
> ejb-link element, and it is not an error (my first statement).
> Again, nothing is said about setting ejb-link by the Deployer.
> I conclude that ejb-link is an Assembler's mean, and Deployer should
> use some vendor-specific means.

Again: the Assembler *may* use ejb-links, and the Deployer *may* use
ejb-link *or* other mechanism, but if none of these two parties perform
this operation, the EJB-reference is, as is stated in 14.3.4, considered
incomplete, and the Container must complain.

QED. :-)

> 
> R�> And such a setting is indeed available in jboss. If you edit a
> R�> EJB-reference in the jBoss plugin you will see an optional
> R�> JNDI-name field.
> It's nice, jboss conform to the specification here, but don't say that
> during deployment EJB reference must contain ejb-link.

It doesn't, but any EJB-reference MUST be resolved by *either* an
ejb-link *or* the jBoss mechanism. 

That is what I am saying. 

Do you agree?

regards,
  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]

Reply via email to