sample code for jboss