summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/assembly-xml/src
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-28 19:29:50 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-28 19:29:50 +0000
commit3ab338ad0b521192e72a4e1da2e6fae0f45b38ae (patch)
tree14b6aab8959c1e79b4578a1617966c96cf329a45 /java/sca/modules/assembly-xml/src
parentc13b16cafe0cd2999754186270f6b8e03baefe6d (diff)
Pass ServiceRegistry via extensionPointRegistry to remove static references
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@830738 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/assembly-xml/src')
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefaultDefinitionsExtensionPoint.java2
-rw-r--r--java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadDocumentTestCase.java8
2 files changed, 5 insertions, 5 deletions
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefaultDefinitionsExtensionPoint.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefaultDefinitionsExtensionPoint.java
index 1f256de3a2..af59324c7c 100644
--- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefaultDefinitionsExtensionPoint.java
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefaultDefinitionsExtensionPoint.java
@@ -80,7 +80,7 @@ public class DefaultDefinitionsExtensionPoint implements DefinitionsExtensionPoi
// Get the definitions declarations
Collection<ServiceDeclaration> definitionsDeclarations;
try {
- definitionsDeclarations = ServiceDiscovery.getInstance().getServiceDeclarations(DEFINITIONS_FILE);
+ definitionsDeclarations = registry.getServiceDiscovery().getServiceDeclarations(DEFINITIONS_FILE);
} catch (IOException e) {
throw new IllegalStateException(e);
}
diff --git a/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadDocumentTestCase.java b/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadDocumentTestCase.java
index a886908589..b71764e0a4 100644
--- a/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadDocumentTestCase.java
+++ b/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadDocumentTestCase.java
@@ -127,11 +127,11 @@ public class ReadDocumentTestCase {
@Test
public void testReadImplementation() throws Exception {
-
- ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();
+ ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+ ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint(registry);
schemas.addSchema(getClass().getClassLoader().getResource(TUSCANY_11_XSD).toString());
XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas);
- DefaultFactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(new DefaultExtensionPointRegistry());
+ DefaultFactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(registry);
factories.addFactory(validatingInputFactory);
CompositeDocumentProcessor compositeDocumentProcessor =
@@ -157,7 +157,7 @@ public class ReadDocumentTestCase {
public void testReadBinding() throws Exception {
ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
- ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();
+ ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint(registry);
schemas.addSchema(getClass().getClassLoader().getResource(TUSCANY_11_XSD).toString());
XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas);
DefaultFactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(registry);