changes to get this working on jboss 7