-
Book Overview & Buying
-
Table Of Contents
EJB 3 Developer Guide
By :
Up to now our examples have, for the most part, used transactions by default. Most of our examples have used container-managed transactions. As the name suggests, the transaction lifecycle is controlled by the EJB container. Container-managed transactions use the Java Transaction API, or JTA. Container-managed transactions have a default start and end point, however it is possible to configure these as we shall see later in this chapter. Java SE applications, which run outside an EJB container and so do not have JTA available, must use resource-local transactions. Resource-local transactions use the EntityManager interface. The application uses EntityManager methods to explicitly start and end transactions. We saw an example of this in Chapter 6.
A transaction is a sequence of one or more steps that add, modify, or delete persistent data. Typically the data is persisted to a database. All steps must succeed in which case the transaction succeeds or is committed. If any one step...
Change the font size
Change margin width
Change background colour