Sun GlassFish Enterprise Server 2.1 Application Deployment Guide

cmp-resource

Specifies the database to be used for storing CMP beans. For more information about this element, see Configuring the CMP Resource in Sun GlassFish Enterprise Server 2.1 Developer’s Guide.

Superelements

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

Subelements

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

Table A–30 cmp-resource Subelements

Element 

Required 

Description 

jndi-name

only one 

Specifies the absolute jndi-name of a JDBC 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.

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.