Package org.jboss.virtual.plugins.context.memory

Examples of org.jboss.virtual.plugins.context.memory.MemoryContextFactory


            out.write(cc.toBytecode());
            out.flush();
            out.close();
           
            byte[] classBytes = byteout.toByteArray();
            MemoryContextFactory factory = MemoryContextFactory.getInstance();
            factory.putFile(outputURL, classBytes);

            if (myloader instanceof BaseClassLoader)
            {
               //Update check to RealClassLoader once integration project catches up
               ((BaseClassLoader)myloader).clearBlackList(classFileName);
View Full Code Here


            out.write(cc.toBytecode());
            out.flush();
            out.close();
           
            byte[] classBytes = byteout.toByteArray();
            MemoryContextFactory factory = MemoryContextFactory.getInstance();
            factory.putFile(outputURL, classBytes);

            if (myloader instanceof RealClassLoader)
            {
               ((RealClassLoader)myloader).clearBlackList(classFileName);
            }
View Full Code Here

      URI uri = new URI("vfsmemory://aopdomain");
      VFSContextFactory factory = VFSContextFactoryLocator.getFactory(uri);
      VFSContext ctx = factory.getVFS(uri);
      assertNotNull(ctx);
     
      MemoryContextFactory mfactory = MemoryContextFactory.getInstance();
      assertNotNull(mfactory);
      assertSame(factory, mfactory);
     
      VFSContext mctx = mfactory.createRoot(uri.toURL());
      assertNotNull(mctx);
      assertSame(ctx, mctx);
   }
View Full Code Here

      VirtualFile[] roots = new VirtualFile[classPath.size() + 1];
      int i = 0;
      for (VirtualFile path : classPath)
         roots[i++] = path;
     
      MemoryContextFactory factory = MemoryContextFactory.getInstance();
      factory.createRoot(module.getDynamicClassRoot());
     
      URL url = new URL(module.getDynamicClassRoot() + "/classes");
      roots[i++] = factory.createDirectory(url).getVirtualFile();
     
      VFSClassLoaderPolicy policy = new VFSClassLoaderPolicy(module.getName(), roots);
      policy.setExportAll(module.getExportAll());
      policy.setImportAll(module.isImportAll());
      // TODO JBMICROCONT-182 more policy from "module"
View Full Code Here

   }

   @Override
   protected void cleanup(DeploymentContext context, Module module) throws Exception
   {
      MemoryContextFactory factory = MemoryContextFactory.getInstance();
      factory.deleteRoot(module.getDynamicClassRoot());
   }
View Full Code Here

   }

   private Class<?> generateClass(ClassLoader loader, String dynamicClassRoot, GeneratedClassInfo info) throws Exception
   {
      URL outputURL = new URL(dynamicClassRoot + "/" + info.getResourceName());
      MemoryContextFactory factory = MemoryContextFactory.getInstance();
      factory.putFile(outputURL, info.getClassBytes());
     
      if (loader instanceof RealClassLoader)
      {
         ((RealClassLoader)loader).clearBlackList(info.getResourceName());
      }
View Full Code Here

            out.write(cc.toBytecode());
            out.flush();
            out.close();
           
            byte[] classBytes = byteout.toByteArray();
            MemoryContextFactory factory = MemoryContextFactory.getInstance();
            factory.putFile(outputURL, classBytes);

            if (myloader instanceof RealClassLoader)
            {
               ((RealClassLoader)myloader).clearBlackList(classFileName);
            }
View Full Code Here

/* 49 */     VirtualFile[] roots = new VirtualFile[classPath.size() + 1];
/* 50 */     int i = 0;
/* 51 */     for (VirtualFile path : classPath) {
/* 52 */       roots[(i++)] = path;
/*    */     }
/* 54 */     MemoryContextFactory factory = MemoryContextFactory.getInstance();
/* 55 */     factory.createRoot(module.getDynamicClassRoot());
/*    */
/* 57 */     URL url = new URL(module.getDynamicClassRoot() + "/classes");
/* 58 */     roots[(i++)] = factory.createDirectory(url).getVirtualFile();
/*    */
/* 60 */     VFSClassLoaderPolicy policy = new VFSClassLoaderPolicy(roots);
/* 61 */     policy.setExportAll(module.getExportAll());
/* 62 */     policy.setImportAll(module.isImportAll());
/*    */
View Full Code Here

/*    */   }
/*    */
/*    */   protected void cleanup(DeploymentContext context, Module module)
/*    */     throws Exception
/*    */   {
/* 70 */     MemoryContextFactory factory = MemoryContextFactory.getInstance();
/* 71 */     factory.deleteRoot(module.getDynamicClassRoot());
/*    */   }
View Full Code Here

      VirtualFile[] roots = new VirtualFile[classPath.size() + 1];
      int i = 0;
      for (VirtualFile path : classPath)
         roots[i++] = path;
     
      MemoryContextFactory factory = MemoryContextFactory.getInstance();
      factory.createRoot(module.getDynamicClassRoot());
     
      URL url = new URL(module.getDynamicClassRoot() + "/classes");
      roots[i++] = factory.createDirectory(url).getVirtualFile();
     
      VFSClassLoaderPolicy policy = new VFSClassLoaderPolicy(roots);
      policy.setExportAll(module.getExportAll());
      policy.setImportAll(module.isImportAll());
      // TODO JBMICROCONT-182 more policy from "module"
View Full Code Here

TOP

Related Classes of org.jboss.virtual.plugins.context.memory.MemoryContextFactory

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.