It looks like we shall not achieve a consensus :-(
Rickard �berg wrote:
R�> 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.*.
R�> But it is never stated. And as a container developer I can only go by
R�> the things that are explicitly stated. "Hunches" are not enough.
The opposite is also never stated. The specification does not answer
this question explicitly.
>> 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?
R�> Other way round: does it say anywhere that a EJB-reference is considered
R�> valid if ejb-link is not specified? Also, 14.3.4 explicitly says that
R�> the Container should inform the Deployer of any unresolved references.
But what is "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.
I think that here is a definition of resolved references: ones bound
to the homes. All others are unresolved.
>> spec> 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.
R�> See 14.3.4. The Deployer may use either ejb-link or a proprietary
R�> mechanism (and jBoss supports both at this time). But if the Deployer
R�> does not use either of these mechanisms, the reference is considered
R�> incomplete, and the Container must (as is stated in 14.3.4) complain.
Neither 14.3.3 nor 14.3.4 say that the Deployer can use ejb-link.
Moreover, 14.3.4 says:
spec> Container provider... Preserve the application assembly
^^^^^^^^
spec> information in the ejb-link elements
Here is explicitly said that ejb-link contains the assembly
information, not the deployment one.
>> 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.
R�> Again: the Assembler *may* use ejb-links, and the Deployer *may* use
R�> ejb-link *or* other mechanism, but if none of these two parties perform
R�> this operation, the EJB-reference is, as is stated in 14.3.4, considered
R�> incomplete, and the Container must complain.
R�> QED. :-)
Illegal proof ;-)
14.3.4 doesn't actually state that "if none of ejb-link or other
mechanism is used, the EJB-reference is considered incomplete".
It is just your understanding.
>>
>> 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.
R�> It doesn't, but any EJB-reference MUST be resolved by *either* an
R�> ejb-link *or* the jBoss mechanism.
R�> That is what I am saying.
I understand.
R�> Do you agree?
No, still no. Let's put to the vote ;-)
Best regards,
Oleg
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]