I just became the proud daddy of a beautiful baby girl. As all IT guys, I usually don't start with the manual when I get my hands on something new: exploring is the best way to learn something ;-) This time, though, I decided to do it by the book and read the JavaDoc first. The description of the sleep() method worries me a bit.... I wonder if there is a plugpoint when I can squeeze in a more reliable implementation of the sleep() method.


Interface BabyGirl


public interface BabyGirl


Method Summary
 void sleep(long millis)
          Calling the sleep(long millisec) method suggests that the BabyGirl goes to sleep for the specified number of milliseconds.
 

Method Detail

sleep

public void sleep(long millis)
           throws java.lang.InterruptedException,
                  java.lang.UnsupportedOperationException
Calling the sleep(long millisec) method suggests that the BabyGirl goes to sleep for the specified number of milliseconds. It's up to the implementation to decide if it will actually do so.

Parameters:
millis - the length of time to sleep in milliseconds.
Throws:
java.lang.InterruptedException - if the sleep is disrupted by anything.
java.lang.UnsupportedOperationException - if the implementation does not allow others to decide when sleeping is appropriate.

For a demo at a developer event next week spent some time on figuring out how to build Glassfish. Glassfish is the next version of Suns J2EE application server and it has been open sourced at JavaOne this year. I did not find a complete how-to right away, but after some searching it came down to some simple steps:

A couple of prerequisites:

  • JDK1.5 (set JAVA_HOME and have $JAVA_HOME/bin in PATH)
  • Maven 1.02 (set MAVEN_HOME and have $MAVEN_HOME/bin in PATH)
  • cvs

Now start building it:

  1. First you need to make sure that you have a network connection to the CVS server at java.net. At home that's no problem, but at the office I had to set up a tunnel through a socks proxy using ssh like this:
    ssh -x -2 -g -L 2401:localhost:2401 tunnel@cvs.dev.java.net
    
    The password is tunnel
  2. Once you're connected, log in to CVS at java.net:
    cvs -d :pserver:guest@localhost:/cvs login 
    
    (password empty)
  3. And get the main module:
    cvs -d :pserver:guest@cvs.dev.java.net:/cvs checkout glassfish/glassfish
    
    If you set up a tunnel in the first step you should replace cvs.dev.java.net with localhost like this:
    cvs -d :pserver:guest@localhost:/cvs checkout glassfish/glassfish
    
    
  4. Now cd to the glassfish directory and edit the project.properties file. In my case I had to adjust the following properties:
    glassfish.os.name
    glassfish.cvs.username
    glassfish.root
    maven.proxy.host
    maven.proxy.port
    
  5. Now you're all set up to get the rest of the code. Do a
    maven checkout
    
    and sit back for a while... this is going to take ~30 minutes or so and will give the all the code that is part of Glassfish.
  6. In order to build it you need two extra steps:
    maven bootstrap
    maven build
    
    The bootstrap step completes fairly quick, the build step is taking up to an hour, so sit back and catch up with some reading.
  7. Now the appserver is build and using a
    maven configure-runtime
    
    The runtime environment will be configured. After this goto the ../publish/glassfish/bin directory and do a
    ./asadmin start-domain domain1
    
    to start the freshly build application server.
  8. You should now be able to acces the admin console on http://localhost:4848 (log in as admin/adminadmin) and the webpages at http://localhost:8080. (You can changes these ports in the project.properties file if you want.)

Working at Sun sometimes pays off in unexpected ways, yesterday was one of those days: being a Sun employee got a backstage pass for the U2 concert at the Amsterdam Arena! The deal was of course that I had to work. John, Danny and Mary already blogged about this and had the same pleasure. What was the deal? In the second half of the concert Bono asks the audience to support the campaign against AIDS and poverty by taking out their mobiles and sending a text message to a certain number. The senders should include their names in the text message and later in the concert their names will be displayed on the large screen that is backing the stage. Why do they need a local Sun employee? The whole thing is run by US staff, but outside the US and UK they need local native speaker to moderate the messages and make sure that no swear words will appear on screen. And guess what, I was one of the lucky ones.

Before the show Robin showed me around and this was the place we had to do our work.
.

During the show the place looked like this.
.

And this is me and Robin after we moderated the messages.
.

I was expecting a lot of creativity from the Dutch audience with regard to swear words, but all the obvious ones were already filtered out by the application and of the few that I had to filter out Ms. Hornyfeet (in Dutch Geilvoets) was the funniest one (what exactly would she do with her feet...). The result of our moderation looked like this, if you look real good you can decipher some names... the place where we were moderating the messages was halfway the field so I could not take a real sharp picture...

The concert itself was great, it started with Vertigo and I will follow and that already blew the roof off (yes, the Amsterdam Arena has a roof they can open and close and although it was a bright sunny day... the roof was closed). Because of the backstage pass I could easily switch places in the stadium and the first part of the concert I was in the first section to the stage. The large crowd on the field was several meters behind me .

Already at the beginning of the concert people at the front of the field were fainting and helped out by the security staff. Glad I had some space around me and could dive into the crowd whenever I wanted ;-) Bono really knows how to play the crowd, here are some other pictures:




During the concert I tried to use my Treo 600 to record a video from the show. The sound was a little to much for the little Treo... one time it even rebooted! The videos that succeeded only had noise as sound, while it was light (start of concert) the visual was reasonable. Of course there was also guys using real video camera's and at least one of them had to turn it in... how stupid can you be... digital photocamera's were allowed and I saw a lot of people taking short video's.

All in all a great experience! I was years ago since I last attended a U2 concert, and definitely want to go to the next!

"I hate testing", that was what James Gossling said during the panel discussion at thursdays keynote during JavaOne. He caught my attention with that statement and he explained it by stating that he'd like to have things "correct by construction", which would make testing obsolete. Still not sure how I should interpret this...