Refactored the part with Glassfish to remove one container at runtime