Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You want to verify your container-managed transactions.
Transaction-based programming can be complex, which is one of the reasons for the J2EE container-managed transaction feature. The goal of this feature is to allow you to specify transactions without having to code all the dirty details. The simplicity of container-managed transactions often leaves programmers feeling as though it were “too easy,” and they sometimes worry that the application will not behave as expected under a large, concurrent load. Because they know that transaction-based programming is complex, they feel as though they should have to “do more” to add transactional behavior to an application. Testing container-managed transactions is not complex at all, once you put some trust in the container. This recipe helps you focus on testing your work, and not the work of the container.