Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Enterprise JavaBeans™ Specification, Version 2.0 - Sun Microsystems.pdf
Скачиваний:
14
Добавлен:
24.05.2014
Размер:
2.71 Mб
Скачать

Sun Microsystems Inc

EJB references

Enterprise JavaBeans 2.0, Public Draft

Enterprise bean environment

19.2.2 Application Assembler’s responsibility

The Application Assembler is allowed to modify the values of the environment entries set by the Bean Provider, and is allowed to set the values of those environment entries for which the Bean Provider has not specified any initial values.

19.2.3 Deployer’s responsibility

The Deployer must ensure that the values of all the environment entries declared by an enterprise bean are set to meaningful values.

The Deployer can modify the values of the environment entries that have been previously set by the Bean Provider and/or Application Assembler, and must set the values of those environment entries for which no value has been specified.

The description elements provided by the Bean Provider or Application Assembler help the Deployer with this task.

19.2.4 Container Provider responsibility

The container provider has the following responsibilities:

Provide a deployment tool that allows the Deployer to set and modify the values of the enterprise bean’s environment entries.

Implement the java:comp/env environment naming context, and provide it to the enterprise bean instances at runtime. The naming context must include all the environment entries declared by the Bean Provider, with their values supplied in the deployment descriptor or set by the Deployer. The environment naming context must allow the Deployer to create subcontexts if they are needed by an enterprise bean.

The Container must ensure that the enterprise bean instances have only read access to their environment variables. The Container must throw the javax.naming.OperationNotSupportedException from all the methods of the javax.naming.Context interface that modify the environment naming context and its subcontexts.

19.3EJB references

This section describes the programming and deployment descriptor interfaces that allow the Bean Provider to refer to the homes of other enterprise beans using “logical” names called EJB references. The EJB references are special entries in the enterprise bean’s environment. The Deployer binds the EJB references to the enterprise bean’s homes in the target operational environment.

The deployment descriptor also allows the Application Assembler to link an EJB reference declared in one enterprise bean to another enterprise bean contained in the same ejb-jar file, or in another ejb-jar file in the same J2EE application unit. The link is an instruction to the tools used by the Deployer that the EJB reference must be bound to the home of the specified target enterprise bean.

385

5/31/00