Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Developer's Guide

- Previous: cmp-field-mapping
- Next: cmr-field-mapping

## cmp-resource

Specifies the database to be used for storing CMP beans. For more information about this element, see Configuring the CMP Resource.

### Superelements

enterprise-beans (`sun-ejb-jar.xml`)

### Subelements

The following table describes subelements for the `cmp-resource` element.

Table A–29 `cmp-resource` Subelements

Element | Required | Description
--- | --- | ---
jndi-name | only one | Specifies the absolute `jndi-name` of a JDBC resource or Persistence Manager resource.
default-resource-principal | zero or one | Specifies the default runtime bindings of a resource reference.
property (with subelements) | zero or more | Specifies a property name and value. Used to configure `PersistenceManagerFactory` properties if the `jndi-name` subelement refers to a JDBC resource.
create-tables-at-deploy | zero or one | If `true`, specifies that database tables are created for beans that are automatically mapped by the EJB container.
drop-tables-at-undeploy | zero or one | If `true`, specifies that database tables that were automatically created when the bean(s) were last deployed are dropped when the bean(s) are undeployed.
database-vendor-name | zero or one | Specifies the name of the database vendor for which tables can be created.
schema-generator-properties | zero or one | Specifies field-specific type mappings and allows you to set the `use-unique-table-names` property.

- Previous: cmp-field-mapping
- Next: cmr-field-mapping

- © 2010, Oracle Corporation and/or its affiliates