Package org.jboss.virtual.plugins.context.vfs

Examples of org.jboss.virtual.plugins.context.vfs.AssembledDirectory


*/
public class VirtualArchiveDeploy2 extends Main
{
   public static void main(String[] args) throws Exception
   {
      AssembledDirectory jar = AssembledContextFactory.getInstance().create("tutorial.jar");
      String[] includes = {"**/beans/*.class"};
      jar.addResources(Customer.class, includes, null);
      // Get tutorial-persistence.xml from classloader and alias it within the archive.
      jar.mkdir("META-INF").addResource("tutorial-persistence.xml", "persistence.xml");

      Bootstrap.getInstance().bootstrap();
      Bootstrap.getInstance().deploy(jar);

      run();
View Full Code Here


*/
public class VirtualArchiveDeploy extends Main
{
   public static void main(String[] args) throws Exception
   {
      AssembledDirectory jar = AssembledContextFactory.getInstance().create("tutorial.jar");
      jar.addClass(Customer.class);
      jar.addClass(CustomerDAOBean.class);
      jar.addClass(CustomerDAOLocal.class);
      jar.addClass(CustomerDAORemote.class);
      // Get tutorial-persistence.xml from classloader and alias it within the archive.
      jar.mkdir("META-INF").addResource("tutorial-persistence.xml", "persistence.xml");

      Bootstrap.getInstance().bootstrap();
      Bootstrap.getInstance().deploy(jar);

      run();
View Full Code Here

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

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

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

public class Handler extends URLStreamHandler
{
   protected URLConnection openConnection(URL u) throws IOException
   {
      String host = u.getHost();
      AssembledDirectory directory = AssembledContextFactory.getInstance().find(host);
      if (directory == null) throw new IOException("vfs does not exist: " + u.toString());
      VirtualFile vf = directory.findChild(u.getPath());
      if (vf == null) throw new IOException("vfs does not exist: " + u.toString());
      return new VirtualFileURLConnection(u, vf);
   }
View Full Code Here

/*    */ {
/*    */   protected URLConnection openConnection(URL u)
/*    */     throws IOException
/*    */   {
/* 44 */     String host = u.getHost();
/* 45 */     AssembledDirectory directory = AssembledContextFactory.getInstance().find(host);
/* 46 */     if (directory == null) {
/* 47 */       throw new IOException("vfs does not exist: " + u.toString());
/*    */     }
/* 49 */     VirtualFile vf = directory.findChild(u.getPath());
/* 50 */     if (vf == null) {
/* 51 */       throw new IOException("vfs does not exist: " + u.toString());
/*    */     }
/* 53 */     return new VirtualFileURLConnection(u, vf);
/*    */   }
View Full Code Here

*/
public class VirtualArchiveDeploy2 extends Main
{
   public static void main(String[] args) throws Exception
   {
      AssembledDirectory jar = AssembledContextFactory.getInstance().create("tutorial.jar");
      String[] includes = {"**/beans/*.class"};
      jar.addResources(Customer.class, includes, null);
      // Get tutorial-persistence.xml from classloader and alias it within the archive.
      jar.mkdir("META-INF").addResource("tutorial-persistence.xml", "persistence.xml");

      Bootstrap.getInstance().bootstrap();
      Bootstrap.getInstance().deploy(jar);

      run();
View Full Code Here

*/
public class VirtualArchiveDeploy extends Main
{
   public static void main(String[] args) throws Exception
   {
      AssembledDirectory jar = AssembledContextFactory.getInstance().create("tutorial.jar");
      jar.addClass(Customer.class);
      jar.addClass(CustomerDAOBean.class);
      jar.addClass(CustomerDAOLocal.class);
      jar.addClass(CustomerDAORemote.class);
      // Get tutorial-persistence.xml from classloader and alias it within the archive.
      jar.mkdir("META-INF").addResource("tutorial-persistence.xml", "persistence.xml");

      Bootstrap.getInstance().bootstrap();
      Bootstrap.getInstance().deploy(jar);

      run();
View Full Code Here

TOP

Related Classes of org.jboss.virtual.plugins.context.vfs.AssembledDirectory

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.