The code generation mechanism is only described for Entity beans CMP in this section since the code generated is handled and stored in the Container. With Entity beans BMP, session beans and message-driven beans, the code generated is highly dependent on the bean developer's input, it would thus not be possible to introduce each possible configuration here.
The process of code generation is explained below in order for you to understand the mechanism:
The generation of EJB class and interface into code is performed like if they were Java classes, except that they are dependent on an EJB and thus contain more information to be processed during generation.
The code generation process performs the following tasks:
It creates the following inheritance links:
Here is an example from the Preview page of the remote interface:
It creates the following realization links:
Here is an example from the Preview page of the Bean class:
It transforms attributes flagged as persistent into getter and setter methods (cmp-fields and cmr-fields are generated as getters and setters).
cmp-fields are attributes flagged as Persistent in the property sheet. cmr-fields are attributes that are migrated from associations.
Here is an example from the Preview page of the Bean class: