jpa/subsystem/src/main/java/org/jboss/as/jpa/processor/JPADependencyProcessor.java
private static void addPUServiceDependencyToComponents(final Collection<ComponentDescription> components, final PersistenceUnitMetadataHolder holder) {

        if (components == null || components.isEmpty() || holder == null) {
            return;
        }

        for (PersistenceUnitMetadata pu : holder.getPersistenceUnits()) {
            String jpaContainerManaged = pu.getProperties().getProperty(Configuration.JPA_CONTAINER_MANAGED);
            boolean deployPU = (jpaContainerManaged == null? true : Boolean.parseBoolean(jpaContainerManaged));
            if (deployPU) {
                final ServiceName puServiceName = PersistenceUnitServiceImpl.getPUServiceName(pu);
                for (final ComponentDescription component : components) {
                    ROOT_LOGGER.debugf("Adding dependency on PU service %s for component %s", puServiceName, component.getComponentClassName());
                    component.addDependency(puServiceName);
                }
            }
        }
    }
private static void addPUServiceDependencyToComponents(final Collection<ComponentDescription> components, final PersistenceUnitMetadataHolder holder) {

        if (components == null || components.isEmpty() || holder == null) {
            return;
        }

        for (PersistenceUnitMetadata pu : holder.getPersistenceUnits()) {
            String jpaContainerManaged = pu.getProperties().getProperty(Configuration.JPA_CONTAINER_MANAGED);
            boolean deployPU = (jpaContainerManaged == null? true : Boolean.parseBoolean(jpaContainerManaged));
            if (deployPU) {
                final ServiceName puServiceName = PersistenceUnitServiceImpl.getPUServiceName(pu);
                for (final ComponentDescription component : components) {
                    ROOT_LOGGER.debugf("Adding dependency on PU service %s for component %s", puServiceName, component.getComponentClassName());
                    component.addDependency(puServiceName);
                }
            }
        }
    }
private static void addPUServiceDependencyToComponents ( final Collection < ComponentDescription > components , final PersistenceUnitMetadataHolder holder ) { if ( components == null || components . isEmpty ( ) || holder == null ) { return ; } for ( PersistenceUnitMetadata pu : holder . getPersistenceUnits ( ) ) { String jpaContainerManaged = pu . getProperties ( ) . getProperty ( Configuration . JPA_CONTAINER_MANAGED ) ; boolean deployPU = ( jpaContainerManaged == null ? true : Boolean . parseBoolean ( jpaContainerManaged ) ) ; if ( deployPU ) { final ServiceName puServiceName = PersistenceUnitServiceImpl . getPUServiceName ( pu ) ; for ( final ComponentDescription component : components ) { ROOT_LOGGER . debugf ( "Adding dependency on PU service %s for component %s" , puServiceName , component . getComponentClassName ( ) ) ; component . addDependency ( puServiceName ) ; } } } }
Add the <code>puServiceName</code> as a dependency on each of the passed <code>components</code>

@param components    The components to which the PU service is added as a dependency
@param holder        The persistence units
Add the <code > puServiceName< / code > as a dependency on each of the passed <code > components< / code >