summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/contribution/src/main
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-10-21 11:56:14 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-10-21 11:56:14 +0000
commitf265fa28ac8115c5ae664a62a0c8f110343d955f (patch)
treefe8bf7941f574809d8bcab4f8ec9b585f3941341 /java/sca/modules/contribution/src/main
parentdaac67ff4255bd4c65892eb42c76ac74807c0bdf (diff)
Set correct monitor on the ValidatingXMLInputFactory so that any errors that it finds are reported successfully
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@827971 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/contribution/src/main')
-rw-r--r--java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidatingXMLInputFactory.java7
-rw-r--r--java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ValidatingXMLInputFactory.java11
2 files changed, 16 insertions, 2 deletions
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidatingXMLInputFactory.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidatingXMLInputFactory.java
index f1ef36d0f9..a6e7e8b6e3 100644
--- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidatingXMLInputFactory.java
+++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidatingXMLInputFactory.java
@@ -93,8 +93,6 @@ public class DefaultValidatingXMLInputFactory extends ValidatingXMLInputFactory
this.inputFactory = factoryExtensionPoint.getFactory(XMLInputFactory.class);
this.documentBuilderFactory = factoryExtensionPoint.getFactory(DocumentBuilderFactory.class);
this.schemas = registry.getExtensionPoint(ValidationSchemaExtensionPoint.class);
- this.monitor =
- registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(MonitorFactory.class).createMonitor();
this.helper = StAXHelper.getInstance(registry);
}
@@ -109,6 +107,11 @@ public class DefaultValidatingXMLInputFactory extends ValidatingXMLInputFactory
this.schemas = schemas;
this.monitor = monitor;
}
+
+ @Override
+ public void setMonitor(Monitor monitor) {
+ this.monitor = monitor;
+ }
/**
* Report a exception.
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ValidatingXMLInputFactory.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ValidatingXMLInputFactory.java
index c0eef5a7a8..2446862e07 100644
--- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ValidatingXMLInputFactory.java
+++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ValidatingXMLInputFactory.java
@@ -21,10 +21,21 @@ package org.apache.tuscany.sca.contribution.processor;
import javax.xml.stream.XMLInputFactory;
+import org.apache.tuscany.sca.monitor.Monitor;
+
/**
* Base marker class for validating XML input factories.
*
* @version $Rev$ $Date$
*/
public abstract class ValidatingXMLInputFactory extends XMLInputFactory {
+
+ /**
+ * Allows the monitor to be set in lieu of the context being passed
+ * into the create methods. The base definitions of the create methods
+ * don't allow for this.
+ *
+ * @param monitor the current monitor object
+ */
+ public abstract void setMonitor(Monitor monitor);
}