Package org.jboss.deployers.vfs.spi.structure

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit


      // The infrastructure will only check leafs anyway so no need to check here
      if (name == null && isIncludeDeploymentFile())
         name = unit.getName();

      // Try to find the metadata
      VFSDeploymentUnit vfsDeploymentUnit = (VFSDeploymentUnit) unit;

      // let's check altDD first
      VirtualFile file = getMetadataFile(vfsDeploymentUnit, getOutput(), name, false);
      if (file != null)
         return parseAndInit(vfsDeploymentUnit, file, root, true);

      // try all name+suffix matches
      List<VirtualFile> files = vfsDeploymentUnit.getMetaDataFiles(name, suffix, getMetaDataTypeFilter(unit));
      switch (files.size())
      {
         case 0 :
            return null;
         case 1 :
View Full Code Here


   protected T parse(DeploymentUnit unit, Set<String> names, String suffix, T root) throws Exception
   {
      if (names == null || names.isEmpty())
         throw new IllegalArgumentException("Null or empty names.");

      VFSDeploymentUnit  vfsDeploymentUnit = (VFSDeploymentUnit)unit;

      List<VirtualFile> files = new ArrayList<VirtualFile>();
      Set<String> missingFiles = new HashSet<String>();
      Set<String> ignoredFiles = new HashSet<String>();

      for (String name : names)
      {
         if (ignoreName(unit, name))
         {
            ignoredFiles.add(name);
         }
         else
         {
            // try finding altDD file
            VirtualFile file = getMetadataFile(vfsDeploymentUnit, matchFileToClass(unit, name), name, false);
            if (file == null)
            {
               List<VirtualFile> matched = vfsDeploymentUnit.getMetaDataFiles(name, suffix, getMetaDataTypeFilter(unit));
               if (matched != null && matched.isEmpty() == false)
               {
                  for (VirtualFile m : matched)
                  {
                     if (ignoreFile(vfsDeploymentUnit, m))
View Full Code Here

      return assertManagedProperty(mo, name, metaType, metaValue);
   }

   public void testManagedObject() throws Exception
   {
      VFSDeploymentUnit unit0 = addDeployment("/classloader", "deployment0");
      try
      {
         ManagedDeployment managedDeployment = getDeployerClient().getManagedDeployment(unit0.getName());
         assertNotNull(managedDeployment);
         ManagedObject mo = managedDeployment.getManagedObject(ClassLoadingMetaData.class.getName());
         assertNotNull(mo);
         getLog().debug("ManagedObject: " + mo + " properties=" + mo.getProperties());
View Full Code Here

   public void deploy(VFSDeploymentUnit unit, Module module) throws DeploymentException
   {
      if (module == null)
      {
         VFSDeploymentUnit parent = unit.getParent();
         while(parent != null && module == null)
         {
            module = parent.getAttachment(Module.class);
            parent = parent.getParent();
         }
         if (module == null)
            throw new IllegalArgumentException("No module in deployment unit's hierarchy: " + unit.getName());
      }
View Full Code Here

   @Override
   protected T parse(DeploymentUnit unit, String name, T root) throws Exception
   {
      // Try to find the metadata
      VFSDeploymentUnit vfsDeploymentUnit = (VFSDeploymentUnit) unit;

      VirtualFile file = (VirtualFile) unit.getAttachment(getOutput().getName() + ".altDD");
      if(file == null)
      {
         file = vfsDeploymentUnit.getMetaDataFile(name);
         if (file == null)
            return null;
      }
     
      T result = parse(vfsDeploymentUnit, file, root);
View Full Code Here

   protected T parse(DeploymentUnit unit, Set<String> names, T root) throws Exception
   {
      if (names == null || names.isEmpty())
         throw new IllegalArgumentException("Null or empty names.");

      VFSDeploymentUnit  vfsDeploymentUnit = (VFSDeploymentUnit)unit;

      List<VirtualFile> files = new ArrayList<VirtualFile>();
      Set<String> missingFiles = new HashSet<String>();

      for (String name : names)
      {
         VirtualFile file = vfsDeploymentUnit.getMetaDataFile(name);
         if (file != null)
            files.add(file);
         else
            missingFiles.add(name);
      }
View Full Code Here

      // The infrastructure will only check leafs anyway so no need to check here
      if (name == null && isIncludeDeploymentFile())
         name = unit.getName();
     
      // Try to find the metadata
      VFSDeploymentUnit vfsDeploymentUnit = (VFSDeploymentUnit) unit;
      List<VirtualFile> files = vfsDeploymentUnit.getMetaDataFiles(name, suffix);

      if (files.size() == 0)
      {
         return null;
      }
View Full Code Here

   protected T parse(DeploymentUnit unit, Set<String> names, String suffix, T root) throws Exception
   {
      if (names == null || names.isEmpty())
         throw new IllegalArgumentException("Null or empty names.");

      VFSDeploymentUnit  vfsDeploymentUnit = (VFSDeploymentUnit)unit;

      List<VirtualFile> files = new ArrayList<VirtualFile>();
      Set<String> missingFiles = new HashSet<String>();

      for (String name : names)
      {
         List<VirtualFile> matched = vfsDeploymentUnit.getMetaDataFiles(name, suffix);
         if (matched != null && matched.isEmpty() == false)
            files.addAll(matched);
         else
            missingFiles.add(name);
      }
View Full Code Here

         }
           
         log.debug("********* " + this.getClass().getSimpleName() + " Begin Unit: " + unit.getSimpleName() + " jar: "
               + jar.getName());
         JBoss5DeploymentScope scope = null;
         VFSDeploymentUnit parent = unit.getTopLevel();
         boolean initScopeDeployment = false;
         if (parent != null)
         {
            // Check for an existing scope
            scope = (JBoss5DeploymentScope) parent.getAttachment(DeploymentScope.class);
            if (scope == null)
            {
               // Check for a scoped deployment or an ear top-level unit
               boolean isEar = unit != unit.getTopLevel() || parent.isAttachmentPresent(JBossAppMetaData.class);
               if(parent.isAttachmentPresent(DeploymentEndpointResolver.class) == true)
                  scope = new JBoss5DeploymentScope(parent, isEar);
               else
               {
                  // EJBTHREE-1291
                  scope = new JBoss5DeploymentScope(parent, isEar, unit.getSimpleName());
                  initScopeDeployment = true;
               }
               parent.addAttachment(DeploymentScope.class, scope);
            }
         }

         JBoss5DeploymentUnit du = new JBoss5DeploymentUnit(unit);
         Ejb3JBoss5Deployment deployment = new Ejb3JBoss5Deployment(du, kernel, mbeanServer, unit, scope, metaData);
View Full Code Here

         {
            String uri = vf.toURI().toString();
            cpURIs.add(uri);
         }
         // Also need to include the ear lib dir entries
         VFSDeploymentUnit earUnit = unit.getParent();
         if(earUnit != null)
         {
            List<VirtualFile> earClassPath = earUnit.getClassPath();
            JBossAppMetaData earMD = earUnit.getAttachment(JBossAppMetaData.class);
            if(earMD != null)
            {
               String libDir = earMD.getLibraryDirectory();
               if(libDir == null)
                  libDir = "lib";
View Full Code Here

TOP

Related Classes of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

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.