you can simply return new WeldSEBeanDeploymentArchive(id, classes, getParsedBeansXml()); and leave out the check above.