Author: fhanik
Date: Wed Aug 22 13:18:35 2007
New Revision: 568741

URL: http://svn.apache.org/viewvc?rev=568741&view=rev
Log:
Log deserialization errors as error
log channellistener errors as warnings


Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java

Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java?rev=568741&r1=568740&r2=568741&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java Wed 
Aug 22 13:18:35 2007
@@ -248,7 +248,12 @@
             if ( (msg.getOptions() & SEND_OPTIONS_BYTE_MESSAGE) == 
SEND_OPTIONS_BYTE_MESSAGE ) {
                 fwd = new ByteMessage(msg.getMessage().getBytes());
             } else {
-                fwd = 
XByteBuffer.deserialize(msg.getMessage().getBytesDirect(),0,msg.getMessage().getLength());
+                try {
+                    fwd = 
XByteBuffer.deserialize(msg.getMessage().getBytesDirect(), 0, 
msg.getMessage().getLength());
+                }catch (Exception sx) {
+                    log.error("Unable to deserialize message:"+msg,sx);
+                    return;
+                }
             }
             if ( Logs.MESSAGES.isTraceEnabled() ) {
                 Logs.MESSAGES.trace("GroupChannel - Receive Message:" + new 
UniqueId(msg.getUniqueId()) + " is " +fwd);
@@ -278,8 +283,10 @@
             }
 
         } catch ( Exception x ) {
-            if ( log.isDebugEnabled() ) log.error("Unable to process 
channel:IOException.",x);
-            throw new RemoteProcessException("IOException:"+x.getMessage(),x);
+            //this could be the channel listener throwing an exception, we 
should log it 
+            //as a warning.
+            if ( log.isWarnEnabled() ) log.warn("Error receiving message:",x);
+            throw new RemoteProcessException("Exception:"+x.getMessage(),x);
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to