Package org.jboss.remoting.loading

Examples of org.jboss.remoting.loading.ClassBytes


      return ret;
   }

   private Object loadClassBytes(String className, ClassLoader classLoader)
   {
      ClassBytes classBytes = null;

      if(className != null)
      {
         byte[] classDefinition = ClassUtil.getClassBytes(className, classLoader);
        
         if (classDefinition == null && repositories != null)
         {
            Iterator it = repositories.iterator();
            while (it.hasNext())
            {
               ObjectName name = (ObjectName) it.next();
               log.debug("searching repository " + name);
              
               try
               {
                  Object o =  server.getAttribute(name, "Instance");
                  LoaderRepository repository = (LoaderRepository) o;
                  Class c = repository.loadClass(className);
                  if (c == null)
                  {
                     continue;
                  }
                  log.debug("found class in repository " + name);
                  RepositoryClassLoader cl = (RepositoryClassLoader) c.getClassLoader();
                  classDefinition = loadByteCode(cl, className);
                  break;
               }
               catch (Exception e)
               {
                  log.debug("unable to get class from " + name + ": " + e.getMessage(), e);
               }
            }
         }
        
         if (classDefinition == null)
         {
            log.debug("unable to load class " + className);
         }
         classBytes = new ClassBytes(className, classDefinition);
      }
      return classBytes;
   }
View Full Code Here


     
      public Object invoke(InvocationRequest invocation) throws Throwable
      {
         Map metadMap = invocation.getRequestPayload();
         String className = (String) metadMap.get(MarshallerLoaderConstants.CLASSNAME);
         return new ClassBytes(className, null);
      }
View Full Code Here

      return ret;
   }

   private Object loadClassBytes(String className, ClassLoader classLoader)
   {
      ClassBytes classBytes = null;

      if(className != null)
      {
         byte[] classDefinition = ClassUtil.getClassBytes(className, classLoader);
        
         if (classDefinition == null && classLoaders != null)
         {
            Iterator it = classLoaders.iterator();
            while (it.hasNext())
            {
               ClassLoader cl = (ClassLoader) it.next();
               log.debug("trying classLoader " + cl);
               classDefinition = ClassUtil.getClassBytes(className, cl);
               if (classDefinition != null)
               {
                  break;
               }
            }
         }
        
         if (classDefinition == null)
         {
            log.debug("unable to load class " + className);
         }
         classBytes = new ClassBytes(className, classDefinition);
      }
      return classBytes;
   }
View Full Code Here

      return ret;
   }

   private Object loadClassBytes(String className, ClassLoader classLoader)
   {
      ClassBytes classBytes = null;

      if(className != null)
      {
         byte[] classDefinition = ClassUtil.getClassBytes(className, classLoader);
         classBytes = new ClassBytes(className, classDefinition);
      }
      return classBytes;
   }
View Full Code Here

      return ret;
   }

   private Object loadClassBytes(String className, ClassLoader classLoader)
   {
      ClassBytes classBytes = null;

      if(className != null)
      {
         byte[] classDefinition = ClassUtil.getClassBytes(className, classLoader);
        
         if (classDefinition == null && repositories != null)
         {
            Iterator it = repositories.iterator();
            while (it.hasNext())
            {
               ObjectName name = (ObjectName) it.next();
               log.debug("searching repository " + name);
              
               try
               {
                  Object o =  server.getAttribute(name, "Instance");
                  LoaderRepository repository = (LoaderRepository) o;
                  Class c = repository.getCachedClass(className);
                  if (c == null)
                  {
                     continue;
                  }
                  log.debug("found class in repository " + name);
                  RepositoryClassLoader cl = (RepositoryClassLoader) c.getClassLoader();
                  classDefinition = loadByteCode(cl, className);
               }
               catch (Exception e)
               {
                  log.debug("unable to get class from " + name + ": " + e.getMessage(), e);
               }
            }
         }
        
         if (classDefinition == null)
         {
            log.debug("unable to load class " + className);
         }
         classBytes = new ClassBytes(className, classDefinition);
      }
      return classBytes;
   }
View Full Code Here

      return ret;
   }

   private Object loadClassBytes(String className, ClassLoader classLoader)
   {
      ClassBytes classBytes = null;

      if(className != null)
      {
         byte[] classDefinition = ClassUtil.getClassBytes(className, classLoader);
        
         if (classDefinition == null && classLoaders != null)
         {
            Iterator it = classLoaders.iterator();
            while (it.hasNext())
            {
               ClassLoader cl = (ClassLoader) it.next();
               log.debug("trying classLoader " + cl);
               classDefinition = ClassUtil.getClassBytes(className, cl);
               if (classDefinition != null)
               {
                  break;
               }
            }
         }
        
         if (classDefinition == null)
         {
            log.debug("unable to load class " + className);
         }
         classBytes = new ClassBytes(className, classDefinition);
      }
      return classBytes;
   }
View Full Code Here

/* 148 */     return ret;
/*     */   }
/*     */
/*     */   private Object loadClassBytes(String className, ClassLoader classLoader)
/*     */   {
/* 153 */     ClassBytes classBytes = null;
/*     */
/* 155 */     if (className != null)
/*     */     {
/* 157 */       byte[] classDefinition = ClassUtil.getClassBytes(className, classLoader);
/* 158 */       classBytes = new ClassBytes(className, classDefinition);
/*     */     }
/* 160 */     return classBytes;
/*     */   }
View Full Code Here

     
      public Object invoke(InvocationRequest invocation) throws Throwable
      {
         Map metadMap = invocation.getRequestPayload();
         String className = (String) metadMap.get(MarshallerLoaderConstants.CLASSNAME);
         return new ClassBytes(className, null);
      }
View Full Code Here

TOP

Related Classes of org.jboss.remoting.loading.ClassBytes

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.