List of Tables
Chapter 1. What’s what in EJB 3
Table 1.1. Major EJB 3 component services and why they are important to you. The persistence services are provided by the
Chapter 2. A first taste of EJB
Table 2.1. Major metadata annotations introduced in Java EE. Although primarily geared toward EJB, these annotations apply
to Java EE components such as servlets and JSF managed beans as well as application clients. Annotations defined in the javax.annotation.*
package are defined by the Common Metadata Annotations API (JSR-250).
Chapter 3. Building business logic with session beans
Table 3.1. Lifecycle callbacks are created to handle lifecycle events for an EJB. You can create these callback methods either
in the bean class or in an external interceptor class.
Table 3.2. The main differences between stateless and stateful session beans
Chapter 4. Messaging and developing MDBs
Table 4.1. JMS session acknowledge modes. For nontransacted sessions, you should choose the mode most appropriate for your
project. In general, Auto-acknowledge is the most common and convenient. The only other mode supported with MDB is Dups-ok-acknowledge.
Table 4.2. Commonly used message selector types. The selector syntax is almost identical to the SQL WHERE clause.
Chapter 5. Learning advanced EJB concepts
Table 5.1. You can use javax.ejb.EJBContext to access runtime services.
Table 5.2. The @Resource annotation can be used to inject resources. The parameters in the table are not used regularly and
are included for your reference in case you need them.
Table 5.3. Differences between lifecycle and business method interceptors. Lifecycle interceptors are created to handle EJB
lifecycle callbacks. Business method interceptors are associated with business methods, and are automatically invoked when
a user invokes the business method.
Chapter 6. Transactions and security
Table 6.1. A transaction may be either local or global. A local transaction involves one resource and a global transaction
involves multiple resources.
Table 6.2. Effects of transaction attributes on EJB methods
Table 6.3. The possible values of the javax.transaction.Status interface. These are the status values returned by the UserTransaction.getStatus
Chapter 7. Implementing domain models
Table 7.1. Data types allowable for a persisted field/property
Table 7.2. Domain relation types and corresponding annotations
Table 7.3. Elements available in the @OneToOne, @OneToMany, @ManyToOne, and @ManyToMany annotations
Chapter 8. Object-relational mapping
Table 8.1. The impedance mismatch: obvious differences between the object and relational worlds
Table 8.2. The EJB 3 JPA supports three different inheritance strategies. The table-per-class choice is optional and the worst
of these strategies.
Chapter 9. Manipulating entities with EntityManager
Table 9.1. The EntityManager is used to perform CRUD operations. Here are the most commonly used methods of the EntityManager
Table 9.2. The EntityManager factory is used to create an instance of an application-managed EntityManager.
Table 9.3. Effects of various cascade type values.
Table 9.4. Behavior of loading of associated entity is different for each kind of association by default. We can change the
loading behavior by specifying the fetch element with the relationship.
Table 9.5. Callbacks supported by JPA and when they are called
Chapter 10. Using the query API and JPQL to retrieve entities
Table 10.1. Comparing a JDBC basic query to a JPA query. The JDBC SQL query returns the data in the database table whereas
the JPQL query returns JPA entities.
Table 10.2. The EntityManager interface provides several methods to create queries using either JPQL or native SQL statements.
Table 10.3. The javax.persistence.Query interface enables developers to set parameters for a query, set pagination properties,
control the flush mode, and retrieve results for the query.
Table 10.4. Defined flush modes for persistence providers and how the flush mode affects the results of a query
Table 10.5. You can use the setHint method of the Query interface to specify query hints to the persistence provider. Common
query hints are supported by two popular ORM frameworks.
Table 10.6. Statement types supported by the Java Persistence Query Language
Table 10.7. JPQL keywords reserved by the specification. You are not allowed to give any of your variables these names.
Table 10.8. Operators supported by JPQL
Table 10.9. Results of boolean operations involving null
Table 10.10. JPQL String functions
Table 10.11. JPQL arithmetic functions
Table 10.12. JPQL temporal functions
Table 10.13. JPQL aggregate functions
Chapter 11. Packaging EJB 3 applications
Table 11.1. Enterprise Java applications need to be assembled into specific types of JAR files before they can be deployed
to an application server. These are the available module types as specified by Java EE
Table 11.2. A standard archive may load classes either packaged inside it or from any other archives it is dependent on.
Table 11.3. One-to-one mapping between annotations and XML descriptor elements
Table 11.4. Vendor-specific deployment descriptors for popular application servers
Table 11.5. Mapping of persistence annotations to associated deployment descriptor elements
Chapter 12. Effectively integrating EJB 3 across your application tiers
Table 12.1. An EJB can be accessed from different types of classes in the web tier. Only managed classes can use dependency
injection; nonmanaged application components have to use JNDI lookup to obtain a reference to a session bean.
Chapter 14. Migrating to EJB 3
Table 14.1. EJB 2 required many interfaces that needed to extend EJB-specific interfaces. EJB 3 makes the home interface optional.
Table 14.2. EJB 2 required implementation of several lifecycle methods. If you implemented any of your application’s business
logic in any of these methods, then you can use the corresponding methods in EJB 3 to migrate that business logic.
Table 14.3. The use of DataSource in EJB 2 was very complex and has been simplified in EJB 3 by using dependency injection.
Table 14.4. The use of JMS objects in EJB 2 was also very complex and has been simplified in EJB 3 by using dependency injection.
Table 14.5. EJB 2 required implementations of many lifecycle methods. EJB 3 allows you to define lifecycle callback methods.
This table lists the corresponding methods for EJB 3 JPA that you can use to migrate an entity bean’s lifecycle methods.
Table 14.6. Comparison of application code to persist an instance of an entity with two popular O/R frameworks
Chapter 15. Exposing EJBs as web services
Table 15.1. Specifications Java EE 5.0 builds on to support web services
Table 15.2. Feature comparison of Java web services to EJB 3 web services
Table 15.3. Elements of @WebServiceRef
Chapter 16. EJB 3 and Spring
Table 16.1. Spring classes available for using JPA
Table 16.2. Important JpaTemplate methods provided by Spring
Table 16.3. Spring support classes for building Spring-enabled EJBs
Appendix A. RMI and JNDI
Table A.1. Common JNDI environment properties required for creating an initial context to connect to a remote JNDI service
provider in a Java EE environment. These are specified either as system properties in the jndi.properties file in the JVM
at the client side or as Property object entries passed to the constructor in your Java code. Of these options, a properties
file is recommended as it improves maintainability of your application code.
Appendix B. Reviewing relational databases
Table B.1. Common column data types and their Java equivalents