/** * Get deployment context. * * @param name the deployment context name * @return vfs deployment context or null if doesn't exist or not vfs based */ protected VFSDeploymentContext getDeploymentContext(String name) { DeploymentContext deploymentContext = getMainDeployerInternals().getDeploymentContext(name); if (deploymentContext == null || deploymentContext instanceof VFSDeploymentContext == false) return null; return (VFSDeploymentContext) deploymentContext; }
private String getPersistenceUnitBeanName() { // TODO: check assumption earlier String contextName = (String) context.getName(); DeploymentUnit deploymentUnit = null; for(Deployment deployment : mainDeployer.getTopLevel()) { String name = deployment.getName(); deploymentUnit = mainDeployerStructure.getDeploymentUnit(name); if(deploymentUnit == null) continue; deploymentUnit = findBean(deploymentUnit, contextName); if(deploymentUnit != null) break; } // TODO: this requires a bit more explaining if(deploymentUnit == null) throw new IllegalStateException("@PersistenceUnit can only be used within a regular deployment unit"); String persistenceUnitBeanName = resolver.resolvePersistenceUnitSupplier(deploymentUnit, persistenceUnitName); return persistenceUnitBeanName; }
Collection<Deployment> missing = getMainDeployerInternals().getMissingDeployer(); if (missing != null && missing.isEmpty() == false)
/** * The <code>getDeploymentContext</code> method returns the DeploymentContext * object for the URL supplied. * * @param url an <code>URL</code> value * @return a <code>DeploymentContext</code> value * @jmx.managed-operation */ @Deprecated public DeploymentContext getDeploymentContext(URL url) { String name = contextMap.get(url); if (name == null) return null; MainDeployerInternals structure = (MainDeployerInternals) delegate; DeploymentContext dc = structure.getDeploymentContext(name); log.debug("getDeploymentContext, url="+url+", dc="+dc); return dc; }
try DeploymentContext ctx = server.getDeploymentContext(target.toString()); targetUnit = ctx.getDeploymentUnit();
try DeploymentContext ctx = server.getDeploymentContext(target.toString()); targetUnit = ctx.getDeploymentUnit();