Modifications to work with multiple web applications deployed to the same JBoss