Package org.jboss.mx.loading

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


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

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

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

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

/*     */   private URL createURLAndAddToLoader(ClassLoader cl, File tempdir) throws IOException
/*     */   {
/* 118 */     URL tmpURL = tempdir.toURL();
/* 119 */     URL tmpCP = new URL(tmpURL, "?dynamic=true");
/*     */
/* 121 */     RepositoryClassLoader ucl = (RepositoryClassLoader)cl;
/*     */
/* 124 */     if (ucl.getLoaderRepository() != null)
/*     */     {
/* 126 */       ucl.addURL(tmpCP);
/*     */     }
/*     */
/* 129 */     return tmpCP;
/*     */   }
View Full Code Here

/*     */
/*     */   public boolean isUnloadedClassLoader()
/*     */   {
/*  67 */     if ((getClassLoader() instanceof RepositoryClassLoader))
/*     */     {
/*  69 */       RepositoryClassLoader rcl = (RepositoryClassLoader)getClassLoader();
/*  70 */       return rcl.getLoaderRepository() == null;
/*     */     }
/*  72 */     return false;
/*     */   }
View Full Code Here

/*  96 */         stream.flush();
/*  97 */         stream.close();
/*  98 */         classFile.deleteOnExit();
/*     */       }
/*     */
/* 104 */       RepositoryClassLoader rcl = (RepositoryClassLoader)getClassLoader();
/* 105 */       rcl.clearClassBlackList();
/* 106 */       rcl.clearResourceBlackList();
/*     */
/* 109 */       dynClass = getClassLoader().loadClass(cc.getName());
/*     */     }
/*     */     catch (Exception ex)
/*     */     {
View Full Code Here

   }
  
   private ClassLoader getTopLevelJBossClassLoader()
   {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      RepositoryClassLoader topRcl = null;
      while (loader != null)
      {
         if (loader instanceof RepositoryClassLoader)
         {
            topRcl = (RepositoryClassLoader)loader;
View Full Code Here

   }

   // FIXME: JBAOP-107 REMOVE THIS HACK
   public boolean isValid()
   {
      RepositoryClassLoader cl = (RepositoryClassLoader) getClassLoader();
      if (cl == null)
         return false;
      return cl.getLoaderRepository() != null;
   }
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.