Adaptations to make it run on TomEE