I would say something like:
"The Deployer must use either ejb-link, lookup-name or mapped-name to
create a symbolic link to the actual JNDI name of the target enterprise
bean. In that order of preference."
Alternatively we could say that it needs to take into account all
attributes defined and throw an Exception if it leads to conflicts. But
that raises the burden of the Assembler.
Carlo
On 09/23/2011 02:24 AM, Marina Vatkina wrote:
> Anybody?
>
> thanks,
> -marina
>
> Marina Vatkina wrote:
>> Experts,
>>
>> The Deployer role is defined in section 2.2.3 as
>>
>> ============
>> The Deployer takes one or more ejb-jar files and/or .war file
>> produced by a Bean Provider or Application Assembler and deploys the
>> enterprise beans contained in the ejb-jar or .war files in a specific
>> operational environment. The operational environment includes an EJB
>> container and server.
>>
>> The Deployer must resolve all the external dependencies declared by
>> the Bean Provider (e.g. the Deployer must ensure that all resource
>> manager connection factories used by the enterprise beans are present
>> in the operational environment, and he or she must bind them to the
>> resource manager connection factory references declared in the
>> metadata annotations or deployment descriptor), and must follow the
>> application assembly instructions defined by the Application
>> Assembler. To perform his or her role, the Deployer uses tools
>> provided by the EJB Container Provider.
>> ============
>>
>> If you search for "Deployer" throughout the spec, you'll find that
>> it's role is in other places is defined as to resolve ejb refs, like
>> in the one marked with XXX:
>>
>> ============
>> 11.5.3 Deployer’s Responsibility
>>
>> The Deployer is responsible for the following:
>>
>> The Deployer must ensure that all the declared EJB references are
>> bound to the business interfaces, no-interface views, or home
>> interfaces of enterprise beans that exist in the operational
>> environment. For session beans, the Deployer may use the information
>> provided by the Bean Provider in the mappedName element of the EJB
>> annotation or the mapped-name element of the ejb-ref or ejb-local-ref
>> deployement descriptor element in creating this binding. Section 4.4
>> describes the syntax for session bean portable global JNDI names. The
>> Deployer may also use, for example, the JNDI LinkRef mechanism to
>> create a symbolic link to the actual JNDI name of the target
>> enterprise bean. [XXX The second sentence of this paragraph seemed to
>> imply that the Deployer can set the value of DD entries, which is
>> broken.This requires further review and discussion. The second and
>> third sentences, in the original EJB 3.1 final release read as
>> follows: “For session beans, the Deployer may use the EJB annotation
>> mappedName attribute or the ejb-ref/ejb-local-ref mapped-name element
>> to specify this binding. Section 4.4 describes the syntax for session
>> bean portable global JNDI names.”]
>> ============
>>
>> Please let me know if and how do I change the spec.
>>
>> thanks,
>> -marina
>>
>>