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

Sun Microsystems Inc

The responsibilities of the container provider Enterprise JavaBeans 2.0, Public Draft

Message-driven Bean Component Contract

The method name must be ejbRemove.

The method must be declared as public.

The method must not be declared as final or static.

The return type must be void.

The method must have no arguments.

The throws clause must not define any application exceptions.

14.8 The responsibilities of the container provider

This section describes the responsibilities of the container provider to support a message-driven bean. The container provider is responsible for providing the deployment tools, and for managing the mes- sage-driven bean instances at runtime.

Because the EJB specification does not define the API between deployment tools and the container, we assume that the deployment tools are provided by the container provider. Alternatively, the deployment tools may be provided by a different vendor who uses the container vendor’s specific API.

14.8.1 Generation of implementation classes

The deployment tools provided by the container are responsible for the generation of additional classes when the message-driven bean is deployed. The tools obtain the information that they need for generation of the additional classes by introspecting the classes and interfaces provided by the enterprise bean provider and by examining the message-driven bean’s deployment descriptor.

The deployment tools may generate a class that mixes some container-specific code with the mes- sage-driven bean class. This code may, for example, help the container to manage the bean instances at runtime. Subclassing, delegation, and code generation can be used by the tools.

14.8.2 Non-reentrant instances

The container must ensure that only one thread can be executing an instance at any time.

14.8.3 Transaction scoping, security, exceptions

The container must follow the rules with respect to transaction scoping, security checking, and exception handling, as described in Chapters 16, 20, and 17.

293

5/31/00

Sun Microsystems Inc.

Message-driven Bean Component Contract

Enterprise JavaBeans 2.0, Public Draft The responsibilities of the container provider

5/31/00

294