@ Override public void initializeInjectionServices ( ) throws CDIException { Set < ReferenceContext > cdiReferenceContexts = new HashSet < ReferenceContext > ( ) ; //first we need to initialize the injection service and collect the reference contexts and the injection classes for ( WebSphereBeanDeploymentArchive bda : getApplicationBDAs ( ) ) { // Don't initialize child libraries, instead aggregate for the whole module if ( bda . getType ( ) != ArchiveType . MANIFEST_CLASSPATH && bda . getType ( ) != ArchiveType . WEB_INF_LIB ) { ReferenceContext referenceContext = bda . initializeInjectionServices ( ) ; cdiReferenceContexts . add ( referenceContext ) ; } } // now we need to process the injections for ( ReferenceContext referenceContext : cdiReferenceContexts ) { try { referenceContext . process ( ) ; } catch ( InjectionException e ) { throw new CDIException ( e ) ; } } }
Initialize the Resource Injection Service with each BDA s bean classes .