Package org.jboss.mx.loading

Examples of org.jboss.mx.loading.RepositoryClassLoader


      ClassLoader classloader = getClassLoader();
      if (classloader == null)
         throw new IllegalStateException("ClassLoader no longer exists: " + classLoaderString);
      if (classloader instanceof RepositoryClassLoader == false)
         throw new IllegalStateException("ClassLoader is not an instanceof RepositoryClassLoader " + classLoaderString);
      RepositoryClassLoader repositoryClassLoader = (RepositoryClassLoader) classloader;
      LoaderRepository loaderRepository = repositoryClassLoader.getLoaderRepository();
      if (loaderRepository == null)
         throw new IllegalStateException("ClassLoader has been undeployed: " + classLoaderString);
      if (loaderRepository instanceof HeirarchicalLoaderRepository3 == false)
         throw new IllegalStateException("Repository " + loaderRepository + " for classlaoder " + classLoaderString + " is not an HeirarchicalLoaderRepository3");
      return (HeirarchicalLoaderRepository3) loaderRepository;
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

      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

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.