AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Java transaction management12/20/2023 ![]() I don't discuss the XA patterns as extensively as the others because they are covered elsewhere, though I do provide a simple demonstration of the first one. Note that only the first three patterns involve XA, and those might not be available or acceptable on performance grounds. The patterns are all architectural, or technical, as opposed to business patterns, so I don't focus on the business use case, only on the minimal amount of code to see each pattern working. The patterns are also roughly in reverse order of runtime cost (starting with the most expensive). As you move down the list, more caveats and limitations will apply. ![]() I'll present the patterns in reverse order of safety or reliability, starting with those with the highest guarantee of data integrity and atomicity under the most general circumstances. To help you understand the considerations involved in various approaches to distributed transactions, I'll analyze seven transaction-processing patterns, providing code samples to make them concrete. It may come as a welcome surprise, then, that a certain class of applications can avoid the use of XA altogether. Even with this support, however, XA is expensive and can be unreliable or cumbersome to administrate. ![]() The Spring Framework's support for the Java Transaction API (JTA) enables applications to use distributed transactions and the XA protocol without running in a Java EE container. In this JavaWorld feature, SpringSource's David Syer guides you through seven patterns for distributed transactions in Spring applications, three of them with XA and four without. The optimum implementation depends on the types of resources your application uses and the trade-offs you're willing to make between performance, safety, reliability, and data integrity. ![]() While it's common to use the Java Transaction API and the XA protocol for distributed transactions in Spring, you do have other options. ![]()
0 Comments
Read More
Leave a Reply. |