/** * Get the name of the module * * @return the string */ public String getName() { return deploymentUnit.getName(); }
/** * Get the name of the weld deployment bean. * * @param unit The deployment unit * @return the weld deployment bean name */ public static String getDeploymentBeanName(DeploymentUnit unit) { if (unit == null) throw new IllegalArgumentException("Null deployment unit"); return unit.getName() + "_JBossDeployment"; }
/** Return true if this deployment should be ignored */ public boolean ignoreDeployment(DeploymentUnit unit) { String name = unit.getName(); return (name.startsWith("jboss:id=") && name.indexOf("service=jacc") > 0); }
/** Return true if this deployment should be ignored */ public boolean ignoreDeployment(DeploymentUnit unit) { String name = unit.getName(); return (name.startsWith("jboss:id=") && name.indexOf("service=jacc") > 0); }
/** Return true if this deployment should be ignored */ public boolean ignoreDeployment(DeploymentUnit unit) { String name = unit.getName(); return (name.startsWith("jboss:id=") && name.indexOf("service=jacc") > 0); }
/** Return true if this deployment should be ignored */ public boolean ignoreDeployment(DeploymentUnit unit) { String name = unit.getName(); return (name.startsWith("jboss:id=") && name.indexOf("service=jacc") > 0); }
/** Return true if this deployment should be ignored */ public boolean ignoreDeployment(DeploymentUnit unit) { String name = unit.getName(); return (name.startsWith("jboss:id=") && name.indexOf("service=jacc") > 0); }
@Override protected boolean accepts(DeploymentUnit unit) throws DeploymentException { // Ignore non-vfs deployments if (unit instanceof VFSDeploymentUnit == false) { log.trace("Not a vfs deployment: " + unit.getName()); return false; } return accepts((VFSDeploymentUnit) unit); }
/** * Add controller context name. * * @param unit the deployment unit */ protected void addControllerContextName(DeploymentUnit unit) { unit.addControllerContextName(unit.getName()); }
@Override protected boolean accepts(DeploymentUnit unit) throws DeploymentException { // Ignore non-vfs deployments if (unit instanceof VFSDeploymentUnit == false) { if (log.isTraceEnabled()) log.trace("Not a vfs deployment: " + unit.getName()); return false; } return accepts((VFSDeploymentUnit) unit); }
/** * Remove controller context name. * * @param unit the deployment unit */ protected void removeControllerContextName(DeploymentUnit unit) { unit.removeControllerContextName(unit.getName()); }
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); } } }
/** * Qualify the object name with parent name just to avoid conflicts with deployments with the same name in multiple * archives */ private String getObjectName(DeploymentUnit unit) { String deploymentName = unit.getName(); DeploymentUnit parentDU = unit.getParent(); String parentDeploymentName = parentDU != null ? ",parent=\"" + parentDU.getSimpleName() + "\"" : ""; return BASE_OBJECT_NAME + "\"" + deploymentName + "\"" + parentDeploymentName; } }
/** Invokes the deployer start */ public synchronized void startModule() throws Exception { if (this.unit == null || this.container == null || this.deployment == null) throw new IllegalStateException("WebModules cannot be restarted, and must be redeployed"); // Get the war URL JBossWebMetaData metaData = unit.getAttachment(JBossWebMetaData.class); WebApplication webApp = deployment.start(unit, metaData); String warURL = unit.getName(); container.addDeployedApp(warURL, webApp); }
public void undeploy(DeploymentUnit unit) { if (ignoreDeployment(unit)) return; Deployment dep = getDeployment(unit); if (dep != null) { log.debug("undeploy: " + unit.getName()); getDeploymentAspectManager().undeploy(dep); } }
public ManagedDeployment build(DeploymentUnit unit, Map<String, ManagedObject> unitMOs, ManagedDeployment parent) { DeploymentPhase phase = unit.getAttachment(DeploymentPhase.class); if( phase == null ) phase = DeploymentPhase.APPLICATION; ManagedDeployment md = new ManagedDeploymentImpl(unit.getName(), unit.getSimpleName(), phase, parent, unitMOs); return md; }
public void undeploy(DeploymentUnit unit) { if (ignoreDeployment(unit)) return; Deployment dep = getDeployment(unit); if (dep != null) { log.debug("undeploy: " + unit.getName()); getDeploymentAspectManager().undeploy(dep); } }
public void undeploy(DeploymentUnit unit) { if (ignoreDeployment(unit)) return; Deployment dep = getDeployment(unit); if (dep != null) { log.debug("undeploy: " + unit.getName()); getDeploymentAspectManager().undeploy(dep); } }
protected void buildDeployment(DeploymentUnit unit, BootstrapInfo info, BeanMetaDataBuilder builder) { builder.addConstructorParameter(String.class.getName(), unit.getName()); builder.addConstructorParameter(Collection.class.getName(), getArchiveInfos(unit)); builder.addConstructorParameter(Collection.class.getName(), builder.createInject(info.getEjbServices().getUnderlyingValue(), "ejbs")); builder.addConstructorParameter(EjbServices.class.getName(), info.getEjbServices()); builder.addUninstall("undeploy"); }