Skip to Content
Expert One-on-One™ J2EE™ Development without EJB™
book

Expert One-on-One™ J2EE™ Development without EJB™

by Rod Johnson, Juergen Hoeller
June 2004
Intermediate to advanced
576 pages
18h 22m
English
Wrox
Content preview from Expert One-on-One™ J2EE™ Development without EJB™

Chapter 9. Transaction Management

Transactions are central to any enterprise application.

Transaction management in J2EE applications is traditionally associated with EJB. Container Managed Transactions (CMT) is the most compelling value proposition of Stateless Session Beans (SLSBs). Many J2EE applications use local SLSBs purely for transaction demarcation, needing no other EJB services.

This chapter will take a fresh look at transaction strategies. We'll see that EJB is just one way of managing transactions in J2EE applications, and that there are simpler alternatives that are more appropriate for many applications.

We'll look at JTA, the core J2EE API that EJB CMT serves to access, and how we can leverage JTA without EJB. We'll also consider whether JTA is always appropriate, and when local (resource-specific) transactions are appropriate.

We'll consider transaction management with popular O/R mapping tools such as JDO and Hibernate, and re-examine some common but questionable assumptions of J2EE orthodoxy, such as the belief that applications commonly use more than one transactional resource. We'll try to approach transaction management—often considered a dark art—through the values of simplicity, productivity, and object orientation that we've discussed in previous chapters.

This chapter doesn't define transactions, isolation levels, ACID characteristics, or other basic concepts. Please see, for example, Chapter 5 ("Concurrency") of Martin Fowler's Patterns of Enterprise Application ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Advanced JavaServer Pages™

Advanced JavaServer Pages™

David M. Geary

Publisher Resources

ISBN: 9780764558313Purchase book