Examples of AssembledDirectory


Examples of org.jboss.virtual.AssembledDirectory

      EmbeddedTestSetup.testTearDown();
   }

   public void testEJB() throws Exception
   {
      AssembledDirectory jar = AssembledContextFactory.getInstance().create("vfs-test.jar");
      jar.addClass(HelloWorld.class);
      jar.addClass(HelloWorldBean.class);

      Bootstrap.getInstance().deploy(jar);
      HelloWorld hello = (HelloWorld)new InitialContext().lookup("HelloWorldBean/local");
      hello.hello();
      Bootstrap.getInstance().undeploy(jar);
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

      Bootstrap.getInstance().undeploy(jar);
   }

   public void testVfs() throws Exception
   {
      AssembledDirectory jar = AssembledContextFactory.getInstance().create("vfs-test2.jar");
      String[] includes = {"org/jboss/embedded/test/vfs/*.class"};
      jar.addResources(DAO.class, includes, null);
      jar.mkdir("META-INF").addResource("vfs-test-persistence.xml", "persistence.xml");
      Bootstrap.getInstance().deploy(jar);
      DAO dao = (DAO)new InitialContext().lookup("DAOBean/local");
      dao.create("Bill");
      Customer cust = dao.find("Bill");
      assertNotNull(cust);
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

         throw new RuntimeException("Assembled context already exists for name: " + name);

      try
      {
         AssembledContext context = new AssembledContext(name, rootName);
         AssembledDirectory directory = (AssembledDirectory)context.getRoot().getVirtualFile();
         registry.put(name, directory);
         return directory;
      }
      catch (IOException e)
      {
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

   @Override
   public VirtualFile getVirtualFile()
   {
      checkClosed();
      increment();
      return new AssembledDirectory(this);
   }
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

public class Handler extends URLStreamHandler
{
   protected URLConnection openConnection(URL url) throws IOException
   {
      String host = url.getHost();
      AssembledDirectory directory = AssembledContextFactory.getInstance().find(host);
      if (directory == null)
         throw new IOException("vfs does not exist: " + url);

      VirtualFile vf = directory.getChild(url.getPath());
      if (vf == null)
         throw new IOException("vfs does not exist: " + url);

      return new VirtualFileURLConnection(url, vf);
   }
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

   @Override
   public AssembledDirectory getVirtualFile()
   {
      checkClosed();
      increment();
      return new AssembledDirectory(this);
   }
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

      super.tearDown();
   }

   protected AssembledDirectory createBasicEar() throws Exception
   {
      AssembledDirectory ear = createTopLevelWithUtil();

      AssembledDirectory jar = ear.mkdir("simple.jar");
      addPackage(jar, PlainJavaBean.class);
      addPath(jar, "/webbeans/simple/jar", "META-INF");

      AssembledDirectory ejbs = ear.mkdir("ejbs.jar");
      addPackage(ejbs, MySLSBean.class);
      addPath(ejbs, "/webbeans/simple/ejb", "META-INF");

      AssembledDirectory war = ear.mkdir("simple.war");
      AssembledDirectory webinf = war.mkdir("WEB-INF");
      AssembledDirectory classes = webinf.mkdir("classes");
      addPackage(classes, ServletWebBean.class);
      addPath(war, "/webbeans/simple/web", "WEB-INF");

      AssembledDirectory lib = webinf.mkdir("lib");

      AssembledDirectory uijar = lib.mkdir("ui.jar");
      addPackage(uijar, UIWebBean.class);
      addPath(uijar, "/webbeans/simple/ui", "META-INF");

      // war w/o web-beans.xml
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

      return ear;
   }

   protected AssembledDirectory createTopLevelWithUtil() throws Exception
   {
      AssembledDirectory topLevel = createAssembledDirectory("top-level.ear", "top-level.ear");
      addPath(topLevel, "/webbeans/simple", "META-INF");

      AssembledDirectory earLib = topLevel.mkdir("lib");

      AssembledDirectory util = earLib.mkdir("util.jar");
      addPackage(util, SomeUtil.class);

      AssembledDirectory ext = earLib.mkdir("ext.jar");
      addPackage(ext, ExternalWebBean.class);
      addPath(ext, "/webbeans/simple/ext", "META-INF");

      return topLevel;
   }
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

   }

   public void testBasic() throws Throwable
   {
      String appName = "fdAppName.jar";
      AssembledDirectory root = createAssembledDirectory(appName, appName);
      root.addClass(FDTest.class);
      addPath(root, "/dependency/fd", "");

      DeploymentUnit unit = assertDeploy(root);
      try
      {
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

      super(name);
   }

   public void testBasicManifest() throws Exception
   {
      AssembledDirectory topLevel = createTopLevelWithUtil();
      AssembledDirectory sub = topLevel.mkdir("sub.jar");
      addPackage(sub, UseA.class);
      addPath(sub, "/classloader/manifest/basic", "META-INF");
      VFSDeploymentUnit unit = assertDeploy(topLevel);
      try
      {
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.