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

Sun Microsystems Inc.

Enterprise bean environment

Enterprise JavaBeans 2.0, Public Draft

Resource environment references

The following example illustrates the declaration of resource environment references in the deployment descriptor.

...

<enterprise-beans> <session>

...

<ejb-name>EmployeeService</ejb-name> <ejb-class>

com.wombat.empl.EmployeeServiceBean </ejb-class>

...

<resource-env-ref> <description>

This is a reference to a JMS queue used in the processing of Stock info

</description> <resource-env-ref-name>

jms/StockInfo </resource-env-ref-name> <resource-env-ref-type> javax.jms.Queue </resource-env-ref-type>

</resource-env-ref>

...

</session>

...

</enterprise-beans>

...

19.5.2 Deployer’s responsibility

The Deployer is responsible for the following:

The Deployer must ensure that all the declared resource environment references are bound to administered objects that exist in the operational environment. The Deployer may use, for example, the JNDI LinkRef mechanism to create a symbolic link to the actual JNDI name of the target object.

The Deployer must ensure that the target object is type-compatible with the type declared for the resource environment reference. This means that the target object must be of the type indicated in the resource-env-ref-type element.

19.5.3 Container Provider’s responsibility

The Container Provider must provide the deployment tools that allow the Deployer to perform the tasks described in the previous subsection. The deployment tools provided by the EJB Container provider must be able to process the information supplied in the resource-env-ref elements in the deployment descriptor.

At the minimum, the tools must be able to inform the Deployer of any unresolved resource environment references, and allow him or her to resolve a resource environment reference by binding it to a specified compatible target object in the environment.

5/31/00

398