Search in sources :

Example 1 with WeldResourceInjectionServices

use of org.jboss.as.weld.services.bootstrap.WeldResourceInjectionServices in project wildfly by wildfly.

the class DefaultModuleServiceProvider method getServices.

@Override
public Collection<Service> getServices(DeploymentUnit rootDeploymentUnit, DeploymentUnit deploymentUnit, Module module, ResourceRoot resourceRoot) {
    List<Service> services = new ArrayList<>();
    // ResourceInjectionServices
    // TODO I'm not quite sure we should use rootDeploymentUnit here
    services.add(new WeldResourceInjectionServices(rootDeploymentUnit.getServiceRegistry(), rootDeploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION), EJBAnnotationPropertyReplacement.propertyReplacer(deploymentUnit), module, DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit)));
    // ClassFileServices
    final CompositeIndex index = deploymentUnit.getAttachment(Attachments.COMPOSITE_ANNOTATION_INDEX);
    if (index != null) {
        services.add(new WeldClassFileServices(index, module.getClassLoader()));
    }
    return services;
}
Also used : WeldClassFileServices(org.jboss.as.weld.discovery.WeldClassFileServices) ArrayList(java.util.ArrayList) CompositeIndex(org.jboss.as.server.deployment.annotation.CompositeIndex) Service(org.jboss.weld.bootstrap.api.Service) WeldResourceInjectionServices(org.jboss.as.weld.services.bootstrap.WeldResourceInjectionServices)

Aggregations

ArrayList (java.util.ArrayList)1 CompositeIndex (org.jboss.as.server.deployment.annotation.CompositeIndex)1 WeldClassFileServices (org.jboss.as.weld.discovery.WeldClassFileServices)1 WeldResourceInjectionServices (org.jboss.as.weld.services.bootstrap.WeldResourceInjectionServices)1 Service (org.jboss.weld.bootstrap.api.Service)1