[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting ...

Tom Elrod tom.elrod at jboss.com
Fri Jan 12 12:19:48 EST 2007


  User: telrod  
  Date: 07/01/12 12:19:48

  Modified:    src/main/org/jboss/remoting   Tag: remoting_1_4
                        ServerInvoker.java InvokerRegistry.java
  Log:
  JBREM-659 - changed all ClassLoader.loadClass() calls to Class.forName() calls so will work with jdk 1.6
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.28.2.2  +4 -14     JBossRemoting/src/main/org/jboss/remoting/ServerInvoker.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ServerInvoker.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/ServerInvoker.java,v
  retrieving revision 1.28.2.1
  retrieving revision 1.28.2.2
  diff -u -b -r1.28.2.1 -r1.28.2.2
  --- ServerInvoker.java	27 Sep 2006 18:23:27 -0000	1.28.2.1
  +++ ServerInvoker.java	12 Jan 2007 17:19:48 -0000	1.28.2.2
  @@ -45,6 +45,7 @@
   import org.jboss.remoting.transport.PortUtil;
   import org.jboss.remoting.security.ServerSocketFactoryMBean;
   import org.jboss.remoting.util.ServerSocketFactoryWrapper;
  +import org.jboss.remoting.serialization.ClassLoaderUtility;
   import org.jboss.util.threadpool.BasicThreadPool;
   import org.jboss.util.threadpool.BlockingMode;
   import org.jboss.util.threadpool.ThreadPool;
  @@ -56,7 +57,7 @@
    *
    * @author <a href="mailto:jhaynie at vocalocity.net">Jeff Haynie</a>
    * @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
  - * @version $Revision: 1.28.2.1 $
  + * @version $Revision: 1.28.2.2 $
    */
   public abstract class ServerInvoker extends AbstractInvoker implements ServerInvokerMBean
   {
  @@ -339,20 +340,9 @@
               // couldn't create from object name for mbean service, will try by class name
               if(serverSocketFactory == null)
               {
  -               //ClassLoader classLoader = invoker.getClassLoader();
  -               ClassLoader classLoader = null;
  -               if(classLoader == null)
  -               {
  -                  classLoader = Thread.currentThread().getContextClassLoader();
  -
  -                  if(classLoader == null)
  -                  {
  -                     classLoader = getClass().getClassLoader();
  -                  }
  -               }
                  try
                  {
  -                  Class cl = classLoader.loadClass(serverSocketFactoryString);
  +                  Class cl = ClassLoaderUtility.loadClass(serverSocketFactoryString, getClass());
   
                     Constructor serverSocketConstructor = null;
                     serverSocketConstructor = cl.getConstructor(new Class[]{});
  @@ -534,7 +524,7 @@
               {
                  try
                  {
  -                  onewayThreadPool = (ThreadPool) getClassLoader().loadClass(onewayThreadPoolClass).newInstance();
  +                  onewayThreadPool = (ThreadPool) Class.forName(onewayThreadPoolClass, false, getClassLoader()).newInstance();
                  }
                  catch(Exception e)
                  {
  
  
  
  1.22.2.2  +2 -2      JBossRemoting/src/main/org/jboss/remoting/InvokerRegistry.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: InvokerRegistry.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/InvokerRegistry.java,v
  retrieving revision 1.22.2.1
  retrieving revision 1.22.2.2
  diff -u -b -r1.22.2.1 -r1.22.2.2
  --- InvokerRegistry.java	28 Mar 2006 07:14:03 -0000	1.22.2.1
  +++ InvokerRegistry.java	12 Jan 2007 17:19:48 -0000	1.22.2.2
  @@ -42,7 +42,7 @@
    *
    * @author <a href="mailto:jhaynie at vocalocity.net">Jeff Haynie</a>
    * @author <a href="mailto:telrod at e2technologies.net">Tom Elrod</a>
  - * @version $Revision: 1.22.2.1 $
  + * @version $Revision: 1.22.2.2 $
    */
   public class InvokerRegistry
   {
  @@ -358,7 +358,7 @@
         String clientInvokerClassName = (String) clientInvokerFQN.get(protocol);
         if(clientInvokerClassName != null)
         {
  -         clientInvokerClass = ClassLoaderUtility.loadClass(clientInvokerClassName, InvokerRegistry.class);
  +         clientInvokerClass = ClassLoaderUtility.loadClass(InvokerRegistry.class, clientInvokerClassName);
         }
         return clientInvokerClass;
      }
  
  
  



More information about the jboss-cvs-commits mailing list