incrementPersistenceUnitCount(deploymentUnit, puCount);
private void handleJarDeployment(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (!isEarDeployment(deploymentUnit) && !isWarDeployment(deploymentUnit) && (!appClientContainerMode || DeploymentTypeMarker.isType(DeploymentType.APPLICATION_CLIENT, deploymentUnit)) ) { // handle META-INF/persistence.xml // ordered list of PUs List<PersistenceUnitMetadataHolder> listPUHolders = new ArrayList<PersistenceUnitMetadataHolder>(1); // handle META-INF/persistence.xml final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT); VirtualFile persistence_xml = deploymentRoot.getRoot().getChild(META_INF_PERSISTENCE_XML); parse(persistence_xml, listPUHolders, deploymentUnit); PersistenceUnitMetadataHolder holder = normalize(listPUHolders); // save the persistent unit definitions // deploymentUnit.putAttachment(PersistenceUnitMetadataHolder.PERSISTENCE_UNITS, holder); deploymentRoot.putAttachment(PersistenceUnitMetadataHolder.PERSISTENCE_UNITS, holder); markDU(holder, deploymentUnit); ROOT_LOGGER.tracef("parsed persistence unit definitions for jar %s", deploymentRoot.getRootName()); incrementPersistenceUnitCount(deploymentUnit, holder.getPersistenceUnits().size()); addApplicationDependenciesOnProvider( deploymentUnit, holder); } }
private void handleJarDeployment(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (!isEarDeployment(deploymentUnit) && !isWarDeployment(deploymentUnit) && (!appClientContainerMode || DeploymentTypeMarker.isType(DeploymentType.APPLICATION_CLIENT, deploymentUnit)) ) { // handle META-INF/persistence.xml // ordered list of PUs List<PersistenceUnitMetadataHolder> listPUHolders = new ArrayList<PersistenceUnitMetadataHolder>(1); // handle META-INF/persistence.xml final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT); VirtualFile persistence_xml = deploymentRoot.getRoot().getChild(META_INF_PERSISTENCE_XML); parse(persistence_xml, listPUHolders, deploymentUnit); PersistenceUnitMetadataHolder holder = normalize(listPUHolders); // save the persistent unit definitions // deploymentUnit.putAttachment(PersistenceUnitMetadataHolder.PERSISTENCE_UNITS, holder); deploymentRoot.putAttachment(PersistenceUnitMetadataHolder.PERSISTENCE_UNITS, holder); markDU(holder, deploymentUnit); ROOT_LOGGER.tracef("parsed persistence unit definitions for jar %s", deploymentRoot.getRootName()); incrementPersistenceUnitCount(deploymentUnit, holder.getPersistenceUnits().size()); addApplicationDependenciesOnProvider( deploymentUnit, holder); } }
incrementPersistenceUnitCount(deploymentUnit, puCount);
incrementPersistenceUnitCount(deploymentUnit, puCount);
incrementPersistenceUnitCount(deploymentUnit, puCount);