Package org.jboss.vfs

Examples of org.jboss.vfs.VirtualFile.toURL()


            scope.register(deployment);
         // create() creates initial EJB containers and initializes metadata.
         deployment.create();
         if (deployment.getEjbContainers().size() == 0)
         {
            log.trace("Found no containers in scanned jar, consider adding it to the ignore list: " + jar.getName() + " url: " + jar.toURL() + " unit: " + unit.getSimpleName());
            deployment.destroy();
            return;
         }
         // We'll delay the start and let org.jboss.ejb3.deployers.Ejb3DeploymentDeployer start the deployment
         // deployment.start();
View Full Code Here


   {
      try
      {
         VirtualFile vf = unit.getMetaDataFile(resource);
         if (vf == null) return null;
         return vf.toURL();
      }
      catch (Exception e)
      {
         throw new RuntimeException(e);
      }
View Full Code Here

      String name = unit.getSimpleName();
      if (parent != null)
         name = parent.getSimpleName() + "#" + name;

      VirtualFile file = unit.getMetaDataFile(jeeSpecRarDD);
      deployment.getConnectorMetaData().setURL(file.toURL());
      metaDataRepository.addConnectorMetaData(name, deployment.getConnectorMetaData());

      return deployment;
   }
View Full Code Here

         VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit)unit;
         try
         {
            VirtualFile classes = vfsUnit.getFile("WEB-INF/classes");
            // Tomcat can't handle the vfs urls yet
            URL vfsURL = classes.toURL();
            String vfsurl = vfsURL.toString();
            if (vfsurl.startsWith("vfs"))
               vfsURL = new URL(vfsurl.substring(3));
            classpath = new ArrayList<URL>();
            classpath.add(vfsURL);
View Full Code Here

         if (libDir == null || libDir.length() == 0) // take 'lib' even on empty
            libDir = "lib";
         VirtualFile lib = root.getChild(libDir);
         if (lib != null)
         {
            ResourceFilter recurseFilter = new UrlExcludeResourceFilter(lib.toURL());
            unit.addAttachment(ResourceFilter.class.getName() + ".recurse", recurseFilter, ResourceFilter.class);
            log.debug("Excluding ear's lib directory: " + lib);
         }
      }
      catch (Exception e)
View Full Code Here

         try
         {
            VirtualFile file = VFS.getChild(rc.getUrl());
            while (file != null)
            {
               if (url.equals(file.toURL())) // our parent is the lib
                  return false;

               file = file.getParent();
            }
            return true;
View Full Code Here

      VirtualFile file = getFile();
      URL url = rootUrl;
      if (url == null)
      {
         VirtualFile parentFile = file.getParent();
         url = parentFile != null ? parentFile.toURL() : null;
      }
      String pathName = path;
      if (pathName == null)
         pathName = file.getName();
View Full Code Here

            VirtualFile integrationLib = VFS.getChild(new URL(url));

            if (integrationLib != null && integrationLib.exists())
            {
               integrationLibsFound = true;
               result.add(integrationLib.toURL());
            }
            else
            {
               log.debug("Could not find JAX-RPC integration lib: " + url);
            }
View Full Code Here

      VirtualFile dd = container.getDeploymentUnit().getMetaDataFile("jbosscmp-jdbc.xml");
      if(dd != null)
      {
         try
         {
            jdbcUrl = dd.toURL();
         }
         catch(Exception e)
         {
            throw new IllegalStateException("Failed to create URL for " + dd.getPathName(), e);
         }
View Full Code Here

               if (jbossStructure.exists())
               {
                  if (trace)
                     log.trace("... context has a META-INF/jboss-structure.xml");

                  URL url = jbossStructure.toURL();
                  UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
                  Unmarshaller unmarshaller = factory.newUnmarshaller();
                  StructureMetaDataObjectFactory ofactory = new StructureMetaDataObjectFactory();
                  unmarshaller.unmarshal(url.toString(), ofactory, structureContext.getMetaData());
                  isJBossStructure = true;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.