Advertisement

Testing in an Embeddable EJB Container

  • Jonathan Wetherbee
  • Chirag Rathod
  • Raghu Kodali
  • Peter Zadrozny
Chapter

Abstract

As with all mission-critical software, EJB components must be well tested before they are deployed into a production environment. The finest level of granularity in an EJB is its method; so proper unit tests must test each method of each EJB in isolation. For stateless Session beans, this is typically sufficient. Because a stateful Session bean may also contain state, full coverage additionally requires inclusion of more coarse-grained scenarios as well, involving sequences of method calls. When a stateless Session bean effectively stores “state” information in a database, as through JPA entities, multistep test scenarios are generally also required. In this chapter, we will look at both single-method and multi-method tests, covering stateless and stateful Session beans serving primarily as service interfaces for JPA-based operations.

Keywords

Customer Order Java Library JUnit Test Database Connection Public Void 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Jonathan Wetherbee 2013

Authors and Affiliations

  • Jonathan Wetherbee
    • 1
  • Chirag Rathod
    • 2
  • Raghu Kodali
    • 1
  • Peter Zadrozny
    • 1
  1. 1.CAUnited States
  2. 2.BangaloreIndia

Personalised recommendations