Author: fhanik Date: Wed Aug 22 13:19:54 2007 New Revision: 568742 URL: http://svn.apache.org/viewvc?rev=568742&view=rev Log: backport from trunk
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java?rev=568742&r1=568741&r2=568742&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java Wed Aug 22 13:19:54 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]