JBoss version - needs a new branch?

It is a bit mess: Some code commented out, and not sure if the proposed solutions are ok. The app is not fully migrated yet. Needs review and cleanup.