Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Upgrade and Migration Guide

- Previous: JDBC
- Next: Application Assembly

## Enterprise Java Beans

The iBank application uses a variety of Enterprise Java Beans.

### Entity Beans

Bean-managed persistence (`Customer` bean): allows us to test the following:

- JNDI lookup of initial context

- Pooled data source access via JDBC

- Definition of a BMP custom finder (`findByCustUsername()`)

Container-managed persistence (`Account` and `Branch` beans): allow us to test the following:

- Object/Relational mapping with the development tool and within the deployment descriptor

- Use of composite primary keys (`Account`)

- Definition of custom CMP finders (with the `Account` bean, and its `findOrderedAccountsForCustomer()` method). This is the occasion to look at differences in declaring the query logic in the deployment descriptor, and also to have a complex example returning a collection of objects.

### Session Beans

Stateless session beans: `InterestCalculator` allows us to test the following:

- Using and deploying a stateless session bean

- Calling a business method for calculations

Stateful session beans: `BankTeller` allows us to test the following:

- Looking up various interfaces using JNDI and initial contexts

- Using JDBC to perform database queries

- Using various transactional attributes on bean methods

- Using container-demarcated transactions

- Maintaining conversational state between calls

- Business methods acting as front-ends to entity beans (e.g., the “`getAccountSummary()`” method)

- Previous: JDBC
- Next: Application Assembly

- © 2010, Oracle Corporation and/or its affiliates