Package org.jboss.soa.esb.services.routing

Examples of org.jboss.soa.esb.services.routing.MessageRouterException


       
            return destinations;
        }
        catch (final RuleServiceException e)
        {
            throw new MessageRouterException(e.getMessage(), e);
        }
    }
View Full Code Here


    public void setConfigTree(ConfigTree configTree) throws MessageRouterException {
        try {
            namespaceContext = new NamespaceContext(configTree.getChildren("namespace"));
        } catch (ConfigurationException e) {
            throw new MessageRouterException("Error loading namespace prefix mappings.", e);
        }

        super.setConfigTree(configTree);
    }
View Full Code Here

            String expression = (String) rule.getValue();

            try {
              routingMap.put(destinationName, new SxcXpathRoutingRule(expression, namespaceContext));
            } catch(XPathException e) {
              throw new MessageRouterException("Error compiling XPath expression '" + expression + "'.", e);
            }
        }

        return routingMap;
    }
View Full Code Here

            // thread as our context...
            matchTL.set(false);
            evaluator.evaluate(toSource(objectToTest));
        return matchTL.get();
      } catch (Exception e) {
        throw new MessageRouterException("Exception while evaluating SXC expression '" + expression + "'");
      }
        }
View Full Code Here

              // Disabled.... with dom (at least) SXC has validation turned on, so if the message does not define an XSD/DTD, you get errors
              // Can't see how to turn off validation (probably a STAX thing)... API not exposed (that I can see anyway).
               
//                return new DOMSource((Node)objectToTest);
            } else {
                throw new MessageRouterException("Unsupported SXC CBR payload type '" + objectToTest.getClass().getName() + "'.");
            }
    }
View Full Code Here

                    String destinationName = ContentBasedWiretap.buildDestinationKey(routeToConfig);
                    String expression = routeToConfig.getRequiredAttribute("expression");

                    rules.setProperty(destinationName, expression);
                } catch (ConfigurationException e) {
                    throw new MessageRouterException("Error processing <rule> configuration.", e);
                }
            }
            routingMap = buildRoutingMap(rules);
        }
View Full Code Here

        // Get the properties file stream...
        if(ruleSetFile.exists()) {
            try {
                ruleStream = new FileInputStream(ruleSetFile);
            } catch (FileNotFoundException e) {
                throw new MessageRouterException("Unable to open rule properties file '" + ruleSetFile.getAbsolutePath() + "'.", e);
            }
            lastLoaded = ruleSetFile.lastModified();
        } else {
            ruleStream = ClassUtil.getResourceAsStream(ruleSetConfig, AbstractPropertyRulesRouter.class);
        }

        if(ruleStream == null) {
            throw new MessageRouterException("Unable to open rule properties file '" + ruleSetConfig + "'.");
        }

        // Load the rule properties...
        Properties rules = new Properties();
        try {
            try {
                rules.load(ruleStream);
            } catch (IOException e) {
                throw new MessageRouterException("Error reading rule properties file '" + ruleSetConfig + "'.", e);
            }
        } finally {
            try {
                ruleStream.close();
            } catch (IOException e) {
                throw new MessageRouterException("Error closing rule properties file '" + ruleSetConfig + "'.", e);
            }
        }

        return rules;
    }
View Full Code Here

            List<Object> objectsToTest = new ArrayList<Object>();
            try {
                objectsToTest.add(payloadProxy.getPayload(message));
                return objectsToTest;
            } catch (MessageDeliverException e) {
                throw new MessageRouterException("Failed to get message payload from message.", e);
            }
        } else {
          return objectList;
        }
    }
View Full Code Here

    public void setConfigTree(ConfigTree configTree) throws MessageRouterException {
        try {
            namespaceContext = new NamespaceContext(configTree.getChildren("namespace"));
        } catch (ConfigurationException e) {
            throw new MessageRouterException("Error loading namespace prefix mappings.", e);
        }

        super.setConfigTree(configTree);
    }
View Full Code Here

            String destinationName = (String) rule.getKey();
            String expression = (String) rule.getValue();
            try {
                routingMap.put(destinationName, new XPathRoutingRule(xpath.compile(expression)));
            } catch (XPathExpressionException e) {
                throw new MessageRouterException("Error compiling XPath expression '" + expression + "'.", e);
            }
        }

        return routingMap;
    }
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.services.routing.MessageRouterException

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.