Go...
Welcome
Feeds
JavaOne 2010 - Sunday and Monday
Posted by ccondit on 9/26/10 @ 5:30 PM :: Updated by ccondit on 9/26/10 @ 5:31 PM
Tags :: ::

JavaOne 2010 is over now, and I intend to post a write-up of each session I attended throughout the week. Read on for my impressions of the opening keynote Sunday and the Monday sessions.

Introduction and Opening Keynote

JavaOne and OpenWorld were really two separate events this year, despite being marketed as a combined conference. Those of us who are JavaOne attendees are segregated off by ourselves half a mile from the Moscone convention center at the Hilton. When I tried to get into the opening keynote, I was promptly denied entry, and told that "you people" need to go over to the Hilton and watch it via closed-circuit TV instead. Fortunately, I arrived early enough to make the trek back up the hill and still get a decent seat.

They did at least have the room catered, which turned out to be fortunate since Larry Ellison's keynote address went nearly an hour long. Those watching from Moscone were not so lucky; they had to sit through the whole thing. Oracle definitely doesn't have the same flair for putting on interesting events like Apple does. Perhaps Larry and Steve need to spend some more time together?

As for the content of the keynote, it started with a short introduction, followed by a nearly hour-long advertisement by HP. I wonder how much they paid Oracle for an effectively captive audience? At about 6:45 Larry finally got on stage and started yet another hour-long demo on Exalogic, Oracle's new "cloud-in-a-box" product. I can't say this was particularly interesting, especially since it's all been done before. At least the twitter feeds for #javaone10 and #oow10 were fun to read, even if they were a bit harsh.

When the keynote finally ended, they gave away 10 Kindles and 10 Blu-Ray players to people who actually sat through the whole thing. Unfortunately, since you had to be present to win, it took another hour to draw enough tickets to give away all the prizes. I'm certain they drew at least 250.

The first of 25 sessions I would attend this week was finally over. Hopefully, the rest of the week would be an improvement.

JDK 7 and JavaSE 7

Mark Reinhold gave a very interesting presentation on the future of Java 7 Monday morning, full of technical details and a bit of humor. As has been reported widely by this point, Java 7 will ship in mid-2011, but with a reduced feature set from what was originally intended. Java 8 will ship in late 2012 with the remaining features which didn't make Java 7. This plan was received fairly well by the audience, as I think most of us at this point just want to see something ship before we all retire or start coding .NET 100% of the time.

Some things that will make Java 7 include several small language changes from Project Coin (more on that later), better multi-core support via the Fork-Join framework, and several performance and productivity features from JRockit. Things that wo't make the cut include the Project Jigsaw modularity work and the closure support from Project Lambda. Both of these features still need considerable work before they are ready to include in a Java JSR.

Speaing of JSRs, Oracle has committed to delivering a full set of JSRs for Java 7 and Java 8 to the JCP, ending speculation that the future of Java might be in a perpetual JDK build without a formal specification. Overall, I think this is very good news. It adds some clarity to a process which has become increasingly clouded.

Project Coin

Project Coin is the umbrella project for a wide variety of small languages changes designed to make the Java platform easier for developers to use on a daily basis. This presentation covered about a half-dozen new features which will hopefully be included in Java 7.

Strings in switch

Quite simply, the switch statement now supports using strings in addition to the already support integers and enums.

Binary literals and underscores in literals

This isn't going to change anyone's life, but does make things a bit easier to read when dealing with low-level constants:

int x = 0b1100_0001;
int oneBillion = 1_000_000_000;

Generic type inference (diamond operator)

Instead of typing this:

Map<String,String> map = new HashMap<String,String>();

this works:

Map<String,String> map = new HashMap<>();

This isn't a major win with something this simple, but once the generic parameters become more complex, it makes things much more readable.

Multi-catch

You can now catch several distinct exception types at once:

catch (final IOException | ClassCastException e) {...}

This should save considerably on duplicated catch blocks. In addition, the compiler will now be smart enough to determine that rethrowing a caught exception in this context now works more appropriately:

try { ... } catch (final Exception e) { log(e); throw e; }

This will not automatically cause your method to need to throw Exception, as the compiler can determine which exceptions could have been caught, and because of the final modifier is smart enough to know that no new exception types are being introduced. This will make checked exceptions much less of a pain to deal with.

Try-with-resources (or automatic resource management)

This is, IMO, the most significant change in Project Coin. Those of you who have used C#'s using keyword will no doubt find this familiar:

try (InputStream in = ...; OutputStream out = ...) { ... }

This is essentially shorthand for a try/finally block which closes the streams. It properly handles partial initialization, and captures suppressed exceptions thrown by the close() methods (available via a new helper method on Exception). Under the hood, this functionality is available via a new interface, AutoCloseable, which is a new superinterface of Closeable, but declared to throw Exception instead of IOException. Since interface implementations can narrow the scope of declared thrown exceptions, this allows any class with a close() method to be easily retrofitted to implement AutoCloseable. As of the current JDK builds, JDBC interfaces have been updated to include this functionality as well, greatly simplifying cleanup of database resources.

Tuning SOA Infrastructure

I was expecting this session to be a general overview of common performance issues encountered in SOA, but it turned out to be mostly a WebLogic tuning session. Since we don't use this anywhere, it didn't seem very applicable.

There were a few useful (though obvious) bits of advice, such as don't send huge messages through JMS (who knew?), and avoid calling asynchronous services from synchronous code (such as web UIs). This anti-pattern, while common, causes all sorts of issues such as timeouts, extra overhead, stuck threads, etc. It also significantly complicates fault handling.

Maven 3.x

This session talked about a lot of new features which are coming in Maven 3.0, which is going to be available soon. The current roadmap calls for Maven 3.0 to be released on or about October 1, with m2eclipse 1.0 arriving 6-8 weeks later.

Much of the work for Maven 3 has been under the covers, doing such things as unifying the plugin model used by Maven and several other projects Sonatype works on, such as Nexus and Tycho. The Maven dependency resolution code has been abstracted out into a standalone library, called Aether, which can be used in other applications to automatically fetch Maven artifacts from repositories. This could be an interesting approach to server deployment.

User-visible features include the Maven shell, which provides a very fast, reactive interface to building projects, and Maven polyglot, which will soon allow writing Maven project files in other languages.

JavaOne Keynote

The JavaOne keynote address Monday night was actually fairly good. Doug Fischer from Intel gave a short presentation on Java performance improvements on the latest generation of Intel processors and then it was on to Thomas Kurian from Oracle. Much of the information presented was also a part of the Java 7 session earlier in the day (in fact I think they worked from some of the same slides).

The keynote concluded with Kurian asking everyone to put on the T-shirts we had been given upon entering, which stated simply "I am the future of Java". The message was clear; developers are the heart and soul of the Java community and Oracle knows it.

JavaSE Q&A BOF

The first BOF (Birds of a Feather) session I attended, the JavaSE Q&A was pretty interesting, as many of the lead developers on the project were present to answer questions. There were a few general questions related to garbage collection, but more on the future of the platform and what will become of JRockit now that Oracle owns both of the major JVM implementations...

Neither product is going away, at least in the short term, but since there are now more developers at Oracle who are familiar with the HotSpot code base, that will become the long term product, with major features and performance improvements ported to it from JRockit. This is good news for the Java development community at large, as we will gain some new tools (specifically the Mission Control product for JRockit) in the official JDK.

There were also some questions on the future of OpenJDK. In short, no major changes are expected, as the Oracle management appears to understand the value of maintaining that as open source.

CXF vs. Axis BOF

The second BOF of the evening, this turned out to be a tech demo illustrating a common Hello World service using both CXF and Axis, two leading web service frameworks. Axis has been around a lot longer, but is starting to show its age, while CXF is the newcomer, but has a cleaner, less intrusive design.

Conclusion: Use CXF.

DI Flavors in Spring 3 BOF

In the final BOF of the evening, we were treated to a demo of some of the new configuration flavors available in Spring 3. In addition to the traditional XML-based configuration, Spring 3 can be configured using custom namespaces, annotations (both custom and JSR-based), and even pure Java code with no XML at all. The presenter gave several good use cases for each approach, and even gave examples of combining the different methods to achieve more flexible configuration.

10:30pm, and day one of JavaOne had finally come to a close. Stay tuned for more summaries of JavaOne 2010!

Comment on this article

Comments are closed for this post.