Package org.jboss.deployers.structure.spi

Examples of org.jboss.deployers.structure.spi.DeploymentUnit


   }
  
   public void testWarWithMixedLibs() throws Exception
   {
      WebArchive war = createWarWithLibs(true, true, false);
      DeploymentUnit unit = assertDeploy(war);
      Class<?> servletWebBeanClass = getClass(ServletWebBean.class, unit);
      Class<?> uiWebBeanClass = getClass(UIWebBean.class, unit);
      Class<?> crmWebBeanClass = getClass(CrmWebBean.class, unit);
      Deployment deployment = initializeDeploymentBean();
     
View Full Code Here


      WebArchive war1 = createWar("simple1.war", true, ServletWebBean.class);
      ear.addModule(war1);
      WebArchive war2 = createWar("simple2.war", true, NotWBJsfBean.class);
      ear.addModule(war2);
      MockArchiveManifest.addManifest(ear);
      DeploymentUnit unit = assertDeploy(ear);
      Iterator<DeploymentUnit> iterator = unit.getChildren().iterator();
      DeploymentUnit unit1 = iterator.next();
      DeploymentUnit unit2 = iterator.next();
      if (unit2.getName().contains("simple1.war"))
      {
         DeploymentUnit temp = unit2;
         unit2 = unit1;
         unit1 = temp;
      }
      Class<?> servletWebBeanClass = getClass(ServletWebBean.class, unit1);
      Class<?> notWBJsfBeanClass = getClass(NotWBJsfBean.class, unit2);
View Full Code Here

   private String getComponentName(DeploymentContext context)
   {
      if (context == null)
         return null;

      DeploymentUnit u = context.getDeploymentUnit();
      ServiceMetaData data = u.getAttachment(ServiceMetaData.class);
      if (data == null)
         return null;
      ObjectName objectName = data.getObjectName();
      return objectName.toString();
   }
View Full Code Here

    * @return
    */
   private ModuleType getModuleType(DeploymentContext info)
   {
      ModuleType type = null;
      DeploymentUnit unit = info.getDeploymentUnit();

      if (unit.getAttachment(carDeployerType) != null)
      {
         type = ModuleType.CAR;
      }
      else if (unit.getAttachment(ejbDeployerType) != null
            || unit.getAttachment(ejb3DeployerType) != null)
      {
         type = ModuleType.EJB;
      }
      else if (unit.getAttachment(earDeployerType) != null)
      {
         type = ModuleType.EAR;
      }
      else if (unit.getAttachment(rarDeployerType) != null)
      {
         type = ModuleType.RAR;
      }
      else if (unit.getAttachment(warDeployerType) != null)
      {
         type = ModuleType.WAR;
      }

      return type;
View Full Code Here

      StringBuilder containerName = new StringBuilder("jboss.j2ee:service=EJB3" + ",");

      // Get the top level unit for this unit (ex: the top level might be an ear and this unit might be the jar
      // in that ear
      // See AS Ejb3Deployer.deploy
      DeploymentUnit toplevelUnit = unit.getTopLevel();
      boolean isEar = unit != unit.getTopLevel() || toplevelUnit.isAttachmentPresent(JBossAppMetaData.class);
      if (isEar)
      {
         containerName.append("ear=");
         containerName.append(toplevelUnit.getSimpleName());
         containerName.append(",");
      }
      // now work on the passed unit, to get the jar name
      if (unit.getSimpleName() == null)
      {
View Full Code Here

      }
     
      void cleanup()
      {
         MutableMetaDataRepository repository = null;
         DeploymentUnit unit = parent;
         while (repository == null && unit != null)
         {
            repository = unit.getAttachment(MutableMetaDataRepository.class);
            unit = unit.getParent();
         }
         if (repository == null)
         {
            return;
         }
View Full Code Here

    * @param unit the deployment unit
    * @param attachment the attachment
    */
   protected void addComponent(DeploymentUnit unit, T attachment)
   {
      DeploymentUnit component = unit.addComponent(getComponentName(attachment));
      component.addAttachment(getAttachmentName(attachment), attachment);
   }
View Full Code Here

         throw new IllegalArgumentException("Null context");

      checkShutdown();

      Map<String, ManagedObject> managedObjects = new HashMap<String, ManagedObject>();
      DeploymentUnit unit = context.getDeploymentUnit();
      Set<ManagedObjectCreator> mocs = new HashSet<ManagedObjectCreator>();
      Set<String> outputs = new HashSet<String>();
      for (DeployerWrapper deployer : deployers)
      {
         outputs.addAll(deployer.getOutputs());
View Full Code Here

      // in the component deployers
      List<DeploymentContext> components = null;
      if (currentComponents != null && currentComponents.isEmpty() == false)
         components = new ArrayList<DeploymentContext>(currentComponents);

      DeploymentUnit unit = context.getDeploymentUnit();
      if (isRelevant(deployer, unit, context.isTopLevel(), context.isComponent()))
      {
         try
         {
            doDeploy(deployer, unit);
View Full Code Here

            doUninstallParentFirst(deployer, context, false, false);
            throw e;
         }
      }

      DeploymentUnit unit = context.getDeploymentUnit();
      if (isRelevant(deployer, unit, context.isTopLevel(), context.isComponent()))
      {
         try
         {
            doDeploy(deployer, unit);
View Full Code Here

TOP

Related Classes of org.jboss.deployers.structure.spi.DeploymentUnit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.