Package org.apache.axis2.clustering

Examples of org.apache.axis2.clustering.ClusteringFault


                         Channel.SEND_OPTIONS_USE_ACK);
            if (log.isDebugEnabled()) {
                log.debug("Sent " + msg + " to self");
            }
        } catch (Exception e) {
            throw new ClusteringFault(e);
        }
    }
View Full Code Here


            }
        } catch (NotSerializableException e) {
            String message = "Could not send command message to " + TribesUtil.getName(member) +
                             " since it is not serializable.";
            log.error(message, e);
            throw new ClusteringFault(message, e);
        } catch (ChannelException e) {
            log.error("Could not send message to " + TribesUtil.getName(member));
            ChannelException.FaultyMember[] faultyMembers = e.getFaultyMembers();
            log.error("Member " + TribesUtil.getName(member) + " is faulty",
                      faultyMembers[0].getCause());
View Full Code Here

                }
            } catch (NotSerializableException e) {
                String message = "Could not send command message " + msg +
                                 " to group since it is not serializable.";
                log.error(message, e);
                throw new ClusteringFault(message, e);
            } catch (ChannelException e) {
                log.error("Could not send message to some members", e);
                ChannelException.FaultyMember[] faultyMembers = e.getFaultyMembers();
                for (int i = 0; i < faultyMembers.length; i++) {
                    ChannelException.FaultyMember faultyMember = faultyMembers[i];
View Full Code Here

                         Channel.SEND_OPTIONS_USE_ACK);
            if (log.isDebugEnabled()) {
                log.debug("Sent " + msg + " to self");
            }
        } catch (Exception e) {
            throw new ClusteringFault(e);
        }
    }
View Full Code Here

            }
        } catch (NotSerializableException e) {
            String message = "Could not send command message to " + TribesUtil.getHost(member) +
                             " since it is not serializable.";
            log.error(message, e);
            throw new ClusteringFault(message, e);
        } catch (ChannelException e) {
            log.error("Could not send message to " + TribesUtil.getHost(member));
            ChannelException.FaultyMember[] faultyMembers = e.getFaultyMembers();
            log.error("Member " + TribesUtil.getHost(member) + " is faulty",
                      faultyMembers[0].getCause());
View Full Code Here

        try {
            channel.start(Channel.DEFAULT);
            String localHost = TribesUtil.getLocalHost(channel);
            if (localHost.startsWith("127.0.")) {
                channel.stop(Channel.DEFAULT);
                throw new ClusteringFault("Cannot join cluster using IP " + localHost +
                                          ". Please set an IP address other than " +
                                          localHost + " in your /etc/hosts file or set the " +
                                          ClusteringConstants.LOCAL_IP_ADDRESS +
                                          " System property and retry.");
            }
        } catch (ChannelException e) {
            throw new ClusteringFault("Error starting Tribes channel", e);
        }

        // RpcChannel is a ChannelListener. When the reply to a particular request comes back, it
        // picks it up. Each RPC is given a UUID, hence can correlate the request-response pair
        rpcChannel =
View Full Code Here

                if (log.isDebugEnabled()) {
                    log.debug("Exit: TribesClusterManager::shutdown");
                }

                throw new ClusteringFault(e);
            }
        }
        log.debug("Exit: TribesClusterManager::shutdown");
    }
View Full Code Here

                    updateCmd.addProperty(diff);
                } else {
                    String msg =
                            "Trying to replicate non-serializable property " + key +
                            " in context " + context;
                    throw new ClusteringFault(msg);
                }
            }
        }
    }
View Full Code Here

                tenants.add(tb);
            }
        } catch (Exception e) {
            String msg = "Cannot get Active tenants";
            log.error(msg, e);
            throw new ClusteringFault(msg, e);
        }
    }
View Full Code Here

                try {
                    host = Utils.getIpAddress();
                } catch (SocketException e) {
                    String msg = "Could not get local IP address";
                    log.error(msg, e);
                    throw new ClusteringFault(msg, e);
                }
            } catch (Exception e) {
                String msg = "Could not get the localhost name";
                log.error(msg, e);
                throw new ClusteringFault(msg, e);
            }
        }
        receiver.setAddress(host);
        try {
            localMember.setHostname(host);
        } catch (IOException e) {
            String msg = "Could not set the local member's name";
            log.error(msg, e);
            throw new ClusteringFault(msg, e);
        }

        Parameter localPort = getParameter(TribesConstants.LOCAL_MEMBER_PORT);
        int port;
        try {
            if (localPort != null) {
                port = Integer.parseInt(((String) localPort.getValue()).trim());
                port = getLocalPort(new ServerSocket(), localMember.getHostname(), port, 4000, 1000);
            } else { // In cases where the localport needs to be automatically figured out
                port = getLocalPort(new ServerSocket(), localMember.getHostname(), -1, 4000, 1000);
            }
        } catch (IOException e) {
            String msg =
                    "Could not allocate the specified port or a port in the range 4000-5000 " +
                    "for local host " + localMember.getHostname() +
                    ". Check whether the IP address specified or inferred for the local " +
                    "member is correct.";
            log.error(msg, e);
            throw new ClusteringFault(msg, e);
        }

        byte[] payload = "ping".getBytes();
        localMember.setPayload(payload);
        receiver.setPort(port);
        localMember.setPort(port);
        localMember.setDomain(localDomain);
        staticMembershipInterceptor.setLocalMember(localMember);

        // ------------ END: Configure and add the local member ---------------------

        // ------------ START: Add other members ---------------------
        for (Member member : members) {
            StaticMember tribesMember;
            try {
                tribesMember = new StaticMember(member.getHostName(), member.getPort(),
                                                0, payload);
            } catch (IOException e) {
                String msg = "Could not add static member " +
                             member.getHostName() + ":" + member.getPort();
                log.error(msg, e);
                throw new ClusteringFault(msg, e);
            }

            // Do not add the local member to the list of members
            if (!(Arrays.equals(localMember.getHost(), tribesMember.getHost()) &&
                  localMember.getPort() == tribesMember.getPort())) {
View Full Code Here

TOP

Related Classes of org.apache.axis2.clustering.ClusteringFault

Copyright © 2018 www.massapicom. 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.