@Override protected DeploymentUnit adjustDeploymentUnit(DeploymentUnit unit) { return unit.getTopLevel(); }
public void setDeploymentUnit(DeploymentUnit du) { if (du == null) { throw new IllegalArgumentException("Null deployment unit."); } topLevelDeploymentUnit = du.getTopLevel(); }
public void setDeploymentUnit(DeploymentUnit du) { if (du == null) { throw new IllegalArgumentException("Null deployment unit."); } topLevelDeploymentUnit = du.getTopLevel(); }
private static <T> List<T> getAllAttachments(DeploymentUnit unit, Class<T> type) { ArrayList<T> attachments = new ArrayList<T>(); DeploymentUnit top = unit.getTopLevel(); getAllAttachments(top, type, attachments); return attachments; } private static <T> void getAllAttachments(DeploymentUnit unit, Class<T> type, ArrayList<T> attachments)
public DeploymentUnit getTopLevel() { DeploymentUnit top = delegate.getTopLevel(); return wrap(top); }
protected List<AnnotationEnvironment> getUtilityFromAttribute(DeploymentUnit unit) { List<AnnotationEnvironment> list = new ArrayList<AnnotationEnvironment>(); DeploymentUnit top = unit.getTopLevel(); findAllAnnotationEnvironments(top, list); return list; }
private void dump(DeploymentUnit unit) { DeploymentUnit top = unit.getTopLevel(); StringBuffer tmp = new StringBuffer(); dump(top, tmp, 0); log.debug("Processing unit:\n"+tmp); } private void dump(DeploymentUnit unit, StringBuffer tmp, int depth)
private List<String> getEjbDeploymentPaths(DeploymentUnit unit) { ArrayList<String> paths = new ArrayList<String>(); DeploymentUnit root = unit.getTopLevel(); getEjbDeploymentPaths(root, paths); return paths; }
private BeanMetaData getBootstrapBeanAttachment(DeploymentUnit deploymentUnit) { String bootstrapName = DeployersUtils.getBootstrapBeanName(deploymentUnit.getTopLevel()); String bbAttachmentName = bootstrapName + "_" + BeanMetaData.class.getSimpleName(); BeanMetaData bbBMD = deploymentUnit.getTopLevel().getAttachment(bbAttachmentName, BeanMetaData.class); return bbBMD; }
public <T> T search(DeploymentUnit unit, String name, Class<T> expectedType) { return unit.getTopLevel().getAttachment(name, expectedType); } }
public String getApplicationName(DeploymentUnit deploymentUnit) { return super.getApplicationName(deploymentUnit.getTopLevel()); }
/** * Get bootstrap bean name. * * @param unit the deployment unit * @return weld bootstrap bean name */ public static String getBootstrapBeanName(DeploymentUnit unit) { if (unit == null) throw new IllegalArgumentException("Null deployment unit"); DeploymentUnit top = unit.getTopLevel(); return top.getName() + WELD_BOOTSTRAP_BEAN; }
private void dump(DeploymentUnit unit) { DeploymentUnit top = unit.getTopLevel(); StringBuffer tmp = new StringBuffer(); dump(top, tmp, 0); log.debug("Processing unit="+unit.getSimpleName()+", structure:\n"+tmp); } private void dump(DeploymentUnit unit, StringBuffer tmp, int depth)
/** * Is the bootstrap bean present. * * @param unit the deployment unit * @return true if there is bootstrap bean in attachments, false otherwise */ public static boolean isBootstrapBeanPresent(DeploymentUnit unit) { String attachmentName = getBootstrapBeanAttachmentName(unit); DeploymentUnit top = unit.getTopLevel(); return top.isAttachmentPresent(attachmentName); }
@Override public void setDeploymentUnit(DeploymentUnit du) { super.setDeploymentUnit(du); discoverEjbs(du.getTopLevel()); }
public String getApplicationName(DeploymentUnit unit) { DeploymentUnit topLevel = unit.getTopLevel(); if(topLevel.isAttachmentPresent(JBossAppMetaData.class)) return topLevel.getSimpleName(); return null; }
@Override public void setDeploymentUnit(DeploymentUnit du) { super.setDeploymentUnit(du); discoverEjbs(du.getTopLevel()); }
public Ejb3JBoss5Deployment(DeploymentUnit ejb3Unit, Kernel kernel, MBeanServer mbeanServer, org.jboss.deployers.structure.spi.DeploymentUnit jbossUnit, JBoss5DeploymentScope deploymentScope, JBossMetaData metaData) { // Either call the old constructor and do process persistence units //super(ejb3Unit, deploymentScope, metaData, persistenceUnitsMetaData); // or call the new constructor and don't process persistence units super(jbossUnit, ejb3Unit, deploymentScope, metaData); this.jbossUnit = jbossUnit; kernelAbstraction = new JBossASKernel(kernel, mbeanServer); // todo maybe mbeanServer should be injected? this.mbeanServer = mbeanServer; org.jboss.deployers.structure.spi.DeploymentUnit topUnit = jbossUnit.getTopLevel(); endpoints = (Map<String, ContainerDependencyMetaData>) topUnit.getAttachment(MappedReferenceMetaDataResolverDeployer.ENDPOINT_MAP_KEY); }
public void deploy(DeploymentUnit unit, JBPMDeploymentMetaData deployment) throws DeploymentException { log.debug("Encountered deployment " + unit.getTopLevel()); for(String serviceName : new String[] {USER_TX_SERVICE_NAME, JBPM_SERVICE_NAME}) { unit.addIDependOn( new AbstractDependencyItem(unit.getTopLevel().getName(), serviceName, new ControllerState("Real"), ControllerState.INSTALLED) ); } }
public ClassLoader createClassLoader(DeploymentUnit unit) throws Exception { if (unit.isTopLevel()) return createTopLevelClassLoader(unit); return unit.getTopLevel().getClassLoader(); }