Package org.apache.catalina.tribes

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


        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

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

            for (int i = 0; i < destination.length; i++) {
                try {
                    sendMessage(message, destination[i]);
                } catch (Exception x) {
                    if (exception == null) exception = new ChannelException(x);
                    exception.addFaultyMember(destination[i]);
                }
            }
            if (exception != null)throw exception;
        } else {
            MultiPointSender sender = getParallelSender();
View Full Code Here

    public void sendMessage(Member[] destination, ChannelMessage message) throws ChannelException {
        if ( !connected ) throw new ChannelException("Sender not connected.");
        ParallelNioSender sender = (ParallelNioSender)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], new NullPointerException("Unable to retrieve a sender from the sender pool"));
            throw cx;
        } else {
            try {
                sender.sendMessage(destination, message);
                sender.keepalive();
View Full Code Here

        for ( int i=0; i<senders.length; i++ ) {
            try {
                senders[i].sendMessage(data,(msg.getOptions()&Channel.SEND_OPTIONS_USE_ACK)==Channel.SEND_OPTIONS_USE_ACK);
            } catch (Exception x) {
                if (cx == null) cx = new ChannelException(x);
                cx.addFaultyMember(destination[i],x);
            }
        }
        if (cx!=null ) throw cx;
    }
View Full Code Here

                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

            try {
                BioSender sender = (BioSender)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

        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], new NullPointerException("Unable to retrieve a sender from the sender pool"));
                throw cx;
            } else {
                sender.sendMessage(destination, msg);
            }
            sender.keepalive();
View Full Code Here

        for ( int i=0; i<senders.length; i++ ) {
            try {
                senders[i].sendMessage(data,(msg.getOptions()&Channel.SEND_OPTIONS_USE_ACK)==Channel.SEND_OPTIONS_USE_ACK);
            } catch (Exception x) {
                if (cx == null) cx = new ChannelException(x);
                cx.addFaultyMember(destination[i],x);
            }
        }
        if (cx!=null ) throw cx;
    }
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.