private class EjbJarConfigurationConfigurator implements ComponentConfigurator {
@Override
public void configure(DeploymentPhaseContext context, ComponentDescription description, ComponentConfiguration configuration) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = context.getDeploymentUnit();
final ApplicationExceptions appExceptions = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.APPLICATION_EXCEPTION_DETAILS);
if (appExceptions == null) {
throw MESSAGES.ejbJarConfigNotFound(deploymentUnit);
}
final EJBComponentCreateServiceFactory ejbComponentCreateServiceFactory = (EJBComponentCreateServiceFactory) configuration.getComponentCreateServiceFactory();
ejbComponentCreateServiceFactory.setEjbJarConfiguration(appExceptions);