private void setData(NioSender[] senders, byte[] data) throws ChannelException { ChannelException x = null; for (int i=0; i<senders.length; i++ ) { try { senders[i].setMessage(data); }catch ( IOException io ) { if ( x==null ) x = new ChannelException(io); x.addFaultyMember(senders[i].getDestination(),io); } } if ( x != null ) throw x; }
private void setData(NioSender[] senders, byte[] data) throws ChannelException { ChannelException x = null; for (int i=0; i<senders.length; i++ ) { try { senders[i].setMessage(data); }catch ( IOException io ) { if ( x==null ) x = new ChannelException(io); x.addFaultyMember(senders[i].getDestination(),io); } } if ( x != null ) throw x; }
private void connect(NioSender[] senders) throws ChannelException { ChannelException x = null; for (int i=0; i<senders.length; i++ ) { try { senders[i].connect(); }catch ( IOException io ) { if ( x==null ) x = new ChannelException(io); x.addFaultyMember(senders[i].getDestination(),io); } } if ( x != null ) throw x; }
private void setData(NioSender[] senders, byte[] data) throws ChannelException { ChannelException x = null; for (int i=0; i<senders.length; i++ ) { try { senders[i].setMessage(data); }catch ( IOException io ) { if ( x==null ) x = new ChannelException(io); x.addFaultyMember(senders[i].getDestination(),io); } } if ( x != null ) throw x; }
private void connect(NioSender[] senders) throws ChannelException { ChannelException x = null; for (int i=0; i<senders.length; i++ ) { try { senders[i].connect(); }catch ( IOException io ) { if ( x==null ) x = new ChannelException(io); x.addFaultyMember(senders[i].getDestination(),io); } } if ( x != null ) throw x; }
private void connect(NioSender[] senders) throws ChannelException { ChannelException x = null; for (int i=0; i<senders.length; i++ ) { try { senders[i].connect(); }catch ( IOException io ) { if ( x==null ) x = new ChannelException(io); x.addFaultyMember(senders[i].getDestination(),io); } } if ( x != null ) throw x; }
private void setData(NioSender[] senders, byte[] data) throws ChannelException { ChannelException x = null; for (int i=0; i<senders.length; i++ ) { try { senders[i].setMessage(data); }catch ( IOException io ) { if ( x==null ) x = new ChannelException(io); x.addFaultyMember(senders[i].getDestination(),io); } } if ( x != null ) throw x; }
private void connect(NioSender[] senders) throws ChannelException { ChannelException x = null; for (int i=0; i<senders.length; i++ ) { try { if (!senders[i].isConnected()) senders[i].connect(); }catch ( IOException io ) { if ( x==null ) x = new ChannelException(io); x.addFaultyMember(senders[i].getDestination(),io); } } if ( x != null ) throw x; }
sender.setComplete(true); if ( Logs.MESSAGES.isTraceEnabled() ) { Logs.MESSAGES.trace("ParallelNioSender - Sent msg:" + new UniqueId(msg.getUniqueId()) + " at " +new java.sql.Timestamp(System.currentTimeMillis())+ " to "+sender.getDestination().getName()); SenderState.getSenderState(sender.getDestination()).setReady(); log.trace("Error while processing send to " + sender.getDestination().getName(), x); SenderState state = SenderState.getSenderState(sender.getDestination()); int attempt = sender.getAttempt()+1; boolean retry = (sender.getAttempt() <= maxAttempts && maxAttempts>0); state.setSuspect(); if ( retry ) log.warn("Member send is failing for:" + sender.getDestination().getName() +" ; Setting to suspect and retrying."); else log.warn("Member send is failing for:" + sender.getDestination().getName() +" ; Setting to suspect.", x); log.warn("Not retrying send for:" + sender.getDestination().getName() + "; Sender is disconnected."); ChannelException cx = new ChannelException("Send failed, and sender is disconnected. Not retrying.",x); cx.addFaultyMember(sender.getDestination(),x); throw cx; cx.addFaultyMember(sender.getDestination(),x); throw cx;
sender.setComplete(true); if ( Logs.MESSAGES.isTraceEnabled() ) { Logs.MESSAGES.trace("ParallelNioSender - Sent msg:" + new UniqueId(msg.getUniqueId()) + " at " +new java.sql.Timestamp(System.currentTimeMillis())+ " to "+sender.getDestination().getName()); SenderState.getSenderState(sender.getDestination()).setReady(); SenderState state = SenderState.getSenderState(sender.getDestination()); int attempt = sender.getAttempt()+1; boolean retry = (sender.getAttempt() <= maxAttempts && maxAttempts>0); state.setSuspect(); if ( retry ) log.warn("Member send is failing for:" + sender.getDestination().getName() +" ; Setting to suspect and retrying."); else log.warn("Member send is failing for:" + sender.getDestination().getName() +" ; Setting to suspect.", x); log.warn("Not retrying send for:" + sender.getDestination().getName() + "; Sender is disconnected."); ChannelException cx = new ChannelException("Send failed, and sender is disconnected. Not retrying.",x); cx.addFaultyMember(sender.getDestination(),x); throw cx; cx.addFaultyMember(sender.getDestination(),x); throw cx;
new UniqueId(msg.getUniqueId()) + " at " + new java.sql.Timestamp(System.currentTimeMillis()) + " to " + sender.getDestination().getName()); SenderState.getSenderState(sender.getDestination()).setReady(); log.trace("Error while processing send to " + sender.getDestination().getName(), x); SenderState state = SenderState.getSenderState(sender.getDestination()); int attempt = sender.getAttempt()+1; boolean retry = (sender.getAttempt() <= maxAttempts && maxAttempts>0); if ( retry ) log.warn("Member send is failing for:" + sender.getDestination().getName() + " ; Setting to suspect and retrying."); else log.warn("Member send is failing for:" + sender.getDestination().getName() + " ; Setting to suspect.", x); log.warn("Not retrying send for:" + sender.getDestination().getName() + "; Sender is disconnected."); ChannelException cx = new ChannelException( "Send failed, and sender is disconnected. Not retrying.", x); cx.addFaultyMember(sender.getDestination(),x); throw cx;
new UniqueId(msg.getUniqueId()) + " at " + new java.sql.Timestamp(System.currentTimeMillis()) + " to " + sender.getDestination().getName()); SenderState.getSenderState(sender.getDestination()).setReady(); log.trace("Error while processing send to " + sender.getDestination().getName(), x); SenderState state = SenderState.getSenderState(sender.getDestination()); int attempt = sender.getAttempt()+1; boolean retry = (attempt <= maxAttempts && maxAttempts>0); state.setSuspect(); if ( retry ) log.warn(sm.getString("parallelNioSender.send.fail.retrying", sender.getDestination().getName())); else log.warn(sm.getString("parallelNioSender.send.fail", sender.getDestination().getName()), x); log.warn(sm.getString("parallelNioSender.sender.disconnected.notRetry", sender.getDestination().getName())); ChannelException cx = new ChannelException(sm.getString("parallelNioSender.sender.disconnected.sendFailed"), x); cx.addFaultyMember(sender.getDestination(),x); result.failed(cx); break; Integer.toString(sender.getAttempt()), Integer.toString(maxAttempts)), x); cx.addFaultyMember(sender.getDestination(),x); result.failed(cx);
cx.addFaultyMember(senders[i].getDestination(),x); cx.addFaultyMember(senders[i].getDestination(),cxtimeout);
if ( cx==null ) cx = new ChannelException("Operation has timed out("+getTimeout()+" ms.)."); for (int i=0; i<senders.length; i++ ) { if (!senders[i].isComplete() ) cx.addFaultyMember(senders[i].getDestination(),cxtimeout);
if ( cx==null ) cx = new ChannelException("Operation has timed out("+getTimeout()+" ms.)."); for (int i=0; i<senders.length; i++ ) { if (!senders[i].isComplete() ) cx.addFaultyMember(senders[i].getDestination(),cxtimeout);
for (int i=0; i<senders.length; i++ ) { if (!senders[i].isComplete()) { cx.addFaultyMember(senders[i].getDestination(),cxtimeout);