31.2. The jbosscmp-jdbc Structure
jbosscmp-jdbc.xmldescriptor is used to control the behavior of the JBoss engine. This can be done globally through the
conf/standardjbosscmp-jdbc.xmldescriptor found in the server configuration file set, or per EJB JAR deployment via a
jbosscmp-jdbc.xmldescriptor can be found in
<JBOSS_HOME>/docs/dtd/jbosscmp-jdbc_4_0.dtd. The public doctype for this DTD is:
<!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 4.0//EN" "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_4_0.dtd">
Figure 31.2. The jbosscmp-jdbc content model.
- defaults: The defaults section allows for the specification of default behavior/settings for behavior that controls entity beans. Use of this section simplifies the amount of information needed for the common behaviors found in the entity beans section. See Section 31.12, “Defaults” for the details of the defaults content.
- enterprise-beans: The
enterprise-beanselement allows for customization of entity beans defined in the
enterprise-beansdescriptor. This is described in detail in Section 31.3, “Entity Beans”.
- relationships: The
relationshipselement allows for the customization of tables and the loading behavior of entity relationships. This is described in detail in Section 31.5, “Container Managed Relationships”.
- dependent-value-classes: The
dependent-value-classeselement allows for the customization of the mapping of dependent value classes to tables. Dependent value classes are described in detail in Section 31.4.5, “Dependent Value Classes (DVCs)” (DVCs).
- type-mappings: The
type-mappingselement defines the Java to SQL type mappings for a database, along with SQL templates, and function mappings. This is described in detail in Section 31.13, “Datasource Customization”.
- entity-commands: The
entity-commandselement allows for the definition of the entity creation command instances that know how to create an entity instance in a persistent store. This is described in detail in Section 31.11, “Entity Commands and Primary Key Generation”.
- user-type-mappings: The
user-type-mappingselements defines a mapping of a user types to a column using a mapper class. A mapper is like a mediator. When storing, it takes an instance of the user type and translates it to a column value. When loading, it takes a column value and translates it to an instance of the user type. Details of the user type mappings are described in Section 31.13.4, “User Type Mappings”.
- reserved-words: The
reserved-wordselement defines one or more reserved words that should be escaped when generating tables. Each reserved word is specified as the content of a