This post originated from an RSS feed registered with Java Buzz
by Matt Raible.
Original Post: Chapter 10 on Transactions off to Tech Edit
Feed Title: Raible Designs ~ We Build Web Apps
Feed URL: http://static.raibledesigns.com/500.html
Feed Description: Opinions and tips on how to build web applications using Java. Currently using Hibernate, Struts, XHTML, CSS, Ant, JUnit and XDoclet.
I had quite a run this past weekend and managed to crank out the last 18 pages for Chapter 10 between Saturday night and Sunday evening. I wanted to finish before leaving for ApacheCon in Vegas, so it was nice to reach that goal.
I think you'll enjoy this chapter. Spring's Transaction API is very rich and makes it very easy to use transactions in your applications. The TransactionTemplate is nice for programmatic transaction demarcation, but the TransactionProxyFactoryBean makes it even easier - allowing you to define all your transaction attributes in XML. Furthermore, you can use Commons Attributes or JDK 5 Annotations - both which work very well. If you want to use JDK 5 Annotations, you'll have to checkout and build Spring's "samples" module from CVS. It's "tiger" sub-project has the Annotation classes you'll need, as well as examples in the "test" directory.
I'm still amazed at how Spring makes J2EE development so much easier. If the J2EE 5 spec doesn't simplify J2EE (like it's supposed to), it's nice to know that Spring will continue to do so.
BTW, Spring 1.1.2 was released on Sunday. If you're stuck using JDK 1.3, there's a couple of bugs and you might want to grab a nightly build (if you need to upgrade). If you can wait, 1.1.3 should be out in the next couple of weeks.