Chapter 12. EJB Techniques

In this chapter, we will cover:

  • Exception handling and EJBs
  • Using logging within an EJB
  • Using an interceptor for logging and exception handling
  • Creating your own interceptor
  • Using time within an EJB
  • How to support currency
  • Efficient manipulation of strings

Introduction

Java EE applications address a wide range of application types. The use of specific EJB technologies as addressed in earlier chapters is application-specific. There are techniques, while not necessarily EJB-specific, are useful in many EJB applications. This chapter examines a few of these techniques.

We start with exception handling which is an important aspect of any production application. The failure to handle exceptions cleanly can result in an unreliable application. ...

Get EJB 3.1 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.