Package org.jboss.soa.esb

Examples of org.jboss.soa.esb.ConfigurationException


        listenerNode.setAttribute("name", listener.getName());

        try {
      bus = (FsBus) model.getBus(listener.getBusidref());
    } catch (ClassCastException e) {
      throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <fs-listener> must reference a <fs-bus>.");
    }
    try {
      provider = (FsProvider) model.getProvider(bus);
    } catch (ClassCastException e) {
      throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <fs-provider> instance.  Unexpected exception - this should have caused a validation error!");
    }
   
    FsMessageFilter messageFilter = listener.getFsMessageFilter();
    if(messageFilter == null) {
      messageFilter = bus.getFsMessageFilter();
      if(messageFilter == null) {
        throw new ConfigurationException("No <fs-detination> defined on either <fs-listener> [" + listener.getName() + "] or <fs-bus> [" + bus.getBusid() + "].");
      }
    }
    // Map the standard listener attributes - common across all listener types...
    MapperUtil.mapDefaultAttributes(listener, listenerNode, model);
    // Map the <property> elements targeted at the listener - from the listener itself.
View Full Code Here


        listenerNode.setAttribute("name", listener.getName());

        try {
      bus = (FsBus) model.getBus(listener.getBusidref());
    } catch (ClassCastException e) {
      throw new ConfigurationException("Invalid busid reference [" + listener.getBusidref() + "] on listener [" + listener.getName() + "].  A <fs-listener> must reference a <fs-bus>.");
    }
    try {
      provider = (FsProvider) model.getProvider(bus);
    } catch (ClassCastException e) {
      throw new ConfigurationException("Invalid bus config [" + listener.getBusidref() + "].  Should be contained within a <fs-provider> instance.  Unexpected exception - this should have caused a validation error!");
    }

    FsMessageFilter messageFilter = listener.getFsMessageFilter();
    if(messageFilter == null) {
      messageFilter = bus.getFsMessageFilter();
      if(messageFilter == null) {
        throw new ConfigurationException("No <fs-detination> defined on either <fs-listener> [" + listener.getName() + "] or <fs-bus> [" + bus.getBusid() + "].");
      }
    }
    // Map the standard listener attributes - common across all listener types...
    MapperUtil.mapDefaultAttributes(listener, listenerNode, model);
    // Map the <property> elements targeted at the listener - from the listener itself.
View Full Code Here

                    listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_SIMPLE_EXEC, Integer.toString(simpleSchedule.getExecCount())) ;
                }
            } else if (schedule instanceof CronSchedule) {
                final String cronExpression = ((CronSchedule)schedule).getCronExpression() ;
                if (cronExpression == null) {
                    throw new ConfigurationException("Missing cron expression from configuration") ;
                }
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_CRON_EXPRESSION, cronExpression) ;
            } else {
                throw new ConfigurationException("Unknown schedule type specified in configuration: " + schedule.getClass().getName()) ;
            }
           
            if(domElement.hasAttribute("poll-frequency-seconds") || domElement.hasAttribute("schedule-frequency") ) {
                logger.warn("Schedule Listener '" + listenerConfig.getTagName() + "' defines both 'scheduleidref' and frequency attributes.  Using the 'scheduleidref'.");
            }
View Full Code Here

                    listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_SIMPLE_EXEC, Integer.toString(simpleSchedule.getExecCount())) ;
                }
            } else if (schedule instanceof CronSchedule) {
                final String cronExpression = ((CronSchedule)schedule).getCronExpression() ;
                if (cronExpression == null) {
                    throw new ConfigurationException("Missing cron expression from configuration") ;
                }
                listenerConfig.setAttribute(ListenerTagNames.SCHEDULE_CRON_EXPRESSION, cronExpression) ;
            } else {
                throw new ConfigurationException("Unknown schedule type specified in configuration: " + schedule.getClass().getName()) ;
            }

            if(domElement.hasAttribute("poll-frequency-seconds") || domElement.hasAttribute("schedule-frequency") ) {
                logger.warn("Schedule Listener '" + listenerConfig.getTagName() + "' defines both 'scheduleidref' and frequency attributes.  Using the 'scheduleidref'.");
            }
View Full Code Here

      final Properties environment = getProperties(contextModuleName) ;

        try {
            return new InitialContext(environment) ;
        } catch (final NamingException ne) {
            throw new ConfigurationException("Failed to create JNDI context [" + contextModuleName + "].");
        }
  }
View Full Code Here

                        ConnectionFactory factory = null;

                        try {
                                factory = (ConnectionFactory) context.lookup(connectionFactoryRuntime);
                        } catch (NamingException e) {
                                throw new ConfigurationException("JNDI lookup of JMS Connection Factory [" + connectionFactoryRuntime + "] failed.", e);
                        } catch (ClassCastException e) {
                                throw new ConfigurationException("JNDI lookup of JMS Connection Factory failed.  Class [" + connectionFactoryRuntime + "] is not an instance of [" + ConnectionFactory.class.getName() + "].", e);
                        }
                        return factory;
              } finally {
                  NamingContextPool.releaseNamingContext(context) ;
              }
          } catch (final NamingContextException nce) {
              throw new ConfigurationException("Unexpected exception while accessing naming context pool", nce) ;
          }
        }
View Full Code Here

                        instance.addListener((ScheduledEventListener) listener, frequency);
                    }
                }
            }
        } catch (SchedulingException e) {
            throw new ConfigurationException(e);
        }

        return instance;
    }
View Full Code Here

                        instance.addListener((ScheduledEventListener) listener, frequency);
                    }
                }
            }
        } catch (SchedulingException e) {
            throw new ConfigurationException(e);
        }

        return instance;
    }
View Full Code Here

        for(org.jboss.soa.esb.listeners.config.xbeanmodel110.Schedule scheduleConfig : scheduleConfigs) {
            String scheduleId = scheduleConfig.getScheduleid();
            Schedule schedule;

            if(schedulIds.contains(scheduleId)) {
                throw new ConfigurationException("Duplicate 'scheduleid' value of '" + scheduleId + "'.  Must be unique on a per <schedule-provider> basis.");
            }
            schedulIds.add(scheduleId);

            if(scheduleConfig instanceof SimpleScheduleDocument.SimpleSchedule) {
                SimpleSchedule simpleSchedule;
View Full Code Here

        for(org.jboss.soa.esb.listeners.config.xbeanmodel130.Schedule scheduleConfig : scheduleConfigs) {
            String scheduleId = scheduleConfig.getScheduleid();
            Schedule schedule;

            if(schedulIds.contains(scheduleId)) {
                throw new ConfigurationException("Duplicate 'scheduleid' value of '" + scheduleId + "'.  Must be unique on a per <schedule-provider> basis.");
            }
            schedulIds.add(scheduleId);

            if(scheduleConfig instanceof SimpleScheduleDocument.SimpleSchedule) {
                SimpleSchedule simpleSchedule;
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.ConfigurationException

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.