CHAPTER 13
Testing in an Embeddable EJB Container
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, ...
Get Beginning EJB 3: Java EE 7 Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.