The jbosscmp-jdbc Structure


The jbosscmp-jdbc Structure

You use the jbosscmp-jdbc.xml descriptor to control the behavior of the JBoss engine. You can do this globally through the conf/standardjbosscmp-jdbc.xml descriptor found in the server configuration file set or by using EJB JAR deployment via a META-INF/jbosscmp-jdbc.xml descriptor.

You can find the DTD for the jbosscmp-jdbc.xml descriptor in JBOSS_DIST/docs/dtd/jbosscmp-jdbc_4_0.dtd. The public doctype for this DTD is as follows:

 <!DOCTYPE jbosscmp-jdbc PUBLIC      "-//JBoss//DTD JBOSSCMP-JDBC 4.0//EN"      "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_4_0.dtd"> 

The top-level child elements of the jbosscmp-jdbc element are shown in Figure 11.2.

Figure 11.2. The jbosscmp-jdbc content model.


The public doctype for this DTD is as follows:

  • 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 the "JBoss Global Defaults" section, later in this chapter, for the details of the defaults section content.

  • enterprise-beans The enterprise-beans element allows for customization of entity beans defined in the ejb-jar.xml enterprise-beans descriptor. This is described in detail in the "Entity Beans" section, later in this chapter.

  • relationships The relationships element allows for the customization of tables and the loading behavior of entity relationships. This is described in detail later in this chapter, in the section "Container-Managed Relationships."

  • dependent-value-classes The dependent-value-classes element allows for the customization of the mapping of dependent value classes (DVCs) to tables. DVCs are described in detail later in this chapter, in the "Dependent Value Classes" section.

  • type-mappings The type-mappings element defines the Java-to-SQL type mappings for a database, along with SQL templates and function mappings. This is described in detail in the "Datasource Customization" section, later in this chapter.

  • entity-commands The entity-commands element allows for the definition of entity creation command instances that know how to create an entity instance in a persistent store. This is described in detail in the "Entity Commands and Primary Key Generation" section, later in this chapter.

  • user-type-mappings The user-type-mappings element defines a mapping of 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 translates a column value to an instance of the user type. Details of the user type mappings are described in the "User Type Mappings" section, later in this chapter.

  • reserved-words The reserved-words element defines one or more reserved words that should be escaped when generating tables. Each reserved word is specified as the content of a word element.



JBoss 4. 0(c) The Official Guide
JBoss 4.0 - The Official Guide
ISBN: B003D7JU58
EAN: N/A
Year: 2006
Pages: 137

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net