Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 13. Testing J2EE applications > Test container-managed transactions

13.6. Test container-managed transactions

Problem

You want to verify your container-managed transactions.

Background

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.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial