incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: incubator-altrmi/src/java/org/apache/altrmi/server/impl/messenger SynchronousMessengerServer.java
Date Wed, 26 Mar 2003 20:23:03 GMT
hammant     2003/03/26 12:23:03

  Modified:    src/java/org/apache/altrmi/server/impl AbstractServer.java
               src/java/org/apache/altrmi/server/impl/adapters
                        InvocationHandlerAdapter.java
               src/java/org/apache/altrmi/server/impl/messenger
                        SynchronousMessengerServer.java
  Log:
  log NPE in invocationHandlerAdapter
  
  Revision  Changes    Path
  1.3       +2 -1      incubator-altrmi/src/java/org/apache/altrmi/server/impl/AbstractServer.java
  
  Index: AbstractServer.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/src/java/org/apache/altrmi/server/impl/AbstractServer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractServer.java	17 Feb 2003 20:28:39 -0000	1.2
  +++ AbstractServer.java	26 Mar 2003 20:23:03 -0000	1.3
  @@ -117,6 +117,7 @@
   
       public void setServerMonitor(ServerMonitor serverMonitor) {
           m_serverMonitor = serverMonitor;
  +        m_invocationHandlerAdapter.setServerMonitor(serverMonitor);
       }
   
       protected synchronized ServerMonitor getServerMonitor()
  
  
  
  1.4       +27 -3     incubator-altrmi/src/java/org/apache/altrmi/server/impl/adapters/InvocationHandlerAdapter.java
  
  Index: InvocationHandlerAdapter.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/src/java/org/apache/altrmi/server/impl/adapters/InvocationHandlerAdapter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InvocationHandlerAdapter.java	20 Feb 2003 07:36:59 -0000	1.3
  +++ InvocationHandlerAdapter.java	26 Mar 2003 20:23:03 -0000	1.4
  @@ -65,9 +65,11 @@
   import org.apache.altrmi.server.ClassRetriever;
   import org.apache.altrmi.server.MethodInvocationHandler;
   import org.apache.altrmi.server.ServerInvocationHandler;
  +import org.apache.altrmi.server.ServerMonitor;
   import org.apache.altrmi.server.impl.Session;
   import org.apache.altrmi.server.impl.DefaultAuthenticator;
   import org.apache.altrmi.server.impl.DefaultMethodInvocationHandler;
  +import org.apache.altrmi.server.impl.ConsoleServerMonitor;
   import org.apache.altrmi.server.impl.classretrievers.NoClassRetriever;
   import org.apache.altrmi.common.Reply;
   import org.apache.altrmi.common.Request;
  @@ -123,6 +125,7 @@
       private boolean m_suspend = false;
       private ClassRetriever m_classRetriever = new NoClassRetriever();
       private Authenticator m_altrmiAuthenticator = new DefaultAuthenticator();
  +    private ServerMonitor m_serverMonitor;
   
       /**
        * Set a ClassRetriever
  @@ -229,9 +232,15 @@
           {
               if (request instanceof MethodRequest)
               {
  -                throw new NullPointerException("Null pointer exception, processing method"
+ ((MethodRequest) request).getMethodSignature());
  +                String methd = ((MethodRequest) request).getMethodSignature();
  +                getServerMonitor().unexpectedException(InvocationHandlerAdapter.class,"InvocationHandlerAdapter.handleInvocation()
NPE processing method " + methd,npe);
  +                throw new NullPointerException("Null pointer exception, processing method"
+ methd);
  +            }
  +            else
  +            {
  +                getServerMonitor().unexpectedException(InvocationHandlerAdapter.class,"InvocationHandlerAdapter.handleInvocation()
NPE",npe);
  +                throw npe;
               }
  -            throw npe;
           }
       }
   
  @@ -679,4 +688,19 @@
       {
           m_suspend = false;
       }
  +
  +    public void setServerMonitor(ServerMonitor serverMonitor)
  +    {
  +        m_serverMonitor = serverMonitor;
  +    }
  +
  +    public synchronized ServerMonitor getServerMonitor()
  +    {
  +        if (m_serverMonitor == null)
  +        {
  +            m_serverMonitor = new ConsoleServerMonitor();
  +        }
  +        return m_serverMonitor;
  +    }
  +
   }
  
  
  
  1.4       +3 -3      incubator-altrmi/src/java/org/apache/altrmi/server/impl/messenger/SynchronousMessengerServer.java
  
  Index: SynchronousMessengerServer.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/src/java/org/apache/altrmi/server/impl/messenger/SynchronousMessengerServer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SynchronousMessengerServer.java	25 Mar 2003 08:07:30 -0000	1.3
  +++ SynchronousMessengerServer.java	26 Mar 2003 20:23:03 -0000	1.4
  @@ -54,7 +54,7 @@
    */
   package org.apache.altrmi.server.impl.messenger;
   
  -import org.apache.altrmi.common.AltrmiRuntimeException;
  +
   import org.apache.altrmi.common.Reply;
   import org.apache.altrmi.common.Request;
   import org.apache.altrmi.common.SerializationHelper;
  @@ -63,13 +63,13 @@
   import org.apache.altrmi.server.impl.AbstractServer;
   import org.apache.altrmi.server.impl.adapters.InvocationHandlerAdapter;
   import org.apache.commons.messenger.Messenger;
  -import org.apache.commons.messenger.MessengerListener;
   
   import javax.jms.Destination;
   import javax.jms.JMSException;
   import javax.jms.Message;
   import javax.jms.ObjectMessage;
  -import java.io.Writer;
  +import javax.jms.MessageConsumer;
  +
   
   /**
    * Class SynchronousMessengerServer
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message