web server - Borland Technical Publications
web server - Borland Technical Publications
web server - Borland Technical Publications
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Editing Table and Column properties . . . . . . 145<br />
Entity Properties. . . . . . . . . . . . . . . . . 147<br />
Table Properties . . . . . . . . . . . . . . . . . 149<br />
Column Properties . . . . . . . . . . . . . . . 151<br />
Security Properties . . . . . . . . . . . . . . . 152<br />
Chapter 17<br />
EJB-QL and Data Access Support 153<br />
Selecting a CMP Field or Collection of<br />
CMP Fields . . . . . . . . . . . . . . . . . . . . 153<br />
Selecting a ResultSet . . . . . . . . . . . . . . 154<br />
Aggregate Functions in EJB-QL . . . . . . . . . . 154<br />
Data Type Returns for<br />
Aggregate Functions. . . . . . . . . . . . . . 154<br />
Support for ORDER BY . . . . . . . . . . . . . . 156<br />
Support for GROUP BY . . . . . . . . . . . . . . 156<br />
Sub-Queries . . . . . . . . . . . . . . . . . . . . 157<br />
Dynamic Queries . . . . . . . . . . . . . . . . . . 157<br />
Overriding SQL generated from<br />
EJB-QL by the CMP engine. . . . . . . . . . . . 158<br />
Container-managed data access support . . . . . 159<br />
Support for Oracle Large Objects (LOBs) . . . . 160<br />
Container-created tables . . . . . . . . . . . . 161<br />
Chapter 18<br />
Generating Entity Bean<br />
Primary Keys 163<br />
Generating primary keys from a user class. . . . . 163<br />
Generating primary keys from a custom class . . . 164<br />
Implementing primary key generation<br />
by the CMP engine . . . . . . . . . . . . . . . . 164<br />
Oracle Sequences: using<br />
getPrimaryKeyBeforeInsertSql . . . . . . . . . . 164<br />
SQL Server: using getPrimaryKeyAfterInsertSql<br />
and ignoreOnInsert . . . . . . . . . . . . . . . 164<br />
JDataStore JDBC3: using useGetGeneratedKeys . 165<br />
Automatic primary key generation<br />
using named sequence tables . . . . . . . . . 165<br />
Key cache size . . . . . . . . . . . . . . . . 166<br />
Chapter 19<br />
Transaction management 167<br />
Understanding transactions . . . . . . . . . . . . 167<br />
Characteristics of transactions . . . . . . . . . 167<br />
Transaction support . . . . . . . . . . . . . . . 168<br />
Transaction manager services . . . . . . . . . . . 168<br />
Distributed transactions and<br />
two-phase commit . . . . . . . . . . . . . . . 169<br />
When to use two-phase<br />
commit transactions . . . . . . . . . . . . . . 170<br />
Using multiple JDBC connections for access to<br />
multiple database resources from a single<br />
vendor in the same transaction . . . . . . . 170<br />
Using multiple JDBC connections to the same<br />
database resource in the same transaction 170<br />
Using multiple disparate resources in a single<br />
transaction . . . . . . . . . . . . . . . . . 170<br />
EJBs and 2PC transactions . . . . . . . . . . . 171<br />
Example runtime scenarios . . . . . . . . . 172<br />
Declarative transaction management in<br />
Enterprise JavaBeans . . . . . . . . . . . . . . . 174<br />
Understanding bean-managed and<br />
container-managed transactions . . . . . . . . 175<br />
Local and Global transactions . . . . . . . . . . 175<br />
Transaction attributes . . . . . . . . . . . . . . 176<br />
Programmatic transaction management<br />
using JTA APIs. . . . . . . . . . . . . . . . . . . 177<br />
JDBC API Modifications . . . . . . . . . . . . . . . 178<br />
Modifications to the behavior of the<br />
JDBC API. . . . . . . . . . . . . . . . . . . . 178<br />
Overridden JDBC methods . . . . . . . . . . . 178<br />
Handling of EJB exceptions . . . . . . . . . . . . . 179<br />
System-level exceptions . . . . . . . . . . . . . 179<br />
Application-level exceptions . . . . . . . . . . . 180<br />
Handling application exceptions . . . . . . . . . 180<br />
Transaction rollback. . . . . . . . . . . . . . 180<br />
Options for continuing a transaction . . . . . 181<br />
Chapter 20<br />
Message-Driven Beans and JMS 183<br />
JMS and EJB . . . . . . . . . . . . . . . . . . . . 183<br />
EJB 2.0 Message-Driven Bean (MDB). . . . . . 184<br />
Client View of an MDB . . . . . . . . . . . . . . . 184<br />
Naming Support and Configuration . . . . . . . . . 185<br />
Connecting to JMS Connection Factories<br />
from MDBs . . . . . . . . . . . . . . . . . . . 185<br />
Clustering of MDBs . . . . . . . . . . . . . . . . . 186<br />
Error Recovery . . . . . . . . . . . . . . . . . . . 187<br />
Rebinding . . . . . . . . . . . . . . . . . . . . 187<br />
Redelivered messages. . . . . . . . . . . . . . 188<br />
MDBs and transactions . . . . . . . . . . . . . . . 189<br />
Chapter 21<br />
Connecting to Resources with BES:<br />
using the Definitions Archive (DAR) 191<br />
JNDI Definitions Module. . . . . . . . . . . . . . . 192<br />
Migrating to DARs from previous versions of<br />
<strong>Borland</strong> Enterprise Server . . . . . . . . . . . 193<br />
Creating and Deploying a DAR . . . . . . . . . . . 193<br />
Disabling and Enabling a Deployed DAR . . . . . . 194<br />
Packaging DAR Modules in an Application EAR . . 194<br />
Chapter 22<br />
Using JDBC 195<br />
Configuring JDBC Datasources . . . . . . . . . . . 195<br />
Deploying Driver Libraries . . . . . . . . . . . . 198<br />
Defining the Connection Pool Properties for a<br />
JDBC Datasource . . . . . . . . . . . . . . . . . 199<br />
Getting debug output . . . . . . . . . . . . . . . . 203<br />
Descriptions of <strong>Borland</strong> Enterprise Server's<br />
Pooled Connection States . . . . . . . . . . . . . 203<br />
Support for older JDBC 1.x drivers . . . . . . . . . 204<br />
Advanced Topics for Defining<br />
JDBC Datasources . . . . . . . . . . . . . . . . 204<br />
Connecting to JDBC Resources from<br />
J2EE Application Components . . . . . . . . . . 206<br />
iv