camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r563141 - in /activemq/camel/trunk/components/camel-spring/src: main/java/org/apache/camel/component/validator/ValidatorComponent.java test/java/org/apache/camel/component/validator/ValidatorRouteTest.java
Date Mon, 06 Aug 2007 13:59:14 GMT
Author: jstrachan
Date: Mon Aug  6 06:59:14 2007
New Revision: 563141

URL: http://svn.apache.org/viewvc?view=rev&rev=563141
Log:
tidied up the test cases and made it a little easier to derive from the validator component
to support other schema languages etc

Modified:
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java
    activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/validator/ValidatorRouteTest.java

Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java?view=diff&rev=563141&r1=563140&r2=563141
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java
(original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java
Mon Aug  6 06:59:14 2007
@@ -19,6 +19,7 @@
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
+import org.apache.camel.util.IntrospectionSupport;
 import org.apache.camel.impl.DefaultComponent;
 import org.apache.camel.impl.ProcessorEndpoint;
 import org.apache.camel.component.validator.SpringValidator;
@@ -56,7 +57,12 @@
         if (log.isDebugEnabled()) {
             log.debug(this + " using schema resource: " + resource);
         }
+        configureValidator(validator, uri, remaining, parameters);
         return new ProcessorEndpoint(uri, this, validator);
+    }
+
+    protected void configureValidator(SpringValidator validator, String uri, String remaining,
Map parameters) throws Exception {
+        IntrospectionSupport.setProperties(validator, parameters);
     }
 
     protected Resource resolveMandatoryResource(String uri) {

Modified: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/validator/ValidatorRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/validator/ValidatorRouteTest.java?view=diff&rev=563141&r1=563140&r2=563141
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/validator/ValidatorRouteTest.java
(original)
+++ activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/validator/ValidatorRouteTest.java
Mon Aug  6 06:59:14 2007
@@ -31,7 +31,7 @@
         try {
             template.sendBody("direct:start", body);
         }
-        catch (Exception e) {
+        catch (Throwable e) {
             log.error(e, e);
             fail("Caught: " + e);
         }
@@ -56,7 +56,7 @@
                 fail("Not a SchemaValidationException: " + e);
             }
         }
-        catch (Exception e) {
+        catch (Throwable e) {
             log.error(e, e);
             fail("Caught: " + e);
         }



Mime
View raw message