While deploying CMP entity beans, which fields in the bean are container-managed and how are they identified?
Container-managed fields may be specified in the bean's deployment descriptor. An entity bean, for example, has an XML deployment descriptor containing elements similar to the following:<br/>
<enterprise-beans> <entity> <description>This entity bean models an audio compact disc.</description> <ejb-name>MusicCDBean</ejb-name> <home>musicstore.MusicCDHome</home> <remote>musicstore.MusicCD</remote> <ejb-class>musicstore.MusicCDBean</ejb-class> <persistence-type>Container</persistence-type> <prim-key-class>musicstore.MusicCDPK</prim-key-class> <reentrant>False</reentrant> <cmp-field><field-name>upc</field-name></cmp-field> <cmp-field><field-name>title</field-name></cmp-field> <cmp-field><field-name>artist</field-name></cmp-field> <cmp-field><field-name>type</field-name></cmp-field> <cmp-field><field-name>price</field-name></cmp-field> </entity> </enterprise-beans>In the above deployment descriptor, the container-managed fields are specified to be upc, title, artist, type, and price.
While the deployment descriptor provides information about the container-managed fields for use during deployment, the details of how these fields are mapped into the database (or other persistent storage mechanism) are controlled by the container-specific deployment process itself. To learn more about the container-specific deployment process, you will need to consult your container vendor's documentation.