Package org.apache.synapse

Examples of org.apache.synapse.SynapseException


        }
    }

    private static void handleException(String msg, Exception e) {
        log.error(msg, e);
        throw new SynapseException(msg, e);
    }
View Full Code Here


            && (property.getAttributeValue(new QName("expression")) == null);
    }

    private static void handleException(String message, Throwable e) {
        log.error(message + e.getMessage());
        throw new SynapseException(message, e);
    }
View Full Code Here

        throw new SynapseException(message, e);
    }

    private static void handleException(String message) {
        log.error(message);
        throw new SynapseException(message);
    }   
View Full Code Here

     */
    private static void handleException (String message) {
        if (log.isDebugEnabled()) {
            log.debug(message);
        }
        throw new SynapseException(message);
    }
View Full Code Here

                return endpoints.get(position);
            } else {
                String msg = "Algorithm: WeightedRoundRobin algorithm not initialized properly";
                log.error(msg);
                throw new SynapseException(msg);
            }
        }
    }       
View Full Code Here

    public void init(SynapseEnvironment se) {
        if (endpoints == null) {
            String msg = "Endpoints are not set, cannot initialize the algorithm";
            log.error(msg);
            throw new SynapseException(msg);
        }

        endpointStates = new EndpointState[endpoints.size()];

        for (int i = 0; i < endpoints.size(); i++) {
            Endpoint endpoint = endpoints.get(i);
            if (!(endpoint instanceof PropertyInclude)) {
                EndpointState state = new EndpointState(i, DEFAULT_WEIGHT);
                endpointStates[i] = state;
            } else {
                MediatorProperty property =
                        ((PropertyInclude)endpoint).getProperty(LOADBALANCE_WEIGHT);
                EndpointState state;
                if (property != null) {
                    int weight = Integer.parseInt(property.getValue());

                    if (weight <= 0) {
                        String msg = "Weight must be greater than zero";
                        log.error(msg);
                        throw new SynapseException(msg);
                    }

                    state = new EndpointState(i, weight);
                } else {
                    state = new EndpointState(i, DEFAULT_WEIGHT);
View Full Code Here

        return xpath;
    }

    private static void handleException(String message) {
        log.error(message);
        throw new SynapseException(message);
    }
View Full Code Here

            org.apache.axis2.context.MessageContext axisMsgCtx) throws AxisFault {

        if (synCfg == null || synEnv == null) {
            String msg = "Synapse environment has not initialized properly..";
            log.fatal(msg);
            throw new SynapseException(msg);
        }

        // we should try to get the synapse configuration and environment from
        // the axis2 configuration.
        SynapseEnvironment synapseEnvironment = getSynapseEnvironment(axisMsgCtx);
View Full Code Here

            String msg = "The applicationDomain property has not been specified in the " +
                         "dynamicLoadbalance configuration in the synapse.xml file. This has " +
                         "to be the same as the applicationDomain entry in the loadBalancer" +
                         " entry in the axis2.xml file.";
            log.error(msg);
            throw new SynapseException(msg);
        }
        this.algorithm = algorithm;
    }
View Full Code Here

        ClusterManager clusterManager = configCtx.getAxisConfiguration().getClusterManager();
        if(clusterManager == null){
            String msg = "In order to enable load balancing across an Axis2 cluster, " +
                         "the cluster entry should be enabled in the axis2.xml file";
            log.error(msg);
            throw new SynapseException(msg);
        }
        lbEventHandler = clusterManager.getLoadBalanceEventHandler(lbDomain);
        if(lbEventHandler == null){
            String msg =
                    "A LoadBalanceEventHandler has not been specified in the axis2.xml " +
                    "file for the domain " + lbDomain;
            log.error(msg);
            throw new SynapseException(msg);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.synapse.SynapseException

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.