Package org.jboss.mx.loading

Examples of org.jboss.mx.loading.RepositoryClassLoader


         }
         // We have to clear Blacklist caches or the class will never
         // be found
         //((UnifiedClassLoader)dcl).clearBlacklists();
         // To be backward compatible
         RepositoryClassLoader rcl = (RepositoryClassLoader) getClassLoader();
         rcl.clearClassBlackList();
         rcl.clearResourceBlackList();

         // Now load the class through the cl
         dynClass = getClassLoader().loadClass(cc.getName());
      }
      catch (Exception ex)
View Full Code Here


   private URL createURLAndAddToLoader(ClassLoader cl, File tempdir) throws IOException
   {
      URL tmpURL = tempdir.toURI().toURL();
      URL tmpCP = new URL(tmpURL, "?dynamic=true");

      RepositoryClassLoader ucl = (RepositoryClassLoader) cl;

      // We may be undeploying.
      if (ucl.getLoaderRepository() != null)
      {
         ucl.addURL(tmpCP);
      }
     
      return tmpCP;
   }
View Full Code Here

   public boolean isUnloadedClassLoader()
   {
      if (getClassLoader() instanceof RepositoryClassLoader)
      {
         RepositoryClassLoader rcl = (RepositoryClassLoader) getClassLoader();
         return rcl.getLoaderRepository() == null;
      }
      return false;
   }
View Full Code Here

         }
         // We have to clear Blacklist caches or the class will never
         // be found
         //((UnifiedClassLoader)dcl).clearBlacklists();
         // To be backward compatible
         RepositoryClassLoader rcl = (RepositoryClassLoader)myloader;
         rcl.clearClassBlackList();
         rcl.clearResourceBlackList();

         // Now load the class through the cl
         dynClass = myloader.loadClass(cc.getName());
         if (trace) logger.trace(this + " " + pool + " myloader:" + myloader + " created class:" + dynClass);
         return dynClass;
View Full Code Here

      try
      {
         URL tmpURL = tempdir.toURI().toURL();
         URL tmpCP = new URL(tmpURL, "?dynamic=true");

         RepositoryClassLoader ucl = (RepositoryClassLoader) cl;

         // We may be undeploying.
         if (ucl.getLoaderRepository() != null)
         {
            ucl.addURL(tmpCP);
         }
        
         return tmpCP;
      }
      catch(Exception e)
View Full Code Here

            }
           
            if (candidate.getClassLoader() instanceof RepositoryClassLoader)
            {
               //Sometimes the ClassLoader is a proxy for MBeanProxyExt?!
               RepositoryClassLoader rcl = (RepositoryClassLoader)candidate.getClassLoader();
               URL[] urls = rcl.getClasspath();
              
               for (int i = 0 ; i < urls.length ; i++)
               {
                  if (resource.indexOf(urls[i].getFile()) >= 0)
                  {
View Full Code Here

/*     */   private ClassLoader initBootLibrariesOld()
/*     */     throws Exception
/*     */   {
/* 472 */     List list = getBootURLs();
/*     */
/* 475 */     RepositoryClassLoader loader = null;
/* 476 */     for (URL url : list)
/*     */     {
/* 478 */       this.log.debug("Creating loader for URL: " + url);
/*     */
/* 481 */       Object[] args = { url, Boolean.TRUE };
/* 482 */       String[] sig = { "java.net.URL", "boolean" };
/* 483 */       loader = (RepositoryClassLoader)this.mbeanServer.invoke(DEFAULT_LOADER_NAME, "newClassLoader", args, sig);
/*     */     }
/* 485 */     this.bootstrapUCLName = loader.getObjectName();
/* 486 */     this.mbeanServer.registerMBean(loader, this.bootstrapUCLName);
/* 487 */     return loader;
/*     */   }
View Full Code Here

/*     */
/* 108 */     LoaderRepositoryFactory.createLoaderRepository(server, loaderConfig);
/*     */
/* 111 */     Object[] args = { url, url, Boolean.TRUE };
/* 112 */     String[] sig = { "java.net.URL", "java.net.URL", "boolean" };
/* 113 */     RepositoryClassLoader ucl = (RepositoryClassLoader)server.invoke(loaderConfig.repositoryName, "newClassLoader", args, sig);
/*     */     try
/*     */     {
/* 118 */       ClassPathVisitor visitor = new ClassPathVisitor();
/* 119 */       context.visit(visitor);
/* 120 */       Set classpath = visitor.getClassPath();
/* 121 */       for (VirtualFile path : classpath)
/*     */       {
/* 124 */         if (path != root) {
/* 125 */           ucl.addURL(trimJARURL(path.toURL()));
/*     */         }
/*     */       }
/*     */
/* 129 */       ObjectName uclName = ucl.getObjectName();
/* 130 */       if (!server.isRegistered(uclName))
/* 131 */         server.registerMBean(ucl, uclName);
/*     */     }
/*     */     catch (Throwable t)
/*     */     {
View Full Code Here

/* 139 */     return ucl;
/*     */   }
/*     */
/*     */   public void removeTopLevelClassLoader(DeploymentContext context)
/*     */   {
/* 144 */     RepositoryClassLoader ucl = (RepositoryClassLoader)context.getClassLoader();
/* 145 */     if (ucl == null)
/* 146 */       return;
/* 147 */     internalRemoveClassLoader(context, ucl);
/*     */   }
View Full Code Here

/*     */     throws DeploymentException
/*     */   {
/* 245 */     ObjectName uclName = null;
/*     */     try
/*     */     {
/* 248 */       RepositoryClassLoader ucl = di.ucl;
/* 249 */       uclName = ucl.getObjectName();
/* 250 */       if (!this.server.isRegistered(uclName))
/*     */       {
/* 252 */         this.server.registerMBean(di.ucl, uclName);
/* 253 */         this.registeredClassLoader = true;
/*     */       }
View Full Code Here

TOP

Related Classes of org.jboss.mx.loading.RepositoryClassLoader

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.