Skip to main content

Mayor of Simpleton

Posted by editor on August 31, 2006 at 6:36 AM PDT


A keep-it-simple approach to managing transactions

The basics of the transaction problem -- the need for the steps of a transaction to either all succeed or to fail and make no changes -- are pretty well understood. What can be tricky is deciding now how to solve the problem, but where. One option is the bulky application server, which manages and coordinates transactions, as long as you code your applicaiton the way the appserver wants you to. Another is to use the Java Transcation API, but as authors Binildas C. A. and Sowmya Hubert point out, "if [...] you go for direct JTA API integration at the application code level, you don't need to pay for the additional server infrastructure, but you may end up with business logic mixed with infrastructure-level code."

In today's Feature Article, they offer a third way, combining the darlings of the "lightweight" enterprise Java world, Hibernate and Spring, with JOTM, the Java Open Transaction Manager. In JOTM Transactions In Spring And Hibernate, they consider the case of travel reservations involving separate systems for flights, hotels, and cars, and show a strategy that not only provides a lightweight approach to transactional integrity, but also is sufficiently component-based to allow each of the pieces to be used separately, e.g., to just make a car reservation.


Today's Forums, offer some significant contrarian views to two of the hottest recent topics: open sourcing Java and bringing closures to Java.
In
Re: Closures and Swing, Shai Almog argues for inner classes over closures:
"Anonymous inner classes are a shorthand for class declarations, so they have very low impact... They have no ripple effect of complexity through the language since you don't have to add methods to support them or additional declarations. Closure usage is arguably simple but it introduces brand new constructs and concepts into the language that people have to understand... Closures hide some syntax from the user of the method while creating a unique syntax for the method implementer, it would require an overhaul of every API in Java to support this for advantages that are really trivial and unnecessary in most cases."

Meanwhile, weberjn asks if an open-source Java isn't just asking for a rival to fork the language, writing in
Microsoft and a WFC killer app:
"If Java were opensourced, Microsoft [would be] free to create a non-compatible Java (e.g. resurrect Windows Foundation Classes). None of the currently discussed licenses, not even the GPL, prohibits this. (And if Sun were to create a special license that would prohibit forking and creating non compatible versions, this wouldn't be a real open source license.) So, what if Microsoft put a swing-less, WFC-resurrected JVM into all Windows installations _and_ included some real killer apps written against this JVM? Then everybody would use the non-Sun-compatible MS JVM and nobody would bother to download the Sun JVM. With time even Eclipse would be written against this JVM. Imagine enough users complaining that Eclipse wouldn't run with the JVM on their machines."


Evan Summers declares he's In Love with Java5, featured in today's Weblogs. "Shai suggests 'Java5 language changes were a bad idea.' Personally i'm in love with Java5's conveniences, and could never give up these new found pleasures. So people are banging on about closures right now. Actually there's only one thing more i want in the Java language, and then i can be truely happy. And that's toolable reflection on fields, methods and properties."

Tim Boudreau is going the make-your-own-conference route in

Creating a Mini-Unconference - request for ideas:
"For NetBeans Day Seattle (September 6 - it's free), we have a new entry on the agenda: This Is Not A Conference - basically a mini-unconference in an hour. It's something new, and I'm looking for theme ideas and any other sort of brainstorming on what this should look like."

In
JAX-WS versions, Doug Kohlert says
"With the announcement of JAX-WS 2.1 MR, it is apparent that versioning JAX-WS web service is important."


Topping off the Java Today section,
the still-incubated JSF Extensions project, also known as Dynamic Faces or DynaFaces, "hosts development of software that extends the capability of the JavaServer Faces specification, including revolutionary, world class, support for using AJAX and JSF." As Ed Burns notes in his blog Introducing Project Dynamic Faces, the project is being developed under the CDDL license, and has a number of live demos of DynaFaces in action.

Artima's Leading-Edge Java author, Frank Sommers, interviews Tim Boudreau in The Future of NetBeans, Part I, in which they discuss the contents of the current NetBeans 5.5 and the upcoming 6.0, including on-the-fly compilation and Jackpot for code transformation. He also talks about differences between NetBeans and Eclipse and their communities. The latter prompted ONJava blogger Robert Cooper to take issue in The Future of NetBeans... and I hate the spin, which calls for fewer new features and better usability.

Peter Korn discusses NASA's Accessibility Swing Components: "NASA's Johnson Space Center Learning Technologies have been working for a while on making science accessible to people with vision impairments. In particular, Dr. Robert Shelton has developed the Math Description Engine for programatically describing (in text) and conveying (in audio) 2 dimensional mathematical equations. MDE consists of a set of reusable Java classes, and several embeddable Swing GUI elements (like the CartesianGraph component) that can be embedded in Java applications that want to render accessible 2D graphs..."


In today's java.net
News Headlines
:

Registered users can submit news items for the href="http://today.java.net/today/news/">java.net News Page using our
news submission
form
. All submissions go through an editorial review before being
posted to the site. You can also subscribe to the href="http://today.java.net/pub/q/news_rss?x-ver=1.0">java.net News RSS
feed.


Current and upcoming Java
Events
:

Registered users can submit event listings for the href="http://www.java.net/events">java.net Events Page using our href="http://today.java.net/cs/user/create/e">events submission form.
All submissions go through an editorial review before being posted to the
site.


Archives and Subscriptions: This blog is delivered weekdays as
the Java
Today RSS feed
. Also, once this page is no longer featured as the
front page of java.net it will be
archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.

A keep-it-simple approach to managing transactions