Chapter 6. Transactions and security

 

This chapter covers

  • Overview of transaction concepts
  • Container and bean-managed transactions
  • Security concepts
  • Declarative and programmatic security

Transaction and security management are important aspects of any serious enterprise development effort. By the same token, both are system-level concerns rather than true business application development concerns, which is why they often become an afterthought. In the worst-case scenario, these critical aspects of application development are overlooked altogether. Given these facts, you’ll be glad to know that EJB 3 provides functionality in both realms that is robust enough for the most demanding environments, and yet simple enough for those who prefer to focus on developing business logic. Although we have briefly mentioned these features in previous chapters, we haven’t dealt with them in any detail until this chapter.

The first part of this chapter is devoted to exploring the rich transaction management features of EJB 3. We’ll briefly discuss transactions and explore container-managed and bean-managed transactions support in EJB. The remainder of the chapter deals with EJB security features, and you’ll learn about declarative and programmatic security support.

6.1. Understanding transactions

6.2. Container-managed transactions

6.3. Bean-managed transactions

6.4. Exploring EJB security

6.5. Summary