Package org.apache.synapse

Examples of org.apache.synapse.SynapseException


    private static Log log = LogFactory.getLog(SynapseXMLConfigurationFactory.class);

    public SynapseConfiguration getConfiguration(OMElement definitions, Properties properties) {

        if (!definitions.getQName().equals(XMLConfigConstants.DEFINITIONS_ELT)) {
            throw new SynapseException(
                    "Wrong QName for this configuration factory " + definitions.getQName());
        }
        SynapseConfiguration config = SynapseConfigUtils.newConfiguration();              
        config.setDefaultQName(definitions.getQName());
View Full Code Here


        }
    }

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

    private static void handleConfigurationError(String componentType, String msg, Exception e) {
        if (SynapseConfigUtils.isFailSafeEnabled(componentType)) {
            log.warn(msg + " - Continue in fail-safe mode", e);
        } else {
            log.error(msg, e);
            throw new SynapseException(msg, e);
        }
    }
View Full Code Here

            CronTrigger cronTrigger = new CronTrigger();
            try {
                cronTrigger.setCronExpression(cronExpression);
                trigger = cronTrigger;
            } catch (ParseException e) {
                throw new SynapseException("Error setting cron expression : " +
                        e.getMessage() + cronExpression, e);
            }
        }
        trigger.setName(name + "-trigger");

        JobDetail jobDetail = getJobDetail();
        JobDataMap jobDataMap = getJobDataMap();
        jobDataMap.put(MessageProcessorConsents.MESSAGE_STORE,
                configuration.getMessageStore(messageStore));
        jobDataMap.put(MessageProcessorConsents.PARAMETERS, parameters);
        jobDetail.setJobDataMap(jobDataMap);
        jobDetail.setGroup(SCHEDULED_MESSAGE_PROCESSOR_GROUP);

        try {
            scheduler.scheduleJob(jobDetail, trigger);
        } catch (SchedulerException e) {
            throw new SynapseException("Error scheduling job : " + jobDetail
                    + " with trigger " + trigger ,e);
        }
    }
View Full Code Here

                    scheduler.standby();
                }

                state = State.STOP;
            } catch (SchedulerException e) {
                throw new SynapseException("Error ShuttingDown Message processor scheduler ", e);
            }
        }
    }
View Full Code Here

                }

                sf.initialize(quartzConfig);
            }
        } catch (SchedulerException e) {
            throw new SynapseException("Error initiating scheduler factory "
                    + sf + "with configuration loaded from " + quartzConfig, e);
        }

        try {
            scheduler = sf.getScheduler();

        } catch (SchedulerException e) {
            throw new SynapseException("Error getting a  scheduler instance form scheduler" +
                    " factory " + sf, e);
        }

        try {
            scheduler.start();

            state = State.INITIALIZED;

            this.start();
        } catch (SchedulerException e) {
            throw new SynapseException("Error starting the scheduler", e);
        }
    }
View Full Code Here

    if (mc.getEnvelope() == null) {
      try {
        mc.setEnvelope(OMAbstractFactory.getSOAP12Factory()
            .createSOAPEnvelope());
      } catch (Exception e) {
        throw new SynapseException(e);
      }
    }
    setXMLPayload(mc.getEnvelope(), element);
  }
View Full Code Here

    if (mc.getEnvelope() == null) {
      try {
        mc.setEnvelope(OMAbstractFactory.getSOAP12Factory()
            .createSOAPEnvelope());
      } catch (Exception e) {
        throw new SynapseException(e);
      }
    }
    setBinaryPayload(mc.getEnvelope(), dh);

  }
View Full Code Here

    if (mc.getEnvelope() == null) {
      try {
        mc.setEnvelope(OMAbstractFactory.getSOAP12Factory()
            .createSOAPEnvelope());
      } catch (Exception e) {
        throw new SynapseException(e);
      }
    }
    setTextPayload(mc.getEnvelope(), text);
  }
View Full Code Here

        log.debug("null map element returned");
        return;
      }
      setXMLPayload(envelope, mapElt);
    } else {
      throw new SynapseException("cannot handle any other instance of SimpleMap at this point TODO");
    }
  }
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.