From 3ab338ad0b521192e72a4e1da2e6fae0f45b38ae Mon Sep 17 00:00:00 2001 From: rfeng Date: Wed, 28 Oct 2009 19:29:50 +0000 Subject: 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 --- .../sca/definitions/xml/DefaultDefinitionsExtensionPoint.java | 2 +- .../org/apache/tuscany/sca/assembly/xml/ReadDocumentTestCase.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'java/sca/modules/assembly-xml/src') 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 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); -- cgit v1.2.3