Part I Development Tasks and Tools
1. Setting Up a Development Environment
3. Using Ant with Enterprise Server
Part II Developing Applications and Application Components
7. Using the Java Persistence API
8. Developing Web Applications
9. Using Enterprise JavaBeans Technology
10. Using Container-Managed Persistence
Enterprise Server Support for CMP
The Mapping Deployment Descriptor File
Automatic Primary Key Generation
Fixed Length CHAR Primary Keys
Automatic Schema Generation for CMP
Automatic Database Schema Capture
Using the capture-schema Utility
Version Column Consistency Checking
Configuring Queries for 1.1 Finders
CMP Restrictions and Optimizations
Restrictions on Remote Interfaces
No Support for lock-when-loaded on Sybase
Set RECURSIVE_TRIGGERS to false on MSSQL
13. Developing Lifecycle Listeners
Part III Using Services and APIs
14. Using the JDBC API for Database Access
15. Using the Transaction Service
16. Using the Java Naming and Directory Interface
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. See cmp-resource in Sun GlassFish Enterprise Server v3 Application Deployment Guide.
In the Administration Console, open the Resources component, then select JDBC. Click the Help button in the Administration Console for information on creating a new JDBC resource.
For a list of the JDBC drivers currently supported by the Enterprise
Server, see the Sun GlassFish Enterprise Server v3 Release Notes. For configurations of supported and other drivers, see
Configuration Specifics for JDBC Drivers in Sun GlassFish Enterprise Server v3 Administration Guide.
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>