public boolean isJavaEEApplication(DeploymentUnit deploymentUnit) { // JavaEE 6.0 FR 5.2.2 // practically everything deployed standalone is considered a JavaEEApplication in terms of naming return deploymentUnit.isTopLevel(); }
public boolean isTopLevel() { return delegate.isTopLevel(); }
@Override public void removeClassLoader(DeploymentUnit unit) throws Exception { if (unit.isTopLevel()) removeTopLevelClassLoader(unit); }
/** * In a deployment consisting of x.sar/ejbs.jar, the x.sar substitutes an EAR. */ protected boolean isTopLevelServiceArchive(DeploymentUnit deploymentUnit) { // Added additional check for file extension to prevent a .jar with jboss-service.xml // from being considered as an enterprise archive (https://issues.jboss.org/browse/JBAS-8770) return deploymentUnit.isTopLevel() && deploymentUnit.isAttachmentPresent(ServiceDeployment.class) && deploymentUnit.getSimpleName().endsWith(".sar"); }
public void visit(DeploymentUnit unit) throws DeploymentException { if (unit.isTopLevel()) { try { Context javaComp = getJavaComp(unit); javaComp.unbind("BeanManager"); _logger.debug("CDI BeanManager successfully unbound from JNDI (java:comp) for SwitchYard deployment '" + unit.getName() + "'."); } catch (NamingException e) { throw new DeploymentException("Error unbinding BeanManager.", e); } } }
/** * Returns the prefix for the MC bean name, for a {@link Injector injector} * * @return */ protected String getInjectorMCBeanNamePrefix() { StringBuilder sb = new StringBuilder("jboss-injector:"); org.jboss.deployers.structure.spi.DeploymentUnit topLevelUnit = this.jbossUnit.isTopLevel() ? this.jbossUnit : this.jbossUnit.getTopLevel(); sb.append("topLevelUnit="); sb.append(topLevelUnit.getSimpleName()); sb.append(","); sb.append("unit="); sb.append(this.jbossUnit.getSimpleName()); return sb.toString(); }
/** * Returns the prefix for the MC bean name, for a {@link JNDIBinder} * * @return */ public static String getJNDIBinderMCBeanPrefix(DeploymentUnit unit) { StringBuilder sb = new StringBuilder("managed-bean-jndibinder:"); DeploymentUnit topLevelUnit = unit.isTopLevel() ? unit : unit.getTopLevel(); sb.append("topLevelUnit="); sb.append(topLevelUnit.getSimpleName()); sb.append(","); sb.append("unit="); sb.append(unit.getSimpleName()); return sb.toString(); }
/** * Returns the prefix for the MC bean name, for a {@link Injector injector} * * @return */ private String getInjectorMCBeanNamePrefix(DeploymentUnit unit) { StringBuilder sb = new StringBuilder("jboss-injector:"); org.jboss.deployers.structure.spi.DeploymentUnit topLevelUnit = unit.isTopLevel() ? unit : unit.getTopLevel(); sb.append("topLevelUnit="); sb.append(topLevelUnit.getSimpleName()); sb.append(","); sb.append("unit="); sb.append(unit.getSimpleName()); return sb.toString(); }
public void visit(DeploymentUnit unit) throws DeploymentException { if (unit.isTopLevel()) { Context javaComp = getJavaComp(unit); try { Reference reference = new Reference("javax.enterprise.inject.spi.BeanManager", "org.jboss.weld.integration.deployer.jndi.JBossBeanManagerObjectFactory", null); reference.add(new StringRefAddr("id", IdFactory.getIdFromClassLoader(unit.getClassLoader()))); javaComp.bind("BeanManager", reference); _logger.debug("CDI BeanManager successfully bound into JNDI (java:comp) for SwitchYard deployment '" + unit.getName() + "'."); } catch (NamingException e) { throw new DeploymentException("Error binding BeanManager.", e); } } }
public ClassLoader createClassLoader(DeploymentUnit unit) throws Exception { if (unit.isTopLevel()) return createTopLevelClassLoader(unit); return unit.getTopLevel().getClassLoader(); }
protected void handleRelevantDeployment(DeploymentUnit unit) if (unit.isTopLevel() && unit instanceof VFSDeploymentUnit)