uCosminexus Application Server, EJB Container Functionality Guide

[Contents][Glossary][Index][Back][Next]

4.3.3 Precautions during the implementation of an Entity Bean (BMP)

This subsection describes the precautions to be taken when implementing an Entity Bean (BMP).

Organization of this subsection
(1) About accessing the resource manager with the setEntityContext method
(2) About specifying an interface in the primary key class
(3) Releasing references with the remove method

(1) About accessing the resource manager with the setEntityContext method

According to the EJB 1.1 specifications and the EJB 2.0 specifications, accessing the resource manager with the setEntityContext method is not allowed.

(2) About specifying an interface in the primary key class

When an interface and abstract class are specified in the <prim-key-class> tag of the DD of a BMP Entity Bean, deployment and execution can be performed in the same way as when a class is specified.

(3) Releasing references with the remove method

When you invoke an Entity Bean by using the home interface, you obtain the references by invoking the create method of the home interface; however, after completing the invocation of the Entity Bean, make sure that you release the references by invoking the remove method.

If you do not release the references, the memory on the J2EE server will be consumed.