summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/contribution/src/main
diff options
context:
space:
mode:
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);
}