Sun Java System Application Server Enterprise Edition 8.2 Developer's Guide

Configuring the CMP Resource

An EJB module that contains CMP beans requires the JNDI name of a JDBC resource in the jndi-name subelement of the cmp-resource element in the sun-ejb-jar.xml file. Set PersistenceManagerFactory properties as properties of the cmp-resource element in the sun-ejb-jar.xml file.

In the Administration Console, open the Resources component, then select JDBC. Refer to the Sun Java System Application Server Enterprise Edition 8.2 Administration Guide for information on creating a new JDBC resource.

For a list of the JDBC drivers currently supported by the Application Server, see the Sun Java System Application Server Enterprise Edition 8.2 Release Notes. For configurations of supported and other drivers, see Configurations for Specific JDBC Drivers.

For example, if the JDBC resource has the JNDI name jdbc/MyDatabase, set the CMP resource in the sun-ejb-jar.xml file as follows:

<cmp-resource>
   <jndi-name>jdbc/MyDatabase</jndi-name>
</cmp-resource>