12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Entity beans . . . . . . . . . . . . . . . . . . 87<br />

Find methods and primary key class . . . . . . 88<br />

Create and remove methods . . . . . . . . . . 88<br />

Invoking methods . . . . . . . . . . . . . . . . . 88<br />

Removing bean instances . . . . . . . . . . . . . 89<br />

Using a bean's handle . . . . . . . . . . . . . . . 89<br />

Managing transactions . . . . . . . . . . . . . . . . 90<br />

Getting information about an enterprise bean . . . . 91<br />

Support for JNDI . . . . . . . . . . . . . . . . . . . 92<br />

EJB to CORBA mapping . . . . . . . . . . . . . . . 92<br />

Mapping for distribution . . . . . . . . . . . . . . 93<br />

Mapping for naming . . . . . . . . . . . . . . . . 93<br />

Mapping for transaction . . . . . . . . . . . . . . 94<br />

Mapping for security . . . . . . . . . . . . . . . . 95<br />

Chapter 12<br />

The VisiClient Container 97<br />

Application Client architecture . . . . . . . . . . . . 97<br />

Packaging and deployment . . . . . . . . . . . . 98<br />

Benefits of the VisiClient Container . . . . . . . . 98<br />

Document Type Definitions (DTDs) . . . . . . . . . . 99<br />

Example XML using the DTD . . . . . . . . . . . 99<br />

Support of references and links. . . . . . . . . . . 101<br />

Using the VisiClient Container . . . . . . . . . . 101<br />

VisiClient Container usage example . . . . . . . 102<br />

Running a J2EE client application<br />

on machines not running BES . . . . . . . . . 102<br />

Embedding VisiClient Container<br />

functionality into an existing application . . . . . . 103<br />

Use of Manifest files . . . . . . . . . . . . . . . . 104<br />

Example of a Manifest file . . . . . . . . . . . . 104<br />

Exception handling . . . . . . . . . . . . . . . . . 104<br />

Using resource-reference factory types. . . . . . . 104<br />

Other features. . . . . . . . . . . . . . . . . . . . 105<br />

Using the Client Verify tool. . . . . . . . . . . . 105<br />

Chapter 13<br />

Caching of Stateful Session Beans 107<br />

Passivating Session Beans . . . . . . . . . . . . . 107<br />

Simple Passivation. . . . . . . . . . . . . . . . 107<br />

Aggressive Passivation . . . . . . . . . . . . . 108<br />

Sessions in secondary storage . . . . . . . . . . . 108<br />

Setting the keep alive timeout in Containers. . . 109<br />

Setting the keep alive timeout for a<br />

particular session bean . . . . . . . . . . . . 109<br />

Chapter 14<br />

Entity Beans and CMP 1.1 in<br />

<strong>Borland</strong> Enterprise Server 111<br />

Entity Beans . . . . . . . . . . . . . . . . . . . . 111<br />

Container-managed persistence and<br />

Relationships . . . . . . . . . . . . . . . . . . . 112<br />

Implementing an entity bean . . . . . . . . . . . . 112<br />

Packaging Requirements . . . . . . . . . . . . 112<br />

Entity Bean Primary Keys . . . . . . . . . . . . 113<br />

Generating primary keys from a<br />

user class . . . . . . . . . . . . . . . . . . 113<br />

Generating primary keys from a<br />

custom class . . . . . . . . . . . . . . . . 114<br />

Support for composite keys . . . . . . . . . . 114<br />

Reentrancy . . . . . . . . . . . . . . . . . . . . 114<br />

Container-Managed Persistence in<br />

<strong>Borland</strong> Enterprise Server . . . . . . . . . . . . . 115<br />

BES CMP engine's CMP 1.1 implementation . . 115<br />

Providing CMP metadata to the Container . . 115<br />

Constructing finder methods . . . . . . . . . 116<br />

Constructing the where clause . . . . . . . . 116<br />

Parameter substitution . . . . . . . . . . . . 117<br />

Compound parameters . . . . . . . . . . . . 117<br />

Entity beans as parameters . . . . . . . . . . 117<br />

Specifying relationships between entities . . . 118<br />

Container-managed field names . . . . . . . 119<br />

Setting Properties . . . . . . . . . . . . . . . . . . 120<br />

Using the Deployment Descriptor Editor . . . . . 120<br />

J2EE 1.2 Entity Bean using<br />

BMP or CMP 1.1. . . . . . . . . . . . . . . 120<br />

Container-managed data access support . . . . 121<br />

Using SQL keywords . . . . . . . . . . . . . 122<br />

Using null values . . . . . . . . . . . . . . . 122<br />

Establishing a database connection. . . . . . 122<br />

Container-created tables . . . . . . . . . . . 122<br />

Mapping Java types to SQL types. . . . . . . 123<br />

Automatic table mapping . . . . . . . . . . . . . 124<br />

Chapter 15<br />

Entity Beans and Table Mapping<br />

for CMP 2.0 127<br />

Entity Beans . . . . . . . . . . . . . . . . . . . . . 127<br />

Container-managed persistence<br />

and Relationships . . . . . . . . . . . . . . . . . 128<br />

Packaging Requirements . . . . . . . . . . . . . 128<br />

A note on reentrancy . . . . . . . . . . . . . . . 129<br />

Container-Managed Persistence in<br />

<strong>Borland</strong> Enterprise Server . . . . . . . . . . . . . 129<br />

About the Persistence Manager . . . . . . . . . 129<br />

<strong>Borland</strong> CMP engine's<br />

CMP 2.0 implementation . . . . . . . . . . . . 130<br />

Optimistic Concurrency Behavior. . . . . . . . . 130<br />

Pessimistic Behavior . . . . . . . . . . . . . 131<br />

Optimistic Concurrency . . . . . . . . . . . . 131<br />

Persistence Schema . . . . . . . . . . . . . . . 132<br />

Specifying tables and datasources . . . . . . 132<br />

Basic Mapping of CMP fields to columns . . . 133<br />

Mapping one field to multiple columns . . . . 134<br />

Mapping CMP fields to multiple tables . . . . 135<br />

Specifying relationships between tables . . . 136<br />

Using cascade delete and database<br />

cascade delete . . . . . . . . . . . . . . . . . 139<br />

Database cascade delete support . . . . . . 140<br />

Chapter 16<br />

Using BES Properties for CMP 2.x 143<br />

Setting Properties . . . . . . . . . . . . . . . . . . 143<br />

Using the Deployment Descriptor Editor . . . . . 143<br />

The EJB Designer . . . . . . . . . . . . . . . . 143<br />

J2EE 1.3 Entity Bean . . . . . . . . . . . . . 144<br />

Setting CMP 2.x Properties . . . . . . . . . . . 144<br />

Editing Entity properties . . . . . . . . . . . . . 145<br />

iii

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!