Prev | Next

TOC | Index

J2EETM Developer's Guide
Database Connections


Container-Managed Connections

With container-managed persistence, the entity bean class does not contain the code that connects to a database. Instead, this code is generated by the Application Deployment Tool. Using the tool, you specify the JNDI name of the database in the JNDI Name field of the Deployment Settings dialog box. To access this dialog box, in the Entity tabbed pane of the enterprise bean, click the Deployment Settings button.

The ProductEJB class, for instance, is an entity bean with container-managed persistence. To enable this bean to connect to the example Cloudscape database, you enter jdbc/Cloudscape in the JNDI Name field of the Deployment Settings dialog box.



Prev | Next

TOC | Index


Copyright © 2000 Sun Microsystems, Inc. All rights reserved.