Skip to main content

Get the Balance Right

Posted by editor on April 30, 2007 at 6:30 AM PDT


An accord on closures?

The "closures debate" in the Java community -- recently summarized in a DeveloperWorks article by Brian Goetz -- is really a tangle of several debates. We might well be discussing three very different things:

  1. Whether to add closures to the Java language
  2. What specifically a closures proposal should address
  3. The specific syntax of a closures proposal

Today's news is that at least one of these has been fundamentally addressed.
Artima reports that consensus has been reached among the competing JDK 7 closures proposals. They cite a blog entry from Neal Gafter, A Consensus Closures JSR Proposal, which he says "comes as close to achieving consensus as I believe possible. All but one of the authors of the three widely-discussed closures proposals have agreed to support it." The proposal defines the problem to be solved but does not mandate a specific solution, though it does offer Closures for Java as an example solution.

So, according to Gafter, an agreement has been reached on what the problem is and what a closures JSR will try to address. That's number 2 on the list above. The next question for the group to consider will be the specific form of their proposal, which is debate #3. Assuming that is resolved and then brought to the community in the form of a draft JSR, it will be up to the JCP Executive Committee (and, really, to the community as a whole) to answer the first question: do we really even want this at all?

2-3-1 might seem a strange way to go about it, but it's possible the closure proponents are addressing the problems in order of difficulty. Rather than get consensus from everyone on the need for closures, they'll get the closure proponents to at least agree on a common agenda, see if they can develop a concrete proposal amongst themselves, and then see if, armed with specifics, they can sway some/most/all of the closure skeptics.



Also in Java Today,

the Direct Web Remoting project has released the long-awaited version 2.0. DWR 2.0's marquee feature is "Reverse Ajax" (explained in a java.net feature article), and also features a JavaScript Proxy API to dynamically generate JavaScript from a Java API. Security improvements help guard against cross-site request forgery and cross-site scripting attacks. Other new features include a much expanded WAR file, support for Spring namespaces and Guice, Jetty continuations, servlet session timeout support, new annotations, and more.

Is EE the right hammer for every nail? Dan Creswell's blog Victims of J2EE Success criticizes some EE developers for assuming an incorrect set of beliefs, namely that "there is nothing beyond the database, POJOs focused purely on business logic, this is distributed programming, Ops is someone elses problem, [and you just] deploy more or bigger boxes to scale." He goes on to say "once you're beyond a certain level of challenge the J2EE way of thought and patterns of design don't work," and lists a series of language/framework-agnostic traits that developers need to handle new and challenging enterprise work.


David Van Couvering looks at an underappreciated hazard of JPA in today's Weblogs. In JPA and Rollbacks - Not Pretty, he writes,
"we all want our interactions with the database to be successful. And most demos and code samples have everything going hunky dory. But what happens if they're not? What if you or the database needs to roll back the transaction? With JPA, if you're not careful, things can get pretty ugly."

Kirill Grouchnikov presents more GUI ideas in Borrowing from Vista - part II.
"This is the first part in a series about borrowing UI ideas from Vista. This time i'm borrowing the smart scroll on trees."

Finally, Kohsuke Kawaguchi has an update on a
JAX-WS RI extension for JSON.
"Jitu and I have been working on the JAX-WS JSON extension, which is a JAX-WS RI extension that lets you write one code and have it handle both SOAP and JSON requests. I just posted version 1.1 release of this extension."


This week's Spotlight is on Web Services Interoperability Technology (WSIT) and Project Tango, two efforts focused
on delivering interoperability between Java EE and .Net? Wondering how to use them? The next Ask the Experts session spotlights these topics, allowing you to post your questions and get answers from Sun experts Arun Gupta, Harold Carr, and Marek Potociar. This session runs from April 30 through May 4.


Today's Forums kick off with a pretty broad question from
ryujin:
Java Cluster, whats the best way?
"I am in the process of setting up a cluster of Linux computers at Southern Utah University and wanted Java support, what are some of the currently used ways to invoke a Java cluster for Java programs. I was hoping to set it up to use the now native java concurrency rather than javampi. What is the best way to do it?"

oleg_sukhodolsky has been working through the cause of a tricky bug in
Re: Major Issue with AWT & JNI?
"I've debugging the code a little and found that in the first case (selecting internal frame), JDesktopPane changes z-order of this internal frame (Container.setComponentZOrder() is called). And for now this method always remove lightweight container which contains heavyweights and do not try to re-stack them (see Container.isRemoveNotifyNeeded()). So, the problem is (theoretically) fixable, but someone needs to change Container and test this change."

Posting to an inappropriate forum (the "Big Answer" discussion of the GPL'ing of Java), shanezz apparently needs someone to do his or her homework and develop a
Java Calculator (Basic)
"Hi can anyone help me on this i have to do a basic calculator with Java that contain two integer fields and an array,results. It should be capable of adding 2 numbers, subtracting 2 numbers, dividing 2 numbers, and multiplying 2 numbers, and giving the remainder after division of the two integer numbers, any help would be greatly appreciated, thank you."


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.

An accord on closures?