Package org.jboss.mx.loading

Examples of org.jboss.mx.loading.LoaderRepository


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


/*     */   public ScopedJBossClassPool(ClassLoader cl, ClassPool src, ScopedClassPoolRepository repository, File tmp, URL tmpURL)
/*     */   {
/*  59 */     super(cl, src, repository, tmp, tmpURL);
/*     */
/*  61 */     boolean parentFirst = false;
/*  62 */     LoaderRepository loaderRepository = null;
/*  63 */     ClassLoader prnt = cl;
/*  64 */     while (prnt != null)
/*     */     {
/*  66 */       if ((prnt instanceof RepositoryClassLoader))
/*     */       {
View Full Code Here

/*    */   {
/* 38 */     boolean scoped = false;
/*    */     boolean parentFirst;
/* 39 */     if ((loader instanceof RepositoryClassLoader))
/*    */     {
/* 41 */       LoaderRepository repository = ((RepositoryClassLoader)loader).getLoaderRepository();
/* 42 */       if ((repository instanceof HeirarchicalLoaderRepository3))
/*    */       {
/* 44 */         scoped = true;
/* 45 */         HeirarchicalLoaderRepository3 hlr = (HeirarchicalLoaderRepository3)repository;
/* 46 */         parentFirst = hlr.getUseParentFirst();
View Full Code Here

      if (ScopedRepositoryClassLoaderHelper.isScopedClassLoader(di.ucl))
      {
         return di.ucl;
      }

      LoaderRepository attachToRepository = getLoaderRepositoryIfAttaching(di, docUrl);
      if (attachToRepository != null)
      {
         di.ucl.setRepository(attachToRepository);
         attachToRepository.addClassLoader(di.ucl);
         return di.ucl;
      }
      return null;
   }
View Full Code Here

                  catch (InstanceNotFoundException e)
                  {
                     log.warn("No scoped loader repository exists with the name " + on);
                  }

                  LoaderRepository repository = (LoaderRepository)server.getAttribute(on, "Instance");
                  if (repository instanceof HeirarchicalLoaderRepository3)
                  {
                     return repository;
                  }
                  else
View Full Code Here

      aspect = super.getSuperPerVmAspect(def);
      if (aspect != null)
      {
         synchronized(myPerVMAspects)
         {
            LoaderRepository loadingRepository = getAspectRepository(aspect);
            LoaderRepository myRepository = getScopedRepository();
            if (loadingRepository == myRepository)
            {
               //The parent does not load this class
               myPerVMAspects.put(def, aspect);
            }
            else
            {
               //The class has been loaded by a parent classloader, find out if we also have a copy
               try
               {
                  Class<?> clazz = myRepository.loadClass(aspect.getClass().getName());
                  if (clazz == aspect.getClass())
                  {
                     notMyPerVMAspects.put(def, Boolean.TRUE);
                  }
                  else
View Full Code Here

      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

      return new NonDelegatingClassPool(cl, parent, repository, true);
   }

   private ClassPoolDomain getDomain(RepositoryClassLoader cl)
   {
      LoaderRepository loaderRepository = cl.getLoaderRepository();
      ClassPoolDomainRegistry registry = ClassPoolDomainRegistry.getInstance();
      ClassPoolDomain domain = registry.getDomain(loaderRepository);
      if (domain == null)
      {
         if (loaderRepository instanceof HeirarchicalLoaderRepository3)
View Full Code Here

   public ScopedJBossClassPool(ClassLoader cl, ClassPool src, ScopedClassPoolRepository repository, File tmp, URL tmpURL)
   {
      super(cl, src, repository, tmp, tmpURL);
     
      boolean parentFirst = false;
      LoaderRepository loaderRepository = null;
      ClassLoader prnt = cl;
      while (prnt != null)
      {
         if (prnt instanceof RepositoryClassLoader)
         {
View Full Code Here

TOP

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

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.