Blog

JavaOne 2008 Day One

07 May, 2008
Xebia Background Header Wave

We’re here at the JavaOne Conference in San Francisco. Today the JavaOne conference kicked off. The coming 75 hours are packed with Java, Java and more Java! To give an impression of what we’re seeing here, we will provide you with a daily blog.
Today’s higlights included:

  • SCA (service component architecure)
  • GlassFish
  • JavaFX
  • Effective Java and defective Java

Mischa and Erik Jan about JavaFx Rocks
Amy Fowler and Shannon Hickey showed in their presentation how you can easly create visually rich Swing applications using JavaFX.
The new JavaFX SDK which will be released in June offers you the ablity to create function callbacks, binding of variables, sequences and scene graphs.
To give you an example of what you can do with all of this, here are some small examples:
Callbacks

function sq(n:Number): Number {n * n;}
var f = sq;

Binding

var x = 10;
var y = bind x + 100;
x = 50;
y == 150; // true

Sequences
Single object equal to Sequence of 1 object

1 == [1] // returns true

Series notation

var days = [1..31];

Slices via syntax and predicate

var week1 = days[1.. 0];

Insert/delete

delete 1 from days; // result is [2..31]

Mixing components and scene graph

var logo = ImageView = ImageView {
    x: bind (canvas.width – logo.image.width)/2
    y: bind (canvas.height - logo.image.height)/2 - 10
    image: Image {
        url:"{__DIR__}/resources/javacup.png"}
    }
    effect: DropShadow {
        offsetX:2
        offsetY:2
        radius:2
        color:Color.GRAY
    }
};

In this last example we’re mixing Java2D with Swing.
We’re looking forward to using the new JavaFX features to play with.
Jeroen about Effective Java and defective Java
Sun has a special title for the speakers who have previously received high marks on their presentations, the Java Rock Stars. Today we had multiple Rock Stars on stage, from the real rock-star Neil Young in the keynote, to Joshua Bloch and Bill Pugh in the Technical Sessions.
Joshua Bloch talked about his newly released book "Effective Java Reloaded". In this book he has revamped a lot of the examples, and he has added numerous Java5 related things. The main additions are the Concurrency chapter, which replaces the Threading chapter and which has been updated to include java.util.concurrent, to the Generics and Enums chapters. He threw in a lot of cool code examples which we of course can’t withhold you. The one example I found most interesting was a Lazy Initialization example with an old idiom re-introduced.
When we started out programming Java, you soon learned that when you do lazy initialization, you should never use Double Checked Locking because it doesn’t work. However, with the advent of the Java5 Memory Model, the Double Checked Locking Idiom finally works correctly. The code sample he showed was the following:

public class DoubleChecked {
    private volatile Object field;
    public Object getField() {
        Object result = field;
        if (result == null) {
            synchronized (this) {
                result = field;
                if (result == null) {
                    field = result = initialize();
                }
            }
        }
        return result;
    }
    private Object initialize() { ... }
}

What needs to be stressed is that the instance field should be volatile for this to work correctly. This example all other examples can be found in his new book, a definite must-read!
Bill Pugh on the other hand talked about Defective Java code. Bill is the creator of the FindBugs project, and is always looking for new bugs and new bug patterns. He announced the FindBugs bug competition, for which the rules are pretty simple. You only need to submit your best bug. If the FindBugs team considers it a plausible bug and it doesn’t take too long to write a detector, they will write one for you. You can also submit your own detector if you want. The submitter of the best bug wins $200, the three runners up will receive $100. Not bad, I’ll surey look through our own codebases and see whether we can find some good bug for them! Because as Bill says: "Don’t assume that any mistake is so unique that no one else could have made it"…
Marco about his day
Prologue
Last year I visited JavaPolis in Antwerp, Belgium and although not all sessions were worth my time, it left me with a positive feeling. So, being told by my esteemed co-workers that JavaOne absolutely trumps the aforementioned JavaPolis, I am psyched to see what this conference will bring me. My main focus will be SOA, since that holds the most interest for me, but I will spend some time on other tracks as well. As I’m here to learn, I’ll try to visit those sessions that hopefully will teach me the most – although I’ll also visit some that will make me feel smart because I already know everything they talk about. Hey, self esteem is important, my momma told me so!
Keynote
Starting off with a bang we were treated with a very professional opening, including dancers last seen in an old Michael Jackson video-clip and some kind of non-lethal catapult used to shoot t-shirts at innocent visitors. The key topics of the coming conference were all given attention, too bad that the demo gods didn’t feel like playing along. The biggest surprise was a guest appearance by old rocker Neil Young, although I got the feeling he wasn’t excited as we were to be here.
Service-Oriented Architecture and Java technology; Level-Setting Standards, Architecture and Code
Unfortunately I missed the beginning, as I didn’t pass the super-duper scanning system, even though I did in fact register for this particular session. The solution provided by the head-scanner? To print out my schedule just in case it would happen again. Welcome to JavaOne 2008.. Anyway, this was mostly about the basics of SOA and served as a starting point for all those other sessions I’m planning to take. Nothing worth mentioning here, or it would have to be the hair color of one of one of the speakers.
The Best of Both Worlds with Java Business Integration and Service Component Architecture
So, what do I get for travelling all the way to not-quite-as-sunny-as-I-had-hoped San Francisco? A session by two fellow Dutch men, with the accents to match. This was about JBI & SCA, 2 subject I didn’t know anything about, and how to combine them. I expect to understand the importance of this much better at the end of the week.
GlassFish Project V3 as an Extensible Server Platform
Unfortunately I was treated to hard-to-understand speakers again, but that didn’t stop me from actually getting very interested in the next version of Sun’s modular & extensible application server. The fact that it can also be used as a library makes it even sexier.
SCA: Flexible and Agile Composition of Distributed Service-Oriented Architecture Applications
Again a rather cool session, too bad that it wasn’t held before the SCA/JBI one mentioned earlier. With developers not having to think about such pesky details like transport mechanisms and security policy, SCA is a sure winner in my book.
Epilogue
A very long day (as I’m typing this it’s been over 13 hours since JavaOne officially started) with some personal failures as well (the speakers in the Java EE connector 1.6 Architecture session seemed to be as bored as I was – still I was fortunate enough to be able to slip away after 10 minutes). Both SCA & GlassFish are worth spending more time on, which is a good thing as I’ve several more sessions on those subjects planned in the coming days.

Questions?

Get in touch with us to learn more about the subject and related solutions

Explore related posts