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


public void sleep(long millis)
           throws java.lang.InterruptedException,
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.

millis - the length of time to sleep in milliseconds.
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:
  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.)