Examples of RepositoryClassLoader


Examples of org.jboss.mx.loading.RepositoryClassLoader

            }
           
            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

Examples of org.jboss.mx.loading.RepositoryClassLoader

/*     */   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

Examples of org.jboss.mx.loading.RepositoryClassLoader

/*     */
/* 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

Examples of org.jboss.mx.loading.RepositoryClassLoader

/* 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

Examples of org.jboss.mx.loading.RepositoryClassLoader

/*     */     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

Examples of org.jboss.mx.loading.RepositoryClassLoader

/*     */   protected void unregisterClassLoader(DeploymentInfo di)
/*     */   {
/* 270 */     ObjectName uclName = null;
/*     */     try
/*     */     {
/* 273 */       RepositoryClassLoader ucl = di.ucl;
/* 274 */       if (ucl != null)
/*     */       {
/* 276 */         uclName = ucl.getObjectName();
/* 277 */         if ((this.registeredClassLoader) && (this.server.isRegistered(uclName)))
/*     */         {
/* 279 */           this.server.unregisterMBean(uclName);
/* 280 */           this.registeredClassLoader = false;
/*     */         }
View Full Code Here

Examples of org.jboss.mx.loading.RepositoryClassLoader

/*     */   }
/*     */
/*     */   private ClassLoader getTopLevelJBossClassLoader()
/*     */   {
/* 130 */     ClassLoader loader = Thread.currentThread().getContextClassLoader();
/* 131 */     RepositoryClassLoader topRcl = null;
/* 132 */     while (loader != null)
/*     */     {
/* 134 */       if ((loader instanceof RepositoryClassLoader))
/*     */       {
/* 136 */         topRcl = (RepositoryClassLoader)loader;
View Full Code Here

Examples of org.jboss.mx.loading.RepositoryClassLoader

/*  43 */     super(loader, name, parentDelegation, manager, parentFirst);
/*     */   }
/*     */
/*     */   public boolean isValid()
/*     */   {
/*  49 */     RepositoryClassLoader cl = (RepositoryClassLoader)getClassLoader();
/*  50 */     if (cl == null)
/*  51 */       return false;
/*  52 */     return cl.getLoaderRepository() != null;
/*     */   }
View Full Code Here

Examples of org.jboss.mx.loading.RepositoryClassLoader

/* 121 */     ClassLoader classloader = getClassLoader();
/* 122 */     if (classloader == null)
/* 123 */       throw new IllegalStateException("ClassLoader no longer exists: " + this.classLoaderString);
/* 124 */     if (!(classloader instanceof RepositoryClassLoader))
/* 125 */       throw new IllegalStateException("ClassLoader is not an instanceof RepositoryClassLoader " + this.classLoaderString);
/* 126 */     RepositoryClassLoader repositoryClassLoader = (RepositoryClassLoader)classloader;
/* 127 */     LoaderRepository loaderRepository = repositoryClassLoader.getLoaderRepository();
/* 128 */     if (loaderRepository == null)
/* 129 */       throw new IllegalStateException("ClassLoader has been undeployed: " + this.classLoaderString);
/* 130 */     if (!(loaderRepository instanceof HeirarchicalLoaderRepository3))
/* 131 */       throw new IllegalStateException("Repository " + loaderRepository + " for classlaoder " + this.classLoaderString + " is not an HeirarchicalLoaderRepository3");
/* 132 */     return (HeirarchicalLoaderRepository3)loaderRepository;
View Full Code Here

Examples of org.jboss.mx.loading.RepositoryClassLoader

/* 212 */           continue;
/*     */         }
/*     */
/* 215 */         if ((candidate.getClassLoader() instanceof RepositoryClassLoader))
/*     */         {
/* 218 */           RepositoryClassLoader rcl = (RepositoryClassLoader)candidate.getClassLoader();
/* 219 */           URL[] urls = rcl.getClasspath();
/*     */
/* 221 */           for (int i = 0; i < urls.length; i++)
/*     */           {
/* 223 */             if (resource.indexOf(urls[i].getFile()) >= 0)
/*     */             {
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.