Java Code of the JBoss tutorial