Examples of addFaultyMember()


Examples of org.apache.catalina.tribes.ChannelException.addFaultyMember()

                result[i] = sender;
                if (!result[i].isConnected() ) result[i].connect();
                result[i].keepalive();
            }catch (Exception x ) {
                if ( cx== null ) cx = new ChannelException(x);
                cx.addFaultyMember(destination[i],x);
            }
        }
        if ( cx!=null ) throw cx;
        else return result;
    }
View Full Code Here

Examples of org.apache.catalina.tribes.ChannelException.addFaultyMember()

            try {
                BioSender sender = bioSenders.get(mbr);
                sender.disconnect();
            }catch ( Exception e ) {
                if ( x == null ) x = new ChannelException(e);
                x.addFaultyMember(mbr,e);
            }
            bioSenders.remove(mbr);
        }
        if ( x != null ) throw x;
    }
View Full Code Here

Examples of org.apache.catalina.tribes.ChannelException.addFaultyMember()

        MultiPointSender sender = null;
        try {
            sender = (MultiPointSender)getSender();
            if (sender == null) {
                ChannelException cx = new ChannelException("Unable to retrieve a data sender, time out error.");
                for (int i = 0; i < destination.length; i++) cx.addFaultyMember(destination[i]);
                throw cx;
            } else {
                sender.sendMessage(destination, msg);
            }
            sender.keepalive();
View Full Code Here

Examples of org.apache.catalina.tribes.ChannelException.addFaultyMember()

                } catch (Exception x ) {
                    if ( cx == null ) {
                        if ( x instanceof ChannelException ) cx = (ChannelException)x;
                        else cx = new ChannelException("Parallel NIO send failed.", x);
                    } else {
                        if (x instanceof ChannelException) cx.addFaultyMember( ( (ChannelException) x).getFaultyMembers());
                    }
                }
                //bail out if all remaining senders are failing
                if ( cx != null && cx.getFaultyMembers().length == remaining ) throw cx;
                delta = System.currentTimeMillis() - start;
View Full Code Here

Examples of org.apache.catalina.tribes.ChannelException.addFaultyMember()

            }
            if ( remaining > 0 ) {
                //timeout has occured
                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());
                }
                throw cx;
            }
        } catch (Exception x ) {
            try { this.disconnect(); } catch (Exception ignore) {}
View Full Code Here

Examples of org.apache.catalina.tribes.ChannelException.addFaultyMember()

                    }                   
                }
                if ( !isConnected() ) {
                    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());
                    throw cx;
                }
               
                byte[] data = sender.getMessage();
                if ( retry ) {
View Full Code Here

Examples of org.apache.catalina.tribes.ChannelException.addFaultyMember()

                    }catch ( Exception ignore){
                        state.setFailing();
                    }
                } else {
                    ChannelException cx = new ChannelException("Send failed, attempt:"+sender.getAttempt()+" max:"+maxAttempts,x);
                    cx.addFaultyMember(sender.getDestination());
                    throw cx;
                }//end if
            }
        }
        return completed;
View Full Code Here

Examples of org.apache.catalina.tribes.ChannelException.addFaultyMember()

        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());
            }
        }
        if ( x != null ) throw x;
    }
   
View Full Code Here

Examples of org.apache.catalina.tribes.ChannelException.addFaultyMember()

        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());
            }
        }
        if ( x != null ) throw x;
    }
   
View Full Code Here

Examples of org.apache.catalina.tribes.ChannelException.addFaultyMember()

                try {
                    sender = new NioSender(destination[i]);
                    nioSenders.put(destination[i], sender);
                }catch ( UnknownHostException x ) {
                    if ( cx == null ) cx = new ChannelException("Unable to setup NioSender.",x);
                    cx.addFaultyMember(destination[i]);
                }
            }
            if ( sender != null ) {
                sender.reset();
                sender.setSelector(selector);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.