summaryrefslogtreecommitdiffstats
path: root/java/sca/itest
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-12-04 21:09:28 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-12-04 21:09:28 +0000
commitbc1c8ab4c48c3a81824dac27ba71a8d1277797b9 (patch)
tree23c988da3cf03f70f49413ed753a439e5e6f0f80 /java/sca/itest
parent84f0a5f2ace3b19ff61928d32ab5674ff0daf462 (diff)
Merge itest changes from sca-equinox branch into trunk
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@723439 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/itest')
-rw-r--r--java/sca/itest/bpel/helloworld-reference/pom.xml2
-rw-r--r--java/sca/itest/bpel/helloworld-ws/pom.xml2
-rw-r--r--java/sca/itest/builder/pom.xml7
-rw-r--r--java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java77
-rw-r--r--java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java29
-rw-r--r--java/sca/itest/callablereferences-ws/pom.xml2
-rw-r--r--java/sca/itest/callablereferences/pom.xml2
-rw-r--r--java/sca/itest/callablereferences/src/test/java/org/apache/tuscany/sca/itest/callableref/CallableReferenceRemoteTestCase.java24
-rw-r--r--java/sca/itest/component-type/pom.xml12
-rw-r--r--java/sca/itest/component-type/src/main/java/calculator/CalculatorClient.java13
-rw-r--r--java/sca/itest/component-type/src/test/java/calculator/CalculatorTestCase.java41
-rw-r--r--java/sca/itest/contribution-classloader/contribution-test/pom.xml7
-rw-r--r--java/sca/itest/contribution-classloader/contribution-test/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionTestCase.java2
-rw-r--r--java/sca/itest/contribution-import-export/export-composite/pom.xml2
-rw-r--r--java/sca/itest/contribution-import-export/export-java/pom.xml2
-rw-r--r--java/sca/itest/contribution-import-export/import-composite/pom.xml2
-rw-r--r--java/sca/itest/contribution-import-export/import-java/pom.xml2
-rw-r--r--java/sca/itest/contribution-import-export/import-resource/pom.xml2
-rw-r--r--java/sca/itest/contribution-import-export/import-wsdl/pom.xml2
-rw-r--r--java/sca/itest/conversations-ws/pom.xml2
-rw-r--r--java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationWSDLTestCase.java18
-rw-r--r--java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/NonConversationalCallbackTestCase.java28
-rw-r--r--java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/RequestScopeTestCase.java28
-rw-r--r--java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatefulStatefulTestCase.java28
-rw-r--r--java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatefulStatelessTestCase.java28
-rw-r--r--java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatelessStatefulTestCase.java28
-rw-r--r--java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatelessStatelessTestCase.java28
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TAnnotatedStruct.java2
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TInnerUnion.java4
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TRichUnion.java4
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSix.java2
-rw-r--r--java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java17
-rw-r--r--java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/PrimitivesDatabindingTestCase.java14
-rw-r--r--java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/StandardTypesDatabindingTestCase.java14
-rw-r--r--java/sca/itest/exceptions-simple-ws/pom.xml2
-rw-r--r--java/sca/itest/interfaces/pom.xml11
-rw-r--r--java/sca/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java21
-rw-r--r--java/sca/itest/interop-soap-service/pom.xml2
-rw-r--r--java/sca/itest/jms/src/main/java/org/apache/tuscany/sca/binding/jms/TestMessageProcessor.java4
-rw-r--r--java/sca/itest/large-sdo-ws/pom.xml6
-rw-r--r--java/sca/itest/late-reference-resolution/pom.xml2
-rw-r--r--java/sca/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java30
-rw-r--r--java/sca/itest/oneway/src/test/java/org/apache/tuscany/sca/itest/oneway/OneWayTestCase.java14
-rw-r--r--java/sca/itest/osgi-tuscany/tuscany-osgi-installer/pom.xml9
-rw-r--r--java/sca/itest/osgi-tuscany/tuscany-versioned/pom.xml9
-rw-r--r--java/sca/itest/policy-security-basicauth/pom.xml2
-rw-r--r--java/sca/itest/policy-security-basicauth/src/test/java/org/apache/tuscany/sca/itest/BasicAuthTestCase.java12
-rw-r--r--java/sca/itest/policy-security-jsr250/pom.xml2
-rw-r--r--java/sca/itest/policy-security/pom.xml2
-rw-r--r--java/sca/itest/policy/pom.xml2
-rw-r--r--java/sca/itest/policy/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java10
-rw-r--r--java/sca/itest/pom.xml70
-rw-r--r--java/sca/itest/promotion-interface-missmatch/pom.xml2
-rw-r--r--java/sca/itest/references/pom.xml17
-rw-r--r--java/sca/itest/scopes/pom.xml13
-rw-r--r--java/sca/itest/serialization/pom.xml2
-rw-r--r--java/sca/itest/services/pom.xml11
-rw-r--r--java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java37
-rw-r--r--java/sca/itest/validation/pom.xml25
-rw-r--r--java/sca/itest/validation/src/main/java/impl/osgi/OSGiTestImpl.java50
-rw-r--r--java/sca/itest/validation/src/main/java/impl/osgi/OSGiTestInterface.java31
-rw-r--r--java/sca/itest/validation/src/main/java/impl/osgi/OSGiTestWithPropertyImpl.java65
-rw-r--r--java/sca/itest/validation/src/test/java/assembly/xml/ContributionReadException.java3
-rw-r--r--java/sca/itest/validation/src/test/java/assembly/xml/PolicyImplValidationException.java3
-rw-r--r--java/sca/itest/validation/src/test/java/assembly/xml/PolicyServiceValidationException.java3
-rw-r--r--java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedBindingElement.java3
-rw-r--r--java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedImplementationElement.java3
-rw-r--r--java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedInterfaceElement.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessActivationSpecTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResourceAdapterTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseActivationSpecTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseConnectionFactoryTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/UnexpectedResponseElementTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java17
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java17
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java17
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java19
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java13
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java17
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java18
-rw-r--r--java/sca/itest/validation/src/test/java/contribution/java/AttributePackageMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/contribution/namespace/AttributeNameSpaceMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/contribution/xml/AttributeCompositeMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/domain/CustomCompositeBuilder.java31
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java15
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java15
-rw-r--r--java/sca/itest/validation/src/test/java/impl/ejb/EJBLinkAttributeMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/osgi/CouldNotLocateOSGiBundleTestCase.java64
-rw-r--r--java/sca/itest/validation/src/test/java/impl/osgi/MissingComponentTypeFileTestCase.java64
-rw-r--r--java/sca/itest/validation/src/test/java/impl/osgi/OSGiTestBundles.java111
-rw-r--r--java/sca/itest/validation/src/test/java/impl/osgi/PropertyShouldSpecifySRTestCase.java64
-rw-r--r--java/sca/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java13
-rw-r--r--java/sca/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/interfacejava/xml/ClassNotFoundTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/interfacejava/xml/ContributionResolveExceptionTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/policy/xml/AlwaysProvidedIntentNotFoundTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/policy/xml/ErrorInPolicyIntentDefinitionTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/policy/xml/IntentNotSpecifiedTestCase.java15
-rw-r--r--java/sca/itest/validation/src/test/java/policy/xml/MayProvideIntentNotFoundTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/policy/xml/RequiredAttributeMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/policy/xml/UnableToMapPoliciesTestCase.java7
-rw-r--r--java/sca/itest/validation/src/test/java/policy/xml/UnrecognizedIntentAttachPointTypeTestCase.java3
-rw-r--r--java/sca/itest/ws-void-args-return/pom.xml2
159 files changed, 730 insertions, 1254 deletions
diff --git a/java/sca/itest/bpel/helloworld-reference/pom.xml b/java/sca/itest/bpel/helloworld-reference/pom.xml
index 954f7c7ef9..1e662708d7 100644
--- a/java/sca/itest/bpel/helloworld-reference/pom.xml
+++ b/java/sca/itest/bpel/helloworld-reference/pom.xml
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/bpel/helloworld-ws/pom.xml b/java/sca/itest/bpel/helloworld-ws/pom.xml
index 21637ca7c8..a676177e56 100644
--- a/java/sca/itest/bpel/helloworld-ws/pom.xml
+++ b/java/sca/itest/bpel/helloworld-ws/pom.xml
@@ -77,7 +77,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/builder/pom.xml b/java/sca/itest/builder/pom.xml
index 257f6074e5..b8dfd95783 100644
--- a/java/sca/itest/builder/pom.xml
+++ b/java/sca/itest/builder/pom.xml
@@ -44,13 +44,6 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-monitor-logging</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-workspace-impl</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>test</scope>
diff --git a/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java b/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java
index cad09920e8..c9339c1545 100644
--- a/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java
+++ b/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java
@@ -28,7 +28,7 @@ import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.definitions.Definitions;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
@@ -49,16 +49,12 @@ import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
public class CompositeBuilderNonWiringImpl implements CompositeBuilder {
private static final Logger logger = Logger.getLogger(CompositeBuilderNonWiringImpl.class.getName());
private CompositeBuilder compositeIncludeBuilder;
- //private CompositeBuilder componentReferenceWireBuilder;
- //private CompositeBuilder componentReferencePromotionWireBuilder;
- //private CompositeBuilder compositeReferenceWireBuilder;
private CompositeBuilder compositeCloneBuilder;
private CompositeBuilder componentConfigurationBuilder;
private CompositeBuilder compositeServiceConfigurationBuilder;
private CompositeBuilder compositeReferenceConfigurationBuilder;
private CompositeBuilder compositeBindingURIBuilder;
private CompositeBuilder componentServicePromotionBuilder;
- //private CompositeBuilder compositeServicePromotionBuilder;
private CompositeBuilder compositePromotionBuilder;
private CompositeBuilder compositePolicyBuilder;
private CompositeBuilder componentServiceBindingBuilder;
@@ -76,9 +72,8 @@ public class CompositeBuilderNonWiringImpl implements CompositeBuilder {
public CompositeBuilderNonWiringImpl(AssemblyFactory assemblyFactory,
SCABindingFactory scaBindingFactory,
IntentAttachPointTypeFactory intentAttachPointTypeFactory,
- InterfaceContractMapper interfaceContractMapper,
- Monitor monitor) {
- this(assemblyFactory, null, scaBindingFactory, intentAttachPointTypeFactory, interfaceContractMapper, null, monitor);
+ InterfaceContractMapper interfaceContractMapper) {
+ this(assemblyFactory, null, scaBindingFactory, intentAttachPointTypeFactory, interfaceContractMapper);
}
/**
@@ -96,77 +91,59 @@ public class CompositeBuilderNonWiringImpl implements CompositeBuilder {
EndpointFactory endpointFactory,
SCABindingFactory scaBindingFactory,
IntentAttachPointTypeFactory intentAttachPointTypeFactory,
- InterfaceContractMapper interfaceContractMapper,
- SCADefinitions policyDefinitions,
- Monitor monitor) {
+ InterfaceContractMapper interfaceContractMapper) {
if (endpointFactory == null){
endpointFactory = new DefaultEndpointFactory();
}
- compositeIncludeBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeIncludeBuilderImpl(monitor);
- //componentReferenceWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
- //componentReferencePromotionWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentReferencePromotionWireBuilderImpl(assemblyFactory, endpointFactory, monitor);
- //compositeReferenceWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeReferenceWireBuilderImpl(assemblyFactory, endpointFactory, monitor);
- compositeCloneBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeCloneBuilderImpl(monitor);
- componentConfigurationBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl(assemblyFactory, scaBindingFactory, interfaceContractMapper, policyDefinitions, monitor);
+ compositeIncludeBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeIncludeBuilderImpl();
+ compositeCloneBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeCloneBuilderImpl();
+ componentConfigurationBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl(assemblyFactory, scaBindingFactory, interfaceContractMapper);
compositeServiceConfigurationBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeServiceConfigurationBuilderImpl(assemblyFactory);
compositeReferenceConfigurationBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeReferenceConfigurationBuilderImpl(assemblyFactory);
- compositeBindingURIBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl(assemblyFactory, scaBindingFactory, interfaceContractMapper, policyDefinitions, monitor);
- //componentServicePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentServicePromotionBuilderImpl(assemblyFactory);
- //compositeServicePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeServicePromotionBuilderImpl(assemblyFactory);
- compositePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositePromotionBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
- compositePolicyBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositePolicyBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
- componentServiceBindingBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuilderImpl(monitor);
- componentReferenceBindingBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceBindingBuilderImpl(monitor);
+ compositeBindingURIBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl(assemblyFactory, scaBindingFactory, interfaceContractMapper);
+ compositePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositePromotionBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper);
+ compositePolicyBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositePolicyBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper);
+ componentServiceBindingBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuilderImpl();
+ componentReferenceBindingBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceBindingBuilderImpl();
}
- public void build(Composite composite) throws CompositeBuilderException {
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.CompositeBuilderNonWiring";
+ }
+
+ public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException {
// Collect and fuse includes
- compositeIncludeBuilder.build(composite);
+ compositeIncludeBuilder.build(composite, definitions, monitor);
// Expand nested composites
- compositeCloneBuilder.build(composite);
+ compositeCloneBuilder.build(composite, definitions, monitor);
// Configure all components
- componentConfigurationBuilder.build(composite);
+ componentConfigurationBuilder.build(composite, definitions, monitor);
// Connect composite services/references to promoted services/references
- compositePromotionBuilder.build(composite);
+ compositePromotionBuilder.build(composite, definitions, monitor);
// Compute the policies across the model hierarchy
- compositePolicyBuilder.build(composite);
+ compositePolicyBuilder.build(composite, definitions, monitor);
// Configure composite services
- compositeServiceConfigurationBuilder.build(composite);
+ compositeServiceConfigurationBuilder.build(composite, definitions, monitor);
// Configure composite references
- compositeReferenceConfigurationBuilder.build(composite);
+ compositeReferenceConfigurationBuilder.build(composite, definitions, monitor);
// Configure binding URIs
- compositeBindingURIBuilder.build(composite);
-
- // Create promoted component services
-// componentServicePromotionBuilder.build(composite);
-
- // Create promoted composite services
-// compositeServicePromotionBuilder.build(composite);
+ compositeBindingURIBuilder.build(composite, definitions, monitor);
// Build component service binding-related information
- componentServiceBindingBuilder.build(composite);
+ componentServiceBindingBuilder.build(composite, definitions, monitor);
- // Wire the components
-// componentReferenceWireBuilder.build(composite);
-
- // Wire the promoted component references
-// componentReferencePromotionWireBuilder.build(composite);
-
- // Wire the composite references
-// compositeReferenceWireBuilder.build(composite);
-
// Build component reference binding-related information
- componentReferenceBindingBuilder.build(composite);
+ componentReferenceBindingBuilder.build(composite, definitions, monitor);
// Fuse nested composites
//FIXME do this later
diff --git a/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java b/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java
index 6d829033a3..5f5fe43d89 100644
--- a/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java
+++ b/java/sca/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java
@@ -39,7 +39,6 @@ import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
@@ -49,31 +48,32 @@ import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.ModuleActivator;
import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.definitions.Definitions;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
import org.apache.tuscany.sca.workspace.Workspace;
import org.apache.tuscany.sca.workspace.WorkspaceFactory;
-import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilder;
import org.apache.tuscany.sca.workspace.builder.impl.ContributionDependencyBuilderImpl;
public class CustomCompositeBuilder {
private URLArtifactProcessor<Contribution> contributionProcessor;
private ModelResolverExtensionPoint modelResolvers;
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
private WorkspaceFactory workspaceFactory;
private AssemblyFactory assemblyFactory;
private XMLOutputFactory outputFactory;
private StAXArtifactProcessor<Object> xmlProcessor;
- private ContributionDependencyBuilder contributionDependencyBuilder;
+ private ContributionBuilder contributionDependencyBuilder;
private CompositeBuilder domainCompositeBuilder;
private static Workspace workspace;
- private List<SCADefinitions> policyDefinitions;
+ private List<Definitions> policyDefinitions;
private Monitor monitor;
private Composite domainComposite;
private boolean nonWiring;
@@ -99,7 +99,7 @@ public class CustomCompositeBuilder {
}
// Get XML input/output factories
- modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
@@ -119,16 +119,16 @@ public class CustomCompositeBuilder {
modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
// Create a contribution dependency builder
- contributionDependencyBuilder = new ContributionDependencyBuilderImpl(monitor);
+ contributionDependencyBuilder = new ContributionDependencyBuilderImpl(null);
// Create a composite builder
SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
InterfaceContractMapper contractMapper = utilities.getUtility(InterfaceContractMapper.class);
if (nonWiring) {
- domainCompositeBuilder = new CompositeBuilderNonWiringImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper, monitor);
+ domainCompositeBuilder = new CompositeBuilderNonWiringImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper);
} else {
- domainCompositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper, monitor);
+ domainCompositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper);
}
}
@@ -147,20 +147,17 @@ public class CustomCompositeBuilder {
workspace.getContributions().add(testContribution);
// Build the contribution dependencies
- Map<Contribution, List<Contribution>> contributionDependencies = new HashMap<Contribution, List<Contribution>>();
Set<Contribution> resolved = new HashSet<Contribution>();
for (Contribution contribution: workspace.getContributions()) {
- List<Contribution> dependencies = contributionDependencyBuilder.buildContributionDependencies(contribution, workspace);
+ contributionDependencyBuilder.build(contribution, workspace, monitor);
// Resolve contributions
- for (Contribution dependency: dependencies) {
+ for (Contribution dependency: contribution.getDependencies()) {
if (!resolved.contains(dependency)) {
resolved.add(dependency);
contributionProcessor.resolve(dependency, workspace.getModelResolver());
}
}
-
- contributionDependencies.put(contribution, dependencies);
}
// Create a composite model for the domain
@@ -172,7 +169,7 @@ public class CustomCompositeBuilder {
domainComposite.getIncludes().addAll(workspace.getDeployables());
// Build the domain composite and wire the components included in it
- domainCompositeBuilder.build(domainComposite);
+ domainCompositeBuilder.build(domainComposite, null, monitor);
}
/**
diff --git a/java/sca/itest/callablereferences-ws/pom.xml b/java/sca/itest/callablereferences-ws/pom.xml
index 53c503a911..a231c4d741 100644
--- a/java/sca/itest/callablereferences-ws/pom.xml
+++ b/java/sca/itest/callablereferences-ws/pom.xml
@@ -51,7 +51,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/callablereferences/pom.xml b/java/sca/itest/callablereferences/pom.xml
index 51560bab07..ae12f41535 100644
--- a/java/sca/itest/callablereferences/pom.xml
+++ b/java/sca/itest/callablereferences/pom.xml
@@ -58,7 +58,7 @@
-->
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
diff --git a/java/sca/itest/callablereferences/src/test/java/org/apache/tuscany/sca/itest/callableref/CallableReferenceRemoteTestCase.java b/java/sca/itest/callablereferences/src/test/java/org/apache/tuscany/sca/itest/callableref/CallableReferenceRemoteTestCase.java
index ba9020811c..927e91a8bc 100644
--- a/java/sca/itest/callablereferences/src/test/java/org/apache/tuscany/sca/itest/callableref/CallableReferenceRemoteTestCase.java
+++ b/java/sca/itest/callablereferences/src/test/java/org/apache/tuscany/sca/itest/callableref/CallableReferenceRemoteTestCase.java
@@ -25,10 +25,10 @@ import java.io.File;
import junit.framework.Assert;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -40,8 +40,8 @@ import org.junit.Test;
*/
public class CallableReferenceRemoteTestCase {
- private static SCANode nodeA;
- private static SCANode nodeB;
+ private static Node nodeA;
+ private static Node nodeB;
private static AComponent acomponent;
@@ -52,21 +52,21 @@ public class CallableReferenceRemoteTestCase {
System.out.println("Setting up nodes");
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- nodeA = nodeFactory.createSCANode(new File("src/main/resources/nodeA/CompositeA.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ nodeA = nodeFactory.createNode(new File("src/main/resources/nodeA/CompositeA.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/nodeA").toURL().toString()));
- nodeB = nodeFactory.createSCANode(new File("src/main/resources/nodeB/CompositeB.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ nodeB = nodeFactory.createNode(new File("src/main/resources/nodeB/CompositeB.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/nodeB").toURL().toString()));
nodeA.start();
nodeB.start();
- acomponent = ((SCAClient)nodeA).getService(AComponent.class, "AComponent/AComponent");
+ acomponent = ((Client)nodeA).getService(AComponent.class, "AComponent/AComponent");
} catch (Throwable ex) {
System.out.println(ex.toString());
diff --git a/java/sca/itest/component-type/pom.xml b/java/sca/itest/component-type/pom.xml
index bc6dd696e1..d97ebf3866 100644
--- a/java/sca/itest/component-type/pom.xml
+++ b/java/sca/itest/component-type/pom.xml
@@ -29,19 +29,25 @@
<name>Apache Tuscany SCA Component Type Integration Tests</name>
<dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
+ <artifactId>tuscany-node-impl</artifactId>
<version>2.0-SNAPSHOT</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-implementation-java-runtime</artifactId>
<version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
+ <scope>test</scope>
</dependency>
</dependencies>
-
</project>
diff --git a/java/sca/itest/component-type/src/main/java/calculator/CalculatorClient.java b/java/sca/itest/component-type/src/main/java/calculator/CalculatorClient.java
index 08afd922b3..1a222990c1 100644
--- a/java/sca/itest/component-type/src/main/java/calculator/CalculatorClient.java
+++ b/java/sca/itest/component-type/src/main/java/calculator/CalculatorClient.java
@@ -19,7 +19,10 @@
package calculator;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
/**
* This client program shows how to create an SCA runtime, start it,
@@ -28,10 +31,12 @@ import org.apache.tuscany.sca.host.embedded.SCADomain;
public class CalculatorClient {
public static void main(String[] args) throws Exception {
- SCADomain scaDomain = SCADomain.newInstance("Calculator.composite");
+ String location = ContributionLocationHelper.getContributionLocation("Calculator.composite");
+ Node node = NodeFactory.newInstance().createNode("Calculator.composite", new Contribution("c1", location));
+ node.start();
CalculatorService calculatorService =
- scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent/CalculatorService");
+ node.getService(CalculatorService.class, "CalculatorServiceComponent/CalculatorService");
// Calculate
System.out.println("3 + 2=" + calculatorService.add(3, 2));
@@ -39,7 +44,7 @@ public class CalculatorClient {
System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
System.out.println("3 / 2=" + calculatorService.divide(3, 2));
- scaDomain.close();
+ node.stop();
}
}
diff --git a/java/sca/itest/component-type/src/test/java/calculator/CalculatorTestCase.java b/java/sca/itest/component-type/src/test/java/calculator/CalculatorTestCase.java
index 08fc8e33bf..b428819736 100644
--- a/java/sca/itest/component-type/src/test/java/calculator/CalculatorTestCase.java
+++ b/java/sca/itest/component-type/src/test/java/calculator/CalculatorTestCase.java
@@ -18,35 +18,44 @@
*/
package calculator;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
/**
* This shows how to test the Calculator service component.
*/
-public class CalculatorTestCase extends TestCase {
+public class CalculatorTestCase {
private CalculatorService calculatorService;
- private SCADomain scaDomain;
-
- @Override
- protected void setUp() throws Exception {
- scaDomain = SCADomain.newInstance("Calculator.composite");
- calculatorService = scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent/CalculatorService");
+ private Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("Calculator.composite");
+ node = NodeFactory.newInstance().createNode("Calculator.composite", new Contribution("c1", location));
+ node.start();
+ calculatorService = node.getService(CalculatorService.class, "CalculatorServiceComponent/CalculatorService");
}
- @Override
- protected void tearDown() throws Exception {
- scaDomain.close();
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
}
+ @Test
public void testCalculator() throws Exception {
// Calculate
- assertEquals(calculatorService.add(3, 2), 5.0);
- assertEquals(calculatorService.subtract(3, 2), 1.0);
- assertEquals(calculatorService.multiply(3, 2), 6.0);
- assertEquals(calculatorService.divide(3, 2), 1.5);
+ assertEquals(calculatorService.add(3, 2), 5.0, 0.0);
+ assertEquals(calculatorService.subtract(3, 2), 1.0, 0.0);
+ assertEquals(calculatorService.multiply(3, 2), 6.0, 0.0);
+ assertEquals(calculatorService.divide(3, 2), 1.5, 0.0);
}
}
diff --git a/java/sca/itest/contribution-classloader/contribution-test/pom.xml b/java/sca/itest/contribution-classloader/contribution-test/pom.xml
index ce3ca3c55e..dfa0efd5d5 100644
--- a/java/sca/itest/contribution-classloader/contribution-test/pom.xml
+++ b/java/sca/itest/contribution-classloader/contribution-test/pom.xml
@@ -43,13 +43,6 @@
</dependency>
<dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-monitor-logging</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
diff --git a/java/sca/itest/contribution-classloader/contribution-test/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionTestCase.java b/java/sca/itest/contribution-classloader/contribution-test/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionTestCase.java
index 692f16f6f6..18fc2bbc88 100644
--- a/java/sca/itest/contribution-classloader/contribution-test/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionTestCase.java
+++ b/java/sca/itest/contribution-classloader/contribution-test/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionTestCase.java
@@ -24,8 +24,8 @@ import java.lang.reflect.Method;
import java.net.URLClassLoader;
import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
import org.apache.tuscany.sca.contribution.resolver.ClassReference;
-import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
diff --git a/java/sca/itest/contribution-import-export/export-composite/pom.xml b/java/sca/itest/contribution-import-export/export-composite/pom.xml
index 5c06625055..094987318a 100644
--- a/java/sca/itest/contribution-import-export/export-composite/pom.xml
+++ b/java/sca/itest/contribution-import-export/export-composite/pom.xml
@@ -51,7 +51,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/contribution-import-export/export-java/pom.xml b/java/sca/itest/contribution-import-export/export-java/pom.xml
index e65f8bf0d5..7050d77a67 100644
--- a/java/sca/itest/contribution-import-export/export-java/pom.xml
+++ b/java/sca/itest/contribution-import-export/export-java/pom.xml
@@ -51,7 +51,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/contribution-import-export/import-composite/pom.xml b/java/sca/itest/contribution-import-export/import-composite/pom.xml
index 43abc021e3..be3d2f1fb0 100644
--- a/java/sca/itest/contribution-import-export/import-composite/pom.xml
+++ b/java/sca/itest/contribution-import-export/import-composite/pom.xml
@@ -57,7 +57,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/contribution-import-export/import-java/pom.xml b/java/sca/itest/contribution-import-export/import-java/pom.xml
index f53de2c85b..13d9a7ce58 100644
--- a/java/sca/itest/contribution-import-export/import-java/pom.xml
+++ b/java/sca/itest/contribution-import-export/import-java/pom.xml
@@ -57,7 +57,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/contribution-import-export/import-resource/pom.xml b/java/sca/itest/contribution-import-export/import-resource/pom.xml
index 32fe573123..6adf9effe5 100644
--- a/java/sca/itest/contribution-import-export/import-resource/pom.xml
+++ b/java/sca/itest/contribution-import-export/import-resource/pom.xml
@@ -86,7 +86,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/contribution-import-export/import-wsdl/pom.xml b/java/sca/itest/contribution-import-export/import-wsdl/pom.xml
index d7eadbccd3..265376216b 100644
--- a/java/sca/itest/contribution-import-export/import-wsdl/pom.xml
+++ b/java/sca/itest/contribution-import-export/import-wsdl/pom.xml
@@ -57,7 +57,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/conversations-ws/pom.xml b/java/sca/itest/conversations-ws/pom.xml
index 6b0fab3c8f..2789d3eee7 100644
--- a/java/sca/itest/conversations-ws/pom.xml
+++ b/java/sca/itest/conversations-ws/pom.xml
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationWSDLTestCase.java b/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationWSDLTestCase.java
index 9df966ebc2..6c3cbe462c 100644
--- a/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationWSDLTestCase.java
+++ b/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationWSDLTestCase.java
@@ -24,10 +24,10 @@ import java.io.File;
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatelessImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -35,20 +35,20 @@ import org.junit.Test;
public class ConversationWSDLTestCase {
- private SCANode node;
+ private Node node;
private ConversationalClient conversationalStatelessClientStatefulService;
@Before
public void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/ConversationalWSDL/conversationalWSDL.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/ConversationalWSDL/conversationalWSDL.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/ConversationalWSDL").toURL().toString()));
node.start();
- conversationalStatelessClientStatefulService = ((SCAClient)node).getService(ConversationalClient.class, "ConversationalStatelessClientStatefulService");
+ conversationalStatelessClientStatefulService = ((Client)node).getService(ConversationalClient.class, "ConversationalStatelessClientStatefulService");
ConversationalClientStatelessImpl.calls = new StringBuffer();
diff --git a/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/NonConversationalCallbackTestCase.java b/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/NonConversationalCallbackTestCase.java
index ebd1e55dac..051b6b9fc1 100644
--- a/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/NonConversationalCallbackTestCase.java
+++ b/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/NonConversationalCallbackTestCase.java
@@ -29,17 +29,17 @@ import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStat
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatefulImpl;
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatefulNonConversationalCallbackImpl;
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatelessImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
public class NonConversationalCallbackTestCase {
- private static SCANode node;
+ private static Node node;
private static ConversationalClient conversationalStatelessClientStatelessService;
private static ConversationalClient conversationalStatelessClientStatefulService;
private static ConversationalClient conversationalStatefulClientStatelessService;
@@ -50,28 +50,28 @@ public class NonConversationalCallbackTestCase {
@BeforeClass
public static void setUp() throws Exception {
try {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/Conversational/conversational.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/Conversational/conversational.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/Conversational").toURL().toString()));
node.start();
- conversationalStatelessClientStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientStatelessService");
- conversationalStatelessClientStatefulService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientStatefulService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientStatefulService");
- conversationalStatefulClientStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientStatelessService");
- conversationalStatefulClientStatefulService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientStatefulService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientStatefulService");
- conversationalStatelessClientRequestService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientRequestService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientRequestService");
- conversationalStatefulClientNonConversationalCallbackStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientNonConversationalCallbackStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientNonConversationalCallbackStatefulService");
// reset the place where we record the sequence of calls passing
diff --git a/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/RequestScopeTestCase.java b/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/RequestScopeTestCase.java
index 2c16145f54..b9530c132b 100644
--- a/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/RequestScopeTestCase.java
+++ b/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/RequestScopeTestCase.java
@@ -30,17 +30,17 @@ import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStat
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceRequestImpl;
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatefulImpl;
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatelessImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
public class RequestScopeTestCase {
- private static SCANode node;
+ private static Node node;
private static ConversationalClient conversationalStatelessClientStatelessService;
private static ConversationalClient conversationalStatelessClientStatefulService;
private static ConversationalClient conversationalStatefulClientStatelessService;
@@ -51,28 +51,28 @@ public class RequestScopeTestCase {
@BeforeClass
public static void setUp() throws Exception {
try {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/Conversational/conversational.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/Conversational/conversational.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/Conversational").toURL().toString()));
node.start();
- conversationalStatelessClientStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientStatelessService");
- conversationalStatelessClientStatefulService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientStatefulService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientStatefulService");
- conversationalStatefulClientStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientStatelessService");
- conversationalStatefulClientStatefulService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientStatefulService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientStatefulService");
- conversationalStatelessClientRequestService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientRequestService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientRequestService");
- conversationalStatefulClientNonConversationalCallbackStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientNonConversationalCallbackStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientNonConversationalCallbackStatefulService");
// reset the place where we record the sequence of calls passing
diff --git a/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatefulStatefulTestCase.java b/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatefulStatefulTestCase.java
index 4166e6acdf..1e5f6adcf1 100644
--- a/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatefulStatefulTestCase.java
+++ b/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatefulStatefulTestCase.java
@@ -29,17 +29,17 @@ import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStat
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatelessImpl;
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatefulImpl;
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatelessImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
public class StatefulStatefulTestCase {
- private static SCANode node;
+ private static Node node;
private static ConversationalClient conversationalStatelessClientStatelessService;
private static ConversationalClient conversationalStatelessClientStatefulService;
private static ConversationalClient conversationalStatefulClientStatelessService;
@@ -50,28 +50,28 @@ public class StatefulStatefulTestCase {
@BeforeClass
public static void setUp() throws Exception {
try {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/Conversational/conversational.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/Conversational/conversational.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/Conversational").toURL().toString()));
node.start();
- conversationalStatelessClientStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientStatelessService");
- conversationalStatelessClientStatefulService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientStatefulService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientStatefulService");
- conversationalStatefulClientStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientStatelessService");
- conversationalStatefulClientStatefulService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientStatefulService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientStatefulService");
- conversationalStatelessClientRequestService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientRequestService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientRequestService");
- conversationalStatefulClientNonConversationalCallbackStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientNonConversationalCallbackStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientNonConversationalCallbackStatefulService");
// reset the place where we record the sequence of calls passing
diff --git a/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatefulStatelessTestCase.java b/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatefulStatelessTestCase.java
index 6023b7cd53..8a110477b5 100644
--- a/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatefulStatelessTestCase.java
+++ b/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatefulStatelessTestCase.java
@@ -29,17 +29,17 @@ import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStat
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatelessImpl;
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatefulImpl;
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatelessImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
public class StatefulStatelessTestCase {
- private static SCANode node;
+ private static Node node;
private static ConversationalClient conversationalStatelessClientStatelessService;
private static ConversationalClient conversationalStatelessClientStatefulService;
private static ConversationalClient conversationalStatefulClientStatelessService;
@@ -50,28 +50,28 @@ public class StatefulStatelessTestCase {
@BeforeClass
public static void setUp() throws Exception {
try {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/Conversational/conversational.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/Conversational/conversational.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/Conversational").toURL().toString()));
node.start();
- conversationalStatelessClientStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientStatelessService");
- conversationalStatelessClientStatefulService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientStatefulService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientStatefulService");
- conversationalStatefulClientStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientStatelessService");
- conversationalStatefulClientStatefulService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientStatefulService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientStatefulService");
- conversationalStatelessClientRequestService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientRequestService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientRequestService");
- conversationalStatefulClientNonConversationalCallbackStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientNonConversationalCallbackStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientNonConversationalCallbackStatefulService");
// reset the place where we record the sequence of calls passing
diff --git a/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatelessStatefulTestCase.java b/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatelessStatefulTestCase.java
index fb3a3cec6f..79ac9262c6 100644
--- a/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatelessStatefulTestCase.java
+++ b/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatelessStatefulTestCase.java
@@ -28,17 +28,17 @@ import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStat
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatelessImpl;
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatefulImpl;
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatelessImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
public class StatelessStatefulTestCase {
- private static SCANode node;
+ private static Node node;
private static ConversationalClient conversationalStatelessClientStatelessService;
private static ConversationalClient conversationalStatelessClientStatefulService;
private static ConversationalClient conversationalStatefulClientStatelessService;
@@ -49,28 +49,28 @@ public class StatelessStatefulTestCase {
@BeforeClass
public static void setUp() throws Exception {
try {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/Conversational/conversational.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/Conversational/conversational.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/Conversational").toURL().toString()));
node.start();
- conversationalStatelessClientStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientStatelessService");
- conversationalStatelessClientStatefulService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientStatefulService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientStatefulService");
- conversationalStatefulClientStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientStatelessService");
- conversationalStatefulClientStatefulService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientStatefulService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientStatefulService");
- conversationalStatelessClientRequestService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientRequestService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientRequestService");
- conversationalStatefulClientNonConversationalCallbackStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientNonConversationalCallbackStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientNonConversationalCallbackStatefulService");
// reset the place where we record the sequence of calls passing
diff --git a/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatelessStatelessTestCase.java b/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatelessStatelessTestCase.java
index 5fbe2c3f69..9aebae9ced 100644
--- a/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatelessStatelessTestCase.java
+++ b/java/sca/itest/conversations-ws/src/test/java/org/apache/tuscany/sca/itest/conversational/StatelessStatelessTestCase.java
@@ -28,17 +28,17 @@ import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStat
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatelessImpl;
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatefulImpl;
import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatelessImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
public class StatelessStatelessTestCase {
- private static SCANode node;
+ private static Node node;
private static ConversationalClient conversationalStatelessClientStatelessService;
private static ConversationalClient conversationalStatelessClientStatefulService;
private static ConversationalClient conversationalStatefulClientStatelessService;
@@ -49,28 +49,28 @@ public class StatelessStatelessTestCase {
@BeforeClass
public static void setUp() throws Exception {
try {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/Conversational/conversational.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/Conversational/conversational.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/Conversational").toURL().toString()));
node.start();
- conversationalStatelessClientStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientStatelessService");
- conversationalStatelessClientStatefulService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientStatefulService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientStatefulService");
- conversationalStatefulClientStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientStatelessService");
- conversationalStatefulClientStatefulService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientStatefulService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientStatefulService");
- conversationalStatelessClientRequestService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatelessClientRequestService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatelessClientRequestService");
- conversationalStatefulClientNonConversationalCallbackStatelessService = ((SCAClient)node).getService(ConversationalClient.class,
+ conversationalStatefulClientNonConversationalCallbackStatelessService = ((Client)node).getService(ConversationalClient.class,
"ConversationalStatefulClientNonConversationalCallbackStatefulService");
// reset the place where we record the sequence of calls passing
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TAnnotatedStruct.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TAnnotatedStruct.java
index adb48aa159..6f0ef584da 100644
--- a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TAnnotatedStruct.java
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TAnnotatedStruct.java
@@ -19,7 +19,7 @@
package org.apache.tuscany.sca.test.corba.types;
-import org.apache.tuscany.sca.binding.corba.meta.CorbaArray;
+import org.apache.tuscany.sca.binding.corba.provider.meta.CorbaArray;
/**
* @version $Rev$ $Date$ Scenario six structure used by Tuscany.
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TInnerUnion.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TInnerUnion.java
index d7734c48a3..f2baffce9a 100644
--- a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TInnerUnion.java
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TInnerUnion.java
@@ -19,8 +19,8 @@
package org.apache.tuscany.sca.test.corba.types;
-import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElement;
-import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElementType;
+import org.apache.tuscany.sca.binding.corba.provider.meta.CorbaUnionElement;
+import org.apache.tuscany.sca.binding.corba.provider.meta.CorbaUnionElementType;
/**
* @version $Rev$ $Date$
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TRichUnion.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TRichUnion.java
index eb76c94643..8270ba1a8c 100644
--- a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TRichUnion.java
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TRichUnion.java
@@ -19,8 +19,8 @@
package org.apache.tuscany.sca.test.corba.types;
-import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElement;
-import org.apache.tuscany.sca.binding.corba.meta.CorbaUnionElementType;
+import org.apache.tuscany.sca.binding.corba.provider.meta.CorbaUnionElement;
+import org.apache.tuscany.sca.binding.corba.provider.meta.CorbaUnionElementType;
/**
* @version $Rev$ $Date$
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSix.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSix.java
index 3b4943a43d..0e894cb7ea 100644
--- a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSix.java
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSix.java
@@ -19,7 +19,7 @@
package org.apache.tuscany.sca.test.corba.types;
-import org.apache.tuscany.sca.binding.corba.meta.CorbaArray;
+import org.apache.tuscany.sca.binding.corba.provider.meta.CorbaArray;
/**
* @version $Rev$ $Date$
diff --git a/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java b/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java
index da2fc8b108..35f69608e7 100644
--- a/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java
+++ b/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java
@@ -27,9 +27,9 @@ import java.util.Map;
import junit.framework.Assert;
import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceClient;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -39,8 +39,8 @@ import org.junit.Test;
*/
public class DatabindingTestCase {
- private static SCAClient client;
- private static SCANode node;
+ private static Client client;
+ private static Node node;
/**
* Runs once before running the tests
@@ -48,10 +48,13 @@ public class DatabindingTestCase {
@BeforeClass
public static void setUp() throws Exception {
try {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
+ NodeFactory nodeFactory = NodeFactory.newInstance();
node = nodeFactory.createSCANodeFromClassLoader("wsdl/wrapped/helloservice.composite", null);
node.start();
- client = (SCAClient)node;
+ client = (Client)node;
+ }catch(Throwable e) {
+ e.printStackTrace();
+ }
}catch(Throwable e) {
e.printStackTrace();
}
diff --git a/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/PrimitivesDatabindingTestCase.java b/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/PrimitivesDatabindingTestCase.java
index 65b8a5abc3..4a292a8b7a 100644
--- a/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/PrimitivesDatabindingTestCase.java
+++ b/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/PrimitivesDatabindingTestCase.java
@@ -22,9 +22,9 @@ package org.apache.tuscany.sca.itest.databindings.jaxb.topdown;
import junit.framework.Assert;
import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesServiceClient;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -34,18 +34,18 @@ import org.junit.Test;
*/
public class PrimitivesDatabindingTestCase {
- private static SCAClient domain;
- private static SCANode node;
+ private static Client domain;
+ private static Node node;
/**
* Runs before each test method
*/
@BeforeClass
public static void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
+ NodeFactory nodeFactory = NodeFactory.newInstance();
node = nodeFactory.createSCANodeFromClassLoader("wsdl/wrapped/primitivesservice.composite", null);
node.start();
- domain = (SCAClient)node;
+ domain = (Client)node;
}
/**
diff --git a/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/StandardTypesDatabindingTestCase.java b/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/StandardTypesDatabindingTestCase.java
index 6ed9026089..263b2f81eb 100644
--- a/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/StandardTypesDatabindingTestCase.java
+++ b/java/sca/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/StandardTypesDatabindingTestCase.java
@@ -55,9 +55,9 @@ import org.apache.axiom.attachments.ByteArrayDataSource;
import org.apache.tuscany.sca.databinding.xml.String2Node;
import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesServiceClient;
import org.apache.tuscany.sca.itest.databindings.jaxb.impl.StandardTypesTransformer;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
@@ -69,18 +69,18 @@ import org.xml.sax.InputSource;
*/
public class StandardTypesDatabindingTestCase {
- private static SCAClient domain;
- private static SCANode node;
+ private static Client domain;
+ private static Node node;
/**
* Runs once before the tests
*/
@BeforeClass
public static void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
+ NodeFactory nodeFactory = NodeFactory.newInstance();
node = nodeFactory.createSCANodeFromClassLoader("wsdl/wrapped/standard-types-service.composite", null);
node.start();
- domain = (SCAClient)node;
+ domain = (Client)node;
}
/**
diff --git a/java/sca/itest/exceptions-simple-ws/pom.xml b/java/sca/itest/exceptions-simple-ws/pom.xml
index 3450e3a79d..5e68bb3640 100644
--- a/java/sca/itest/exceptions-simple-ws/pom.xml
+++ b/java/sca/itest/exceptions-simple-ws/pom.xml
@@ -51,7 +51,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/interfaces/pom.xml b/java/sca/itest/interfaces/pom.xml
index d20e389c6d..fc515ce533 100644
--- a/java/sca/itest/interfaces/pom.xml
+++ b/java/sca/itest/interfaces/pom.xml
@@ -29,17 +29,24 @@
<name>Apache Tuscany Interface Integration Tests</name>
<dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
+ <artifactId>tuscany-node-impl</artifactId>
<version>2.0-SNAPSHOT</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-implementation-java-runtime</artifactId>
<version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
+ <scope>test</scope>
</dependency>
</dependencies>
diff --git a/java/sca/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java b/java/sca/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java
index 013cdd4f15..57ba18d0d6 100644
--- a/java/sca/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java
+++ b/java/sca/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java
@@ -22,28 +22,33 @@ package org.apache.tuscany.sca.itest.interfaces;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
public class InterfacesTestCase {
- private static SCADomain domain;
+ private static Node node;
@BeforeClass
public static void init() throws Exception {
- domain = SCADomain.newInstance("InterfacesTest.composite");
+ String location = ContributionLocationHelper.getContributionLocation("InterfacesTest.composite");
+ node = NodeFactory.newInstance().createNode("InterfacesTest.composite", new Contribution("c1", location));
+ node.start();
}
@AfterClass
public static void destroy() throws Exception {
- domain.close();
+ node.stop();
}
@Test
public void testLocalClient() {
- LocalServiceComponent service = domain.getService(LocalServiceComponent.class, "LocalServiceComponent");
- LocalClientComponent local = domain.getService(LocalClientComponent.class, "LocalClientComponent");
+ LocalServiceComponent service = node.getService(LocalServiceComponent.class, "LocalServiceComponent");
+ LocalClientComponent local = node.getService(LocalClientComponent.class, "LocalClientComponent");
try {
ParameterObject po = new ParameterObject();
@@ -83,8 +88,8 @@ public class InterfacesTestCase {
@Test
public void testRemoteClient() {
- RemoteServiceComponent service = domain.getService(RemoteServiceComponent.class, "RemoteServiceComponent");
- RemoteClientComponent remote = domain.getService(RemoteClientComponent.class, "RemoteClientComponent");
+ RemoteServiceComponent service = node.getService(RemoteServiceComponent.class, "RemoteServiceComponent");
+ RemoteClientComponent remote = node.getService(RemoteClientComponent.class, "RemoteClientComponent");
try {
// Test Pass By Value
diff --git a/java/sca/itest/interop-soap-service/pom.xml b/java/sca/itest/interop-soap-service/pom.xml
index e414b934a2..b72a0b89dd 100644
--- a/java/sca/itest/interop-soap-service/pom.xml
+++ b/java/sca/itest/interop-soap-service/pom.xml
@@ -53,7 +53,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/jms/src/main/java/org/apache/tuscany/sca/binding/jms/TestMessageProcessor.java b/java/sca/itest/jms/src/main/java/org/apache/tuscany/sca/binding/jms/TestMessageProcessor.java
index cfe7a649d9..80368a0fb6 100644
--- a/java/sca/itest/jms/src/main/java/org/apache/tuscany/sca/binding/jms/TestMessageProcessor.java
+++ b/java/sca/itest/jms/src/main/java/org/apache/tuscany/sca/binding/jms/TestMessageProcessor.java
@@ -22,7 +22,7 @@ package org.apache.tuscany.sca.binding.jms;
import javax.jms.Message;
import javax.jms.Session;
-import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.impl.JMSBindingImpl;
import org.apache.tuscany.sca.binding.jms.provider.XMLTextMessageProcessor;
public class TestMessageProcessor extends XMLTextMessageProcessor {
@@ -31,7 +31,7 @@ public class TestMessageProcessor extends XMLTextMessageProcessor {
public static boolean extractPayloadFromJMSMessageCalled;
public static boolean setOperationNameCalled;
- public TestMessageProcessor(JMSBinding jmsBinding) {
+ public TestMessageProcessor(JMSBindingImpl jmsBinding) {
super(jmsBinding);
}
public Object extractPayloadFromJMSMessage(Message message) {
diff --git a/java/sca/itest/large-sdo-ws/pom.xml b/java/sca/itest/large-sdo-ws/pom.xml
index a65a90edd0..c670bd9ec4 100644
--- a/java/sca/itest/large-sdo-ws/pom.xml
+++ b/java/sca/itest/large-sdo-ws/pom.xml
@@ -60,7 +60,7 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.4</version> <!-- to keep compatible with older servlet containers -->
+ <version>2.5</version>
<scope>test</scope>
</dependency>
@@ -73,7 +73,7 @@
</dependencies>
- <!-- Declare tuscany-host-tomcat dependency in the default profile so that it can be replaced -->
+ <!-- Declare tuscany-host-jetty dependency in the default profile so that it can be replaced -->
<profiles>
<profile>
<id>default</id>
@@ -83,7 +83,7 @@
<dependencies>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/late-reference-resolution/pom.xml b/java/sca/itest/late-reference-resolution/pom.xml
index 3b7325e35d..c4970cc786 100644
--- a/java/sca/itest/late-reference-resolution/pom.xml
+++ b/java/sca/itest/late-reference-resolution/pom.xml
@@ -106,7 +106,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
diff --git a/java/sca/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java b/java/sca/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java
index ebe834028d..74e01259e2 100644
--- a/java/sca/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java
+++ b/java/sca/itest/late-reference-resolution/src/test/java/calculator/LateReferenceResolutionTestCase.java
@@ -23,10 +23,10 @@ import java.io.File;
import junit.framework.Assert;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -38,9 +38,9 @@ import org.junit.Test;
*/
public class LateReferenceResolutionTestCase {
- private static SCANode nodeA;
- private static SCANode nodeB;
- private static SCANode nodeC;
+ private static Node nodeA;
+ private static Node nodeB;
+ private static Node nodeC;
private static CalculatorService calculatorService;
@@ -53,22 +53,22 @@ public class LateReferenceResolutionTestCase {
System.out.println("Setting up domain");
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- nodeC = nodeFactory.createSCANode(new File("src/main/resources/nodeC/Calculator.composite").toURL().toString(),
- new SCAContribution("NodeC",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ nodeC = nodeFactory.createNode(new File("src/main/resources/nodeC/Calculator.composite").toURL().toString(),
+ new Contribution("NodeC",
new File("src/main/resources/nodeC").toURL().toString()));
- nodeB = nodeFactory.createSCANode(new File("src/main/resources/nodeB/Calculator.composite").toURL().toString(),
- new SCAContribution("NodeB",
+ nodeB = nodeFactory.createNode(new File("src/main/resources/nodeB/Calculator.composite").toURL().toString(),
+ new Contribution("NodeB",
new File("src/main/resources/nodeB").toURL().toString()));
- nodeA = nodeFactory.createSCANode(new File("src/main/resources/nodeA/Calculator.composite").toURL().toString(),
- new SCAContribution("NodeA",
+ nodeA = nodeFactory.createNode(new File("src/main/resources/nodeA/Calculator.composite").toURL().toString(),
+ new Contribution("NodeA",
new File("src/main/resources/nodeA").toURL().toString()));
nodeC.start();
nodeB.start();
nodeA.start();
- SCAClient client = (SCAClient)nodeA;
+ Client client = (Client)nodeA;
calculatorService =
client.getService(CalculatorService.class, "CalculatorServiceComponentA");
diff --git a/java/sca/itest/oneway/src/test/java/org/apache/tuscany/sca/itest/oneway/OneWayTestCase.java b/java/sca/itest/oneway/src/test/java/org/apache/tuscany/sca/itest/oneway/OneWayTestCase.java
index c490150ec5..776b6ffdf7 100644
--- a/java/sca/itest/oneway/src/test/java/org/apache/tuscany/sca/itest/oneway/OneWayTestCase.java
+++ b/java/sca/itest/oneway/src/test/java/org/apache/tuscany/sca/itest/oneway/OneWayTestCase.java
@@ -30,9 +30,9 @@ import junit.framework.Assert;
import org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor;
import org.apache.tuscany.sca.itest.oneway.impl.OneWayClientImpl;
import org.apache.tuscany.sca.itest.oneway.impl.OneWayServiceImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -49,7 +49,7 @@ public class OneWayTestCase {
*/
private static final int MAX_SLEEP_TIME = 10000;
- private SCANode node;
+ private Node node;
/**
* Initialise the SCADomain.
@@ -59,7 +59,7 @@ public class OneWayTestCase {
@Before
public void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
+ NodeFactory nodeFactory = NodeFactory.newInstance();
node = nodeFactory.createSCANodeFromClassLoader("OneWayContribution/META-INF/sca-deployables/oneWay.composite", null);
node.start();
@@ -84,7 +84,7 @@ public class OneWayTestCase {
@Test
public void testOneWay() throws Exception {
OneWayClient client =
- ((SCAClient)node).getService(OneWayClient.class, "OneWayClientComponent");
+ ((Client)node).getService(OneWayClient.class, "OneWayClientComponent");
int count = 100;
@@ -120,7 +120,7 @@ public class OneWayTestCase {
@Test
public void testOneWayUsingNonBlockingInterceptorThrowsAnException() {
OneWayClient client =
- ((SCAClient)node).getService(OneWayClient.class, "OneWayClientComponentSCABinding");
+ ((Client)node).getService(OneWayClient.class, "OneWayClientComponentSCABinding");
// We need to modify the JDK Logger for the NonBlockingInterceptor so we
// can check that it logs a message for the @OneWay invocation that throws
diff --git a/java/sca/itest/osgi-tuscany/tuscany-osgi-installer/pom.xml b/java/sca/itest/osgi-tuscany/tuscany-osgi-installer/pom.xml
index 1b763f205a..84f8cc015b 100644
--- a/java/sca/itest/osgi-tuscany/tuscany-osgi-installer/pom.xml
+++ b/java/sca/itest/osgi-tuscany/tuscany-osgi-installer/pom.xml
@@ -35,11 +35,6 @@
<dependencies>
<dependency>
<groupId>${pom.groupId}</groupId>
- <artifactId>tuscany-monitor-logging</artifactId>
- <version>${pom.version}</version>
- </dependency>
- <dependency>
- <groupId>${pom.groupId}</groupId>
<artifactId>tuscany-assembly</artifactId>
<version>${pom.version}</version>
</dependency>
@@ -445,7 +440,7 @@
<exclusions>
<exclusion>
<groupId>${pom.groupId}</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
</exclusion>
</exclusions>
</dependency>
@@ -537,7 +532,7 @@
<exclusions>
<exclusion>
<groupId>${pom.groupId}</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
</exclusion>
</exclusions>
</dependency>
diff --git a/java/sca/itest/osgi-tuscany/tuscany-versioned/pom.xml b/java/sca/itest/osgi-tuscany/tuscany-versioned/pom.xml
index f08acaa994..5804f4711d 100644
--- a/java/sca/itest/osgi-tuscany/tuscany-versioned/pom.xml
+++ b/java/sca/itest/osgi-tuscany/tuscany-versioned/pom.xml
@@ -36,11 +36,6 @@
<dependencies>
<dependency>
<groupId>${pom.groupId}</groupId>
- <artifactId>tuscany-monitor-logging</artifactId>
- <version>${pom.version}</version>
- </dependency>
- <dependency>
- <groupId>${pom.groupId}</groupId>
<artifactId>tuscany-assembly</artifactId>
<version>${pom.version}</version>
</dependency>
@@ -446,7 +441,7 @@
<exclusions>
<exclusion>
<groupId>${pom.groupId}</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
</exclusion>
</exclusions>
</dependency>
@@ -538,7 +533,7 @@
<exclusions>
<exclusion>
<groupId>${pom.groupId}</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
</exclusion>
</exclusions>
</dependency>
diff --git a/java/sca/itest/policy-security-basicauth/pom.xml b/java/sca/itest/policy-security-basicauth/pom.xml
index 183f049a9a..f3b3b28c1f 100644
--- a/java/sca/itest/policy-security-basicauth/pom.xml
+++ b/java/sca/itest/policy-security-basicauth/pom.xml
@@ -65,7 +65,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/policy-security-basicauth/src/test/java/org/apache/tuscany/sca/itest/BasicAuthTestCase.java b/java/sca/itest/policy-security-basicauth/src/test/java/org/apache/tuscany/sca/itest/BasicAuthTestCase.java
index b6e0444d2d..10fbac4e20 100644
--- a/java/sca/itest/policy-security-basicauth/src/test/java/org/apache/tuscany/sca/itest/BasicAuthTestCase.java
+++ b/java/sca/itest/policy-security-basicauth/src/test/java/org/apache/tuscany/sca/itest/BasicAuthTestCase.java
@@ -24,9 +24,9 @@ import java.io.ByteArrayInputStream;
import junit.framework.Assert;
import helloworld.HelloWorldService;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.ws.security.util.Base64;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -39,18 +39,18 @@ import com.meterware.httpunit.WebRequest;
import com.meterware.httpunit.WebResponse;
public class BasicAuthTestCase {
- private static SCANode node;
+ private static Node node;
private static HelloWorldService service;
@BeforeClass
public static void init() throws Exception {
try {
- SCANodeFactory factory = SCANodeFactory.newInstance();
+ NodeFactory factory = NodeFactory.newInstance();
node = factory.createSCANodeFromClassLoader("helloworld.composite",
BasicAuthTestCase.class.getClassLoader());
node.start();
- service = ((SCAClient)node).getService(HelloWorldService.class, "HelloWorldClientComponent");
+ service = ((Client)node).getService(HelloWorldService.class, "HelloWorldClientComponent");
} catch (Exception ex) {
ex.printStackTrace();
}
diff --git a/java/sca/itest/policy-security-jsr250/pom.xml b/java/sca/itest/policy-security-jsr250/pom.xml
index 245eeb7673..935958d8c2 100644
--- a/java/sca/itest/policy-security-jsr250/pom.xml
+++ b/java/sca/itest/policy-security-jsr250/pom.xml
@@ -59,7 +59,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/policy-security/pom.xml b/java/sca/itest/policy-security/pom.xml
index 8a7965f20e..23bced91b5 100644
--- a/java/sca/itest/policy-security/pom.xml
+++ b/java/sca/itest/policy-security/pom.xml
@@ -52,7 +52,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/policy/pom.xml b/java/sca/itest/policy/pom.xml
index 16fd2039c0..67e956abca 100644
--- a/java/sca/itest/policy/pom.xml
+++ b/java/sca/itest/policy/pom.xml
@@ -52,7 +52,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/policy/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java b/java/sca/itest/policy/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java
index ff47988bce..3aa6565c01 100644
--- a/java/sca/itest/policy/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java
+++ b/java/sca/itest/policy/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java
@@ -23,12 +23,12 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+import org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.service.ContributionReadException;
-import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
-import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.policy.Policy;
import org.apache.tuscany.sca.policy.PolicyFactory;
@@ -40,7 +40,7 @@ import org.apache.tuscany.sca.policy.PolicyFactory;
*/
public class TestPolicyProcessor implements StAXArtifactProcessor<Policy> {
- public TestPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public TestPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
}
diff --git a/java/sca/itest/pom.xml b/java/sca/itest/pom.xml
index 597c8810f0..7592682344 100644
--- a/java/sca/itest/pom.xml
+++ b/java/sca/itest/pom.xml
@@ -36,13 +36,6 @@
<version>4.5</version>
<scope>compile</scope>
</dependency>
-
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>2.4</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<properties>
@@ -50,7 +43,6 @@
<was.python.script>${basedir}/wasAdmin.py</was.python.script>
</properties>
-
<profiles>
<profile>
<id>default</id>
@@ -58,7 +50,35 @@
<activeByDefault>true</activeByDefault>
</activation>
<modules>
- </modules>
+ <module>builder</module>
+ <module>callablereferences</module>
+ <module>callback-api</module>
+ <module>callback-basic</module>
+ <module>callback-complex-type</module>
+ <module>callback-id</module>
+ <module>callback-multiple-wires</module>
+ <module>callback-separatethread</module>
+ <module>callback-set-callback</module>
+ <module>callback-set-conversation</module>
+ <module>component-type</module>
+ <module>contribution</module>
+ <module>contribution-import-export</module>
+ <module>conversations</module>
+ <module>exceptions</module>
+ <module>extended-api</module>
+ <module>interfaces</module>
+ <module>late-reference-resolution</module>
+ <module>oneway</module>
+ <module>operation-overloading</module>
+ <module>properties</module>
+ <module>recursive</module>
+ <module>recursive-multi-level</module>
+ <module>references</module>
+ <module>serialization</module>
+ <module>services</module>
+ <module>scopes</module>
+ <module>wires</module>
+ </modules>
</profile>
<profile>
<id>old</id>
@@ -77,15 +97,13 @@
<module>callback-set-conversation</module>
<module>component-type</module>
<module>contribution</module>
- <module>contribution-multiple</module>
- <module>contribution-import-export</module>
<!--
<module>contribution-classloader</module> -->
+ <module>contribution-import-export</module>
<module>conversations</module>
- <module>corba</module>
<module>conversations-ws</module>
+ <module>corba</module>
<module>databindings</module>
- <!--module>domain</module-->
<module>exceptions</module>
<module>exceptions-cross-binding</module>
<module>exceptions-cross-binding-ws</module>
@@ -107,28 +125,33 @@
<module>late-reference-resolution</module>
<module>oneway</module>
<module>operation-overloading</module>
+ <!--
<module>osgi-implementation</module>
<module>osgi-contribution</module>
+ -->
<module>policy</module>
<module>policy-security</module>
<module>policy-security-basicauth</module>
<module>policy-security-jsr250</module>
<module>policy-security-token</module>
+ <!--
+ <module>promotion-interface-missmatch</module>
+ -->
<module>properties</module>
<module>recursive</module>
<module>recursive-multi-level</module>
<module>recursive-ws</module>
<module>references</module>
+ <module>scopes</module>
<module>serialization</module>
<module>services</module>
<module>spring</module>
- <module>scopes</module>
<module>transaction</module>
<module>validation</module>
<module>wires</module>
<module>wsdl</module>
- <module>wsdlless</module>
<module>wsdl2java</module>
+ <module>wsdlless</module>
<module>wsdl-multiple</module>
<module>ws-void-args-return</module>
</modules>
@@ -164,7 +187,7 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>2.3</version>
+ <version>2.5</version>
<scope>provided</scope>
</dependency>
</dependencies>
@@ -172,29 +195,16 @@
<modules>
<module>callback-api</module>
<module>callback-basic</module>
- <!--
- <module>callback-complex-type</module>
- -->
<module>callback-id</module>
<module>callback-multiple-wires</module>
<module>callback-set-callback</module>
<module>callback-set-conversation</module>
- <!--
- <module>contribution</module>
- <module>contribution-multiple</module>
- <module>contribution-import-export</module>
- <module>contribution-classloader</module>
- -->
<module>conversations</module>
<module>exceptions</module>
<module>exceptions-cross-binding</module>
<module>extended-api</module>
<module>oneway</module>
<module>operation-overloading</module>
- <!--
- <module>properties</module>
- <module>recursive</module>
- -->
<module>references</module>
<module>services</module>
<module>component-type</module>
@@ -266,7 +276,7 @@
<configuration>
<primaryArtifact>false</primaryArtifact>
<!-- Exclude a few jars to avoid conflicts -->
- <warSourceExcludes>WEB-INF/lib/tuscany-host-tomcat-*.jar,WEB-INF/lib/tuscany-host-jetty-*.jar,servlet-api-*.jar, WEB-INF/lib/catalina*.jar,WEB-INF/classes/META-INF/sca-contribution*.xml</warSourceExcludes>
+ <warSourceExcludes>WEB-INF/lib/tuscany-host-jetty-*.jar,WEB-INF/lib/tuscany-host-jetty-*.jar,servlet-api-*.jar, WEB-INF/lib/catalina*.jar,WEB-INF/classes/META-INF/sca-contribution*.xml</warSourceExcludes>
<webResources>
<!-- Add the tests jar into the WAR -->
<!--
diff --git a/java/sca/itest/promotion-interface-missmatch/pom.xml b/java/sca/itest/promotion-interface-missmatch/pom.xml
index 1e729bbc88..485bf2fdfa 100644
--- a/java/sca/itest/promotion-interface-missmatch/pom.xml
+++ b/java/sca/itest/promotion-interface-missmatch/pom.xml
@@ -51,7 +51,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/itest/references/pom.xml b/java/sca/itest/references/pom.xml
index 937668407b..19df01054a 100644
--- a/java/sca/itest/references/pom.xml
+++ b/java/sca/itest/references/pom.xml
@@ -29,25 +29,24 @@
<name>Apache Tuscany SCA References Integration Tests</name>
<dependencies>
- <dependency>
+ <dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
+ <artifactId>tuscany-node-api</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <artifactId>tuscany-node-impl</artifactId>
<version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
+ <scope>test</scope>
</dependency>
-
+
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-axis2</artifactId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
<version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
-
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/java/sca/itest/scopes/pom.xml b/java/sca/itest/scopes/pom.xml
index 994a1a4bb6..26b4d08665 100644
--- a/java/sca/itest/scopes/pom.xml
+++ b/java/sca/itest/scopes/pom.xml
@@ -29,19 +29,26 @@
<artifactId>itest-scopes</artifactId>
<dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
+ <artifactId>tuscany-node-impl</artifactId>
<version>2.0-SNAPSHOT</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-implementation-java-runtime</artifactId>
<version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
+ <scope>test</scope>
</dependency>
-
+
</dependencies>
</project>
diff --git a/java/sca/itest/serialization/pom.xml b/java/sca/itest/serialization/pom.xml
index 7350c243f4..625bcf4154 100644
--- a/java/sca/itest/serialization/pom.xml
+++ b/java/sca/itest/serialization/pom.xml
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
diff --git a/java/sca/itest/services/pom.xml b/java/sca/itest/services/pom.xml
index b0c459af1c..babfffa354 100644
--- a/java/sca/itest/services/pom.xml
+++ b/java/sca/itest/services/pom.xml
@@ -29,17 +29,24 @@
<name>Apache Tuscany SCA Services Integration Tests</name>
<dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
+ <artifactId>tuscany-node-impl</artifactId>
<version>2.0-SNAPSHOT</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-implementation-java-runtime</artifactId>
<version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
+ <scope>test</scope>
</dependency>
</dependencies>
diff --git a/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java b/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java
index ba6cac279c..9f4dfa39e4 100644
--- a/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java
+++ b/java/sca/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java
@@ -22,73 +22,76 @@ package org.apache.tuscany.sca.itest.services;
import static junit.framework.Assert.assertEquals;
import junit.framework.Assert;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.osoa.sca.ServiceRuntimeException;
public class ServicesTestCase {
- private static SCADomain domain;
+ private static Node node;
@BeforeClass
public static void init() throws Exception {
- if (domain == null) {
- domain = SCADomain.newInstance("ServicesTest.composite");
- }
+ String location = ContributionLocationHelper.getContributionLocation("ServicesTest.composite");
+ node = NodeFactory.newInstance().createNode("ServicesTest.composite", new Contribution("c1", location));
+ node.start();
}
@AfterClass
public static void destroy() throws Exception {
- domain.close();
+ node.stop();
}
@Test
public void testAService() {
- AComponent a1 = domain.getService(AComponent.class, "AComponent1");
+ AComponent a1 = node.getService(AComponent.class, "AComponent1");
assertEquals("AComponent", a1.foo());
- AComponent a2 = domain.getService(AComponent.class, "AComponent2/AComponent");
+ AComponent a2 = node.getService(AComponent.class, "AComponent2/AComponent");
assertEquals("AComponent", a2.foo());
}
@Test
public void testBService() {
- BComponent a1 = domain.getService(BComponent.class, "BComponent1");
+ BComponent a1 = node.getService(BComponent.class, "BComponent1");
assertEquals("BComponent", a1.foo());
- BComponent a2 = domain.getService(BComponent.class, "BComponent2/BComponent");
+ BComponent a2 = node.getService(BComponent.class, "BComponent2/BComponent");
assertEquals("BComponent", a2.foo());
}
@Test
public void testCService() {
- CComponent a1 = domain.getService(CComponent.class, "CComponent1");
+ CComponent a1 = node.getService(CComponent.class, "CComponent1");
assertEquals("CComponent", a1.foo());
- CComponent a2 = domain.getService(CComponent.class, "CComponent2/CComponent");
+ CComponent a2 = node.getService(CComponent.class, "CComponent2/CComponent");
assertEquals("CComponent", a2.foo());
}
@Test
public void testDService() {
- DComponent a1 = domain.getService(DComponent.class, "DComponent1/DComponent");
+ DComponent a1 = node.getService(DComponent.class, "DComponent1/DComponent");
assertEquals("DComponent", a1.foo());
- D1Component a2 = domain.getService(D1Component.class, "DComponent1/D1Component");
+ D1Component a2 = node.getService(D1Component.class, "DComponent1/D1Component");
assertEquals("DComponent", a2.foo1());
try {
- domain.getService(DComponent.class, "DComponent1");
+ node.getService(DComponent.class, "DComponent1");
Assert.fail("The service name is required");
} catch (ServiceRuntimeException e) {
Assert.assertTrue("The service name is required", true);
}
- DComponent a3 = domain.getService(DComponent.class, "DComponent2/DComponent");
+ DComponent a3 = node.getService(DComponent.class, "DComponent2/DComponent");
assertEquals("DComponent", a3.foo());
- D1Component a4 = domain.getService(D1Component.class, "DComponent2/D1Component");
+ D1Component a4 = node.getService(D1Component.class, "DComponent2/D1Component");
assertEquals("DComponent", a4.foo1());
}
diff --git a/java/sca/itest/validation/pom.xml b/java/sca/itest/validation/pom.xml
index b8abe4d380..36026471ac 100644
--- a/java/sca/itest/validation/pom.xml
+++ b/java/sca/itest/validation/pom.xml
@@ -32,12 +32,6 @@
<dependencies>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-monitor-logging</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-contribution-resource</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
@@ -80,12 +74,6 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-osgi</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-implementation-ejb</artifactId>
<version>2.0-SNAPSHOT</version>
<exclusions>
@@ -96,19 +84,6 @@
</exclusions>
</dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-osgi-runtime</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.main</artifactId>
- <version>1.0.4</version>
- </dependency>
-
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-binding-ws-axis2</artifactId>
diff --git a/java/sca/itest/validation/src/main/java/impl/osgi/OSGiTestImpl.java b/java/sca/itest/validation/src/main/java/impl/osgi/OSGiTestImpl.java
deleted file mode 100644
index 6f9df2c034..0000000000
--- a/java/sca/itest/validation/src/main/java/impl/osgi/OSGiTestImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package impl.osgi;
-
-import java.util.Hashtable;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- *
- * Test class - Implementation of an OSGi service
- *
- */
-public class OSGiTestImpl implements OSGiTestInterface, BundleActivator {
-
- public String testService() {
-
- return OSGiTestImpl.class.getName();
-
- }
-
- public void start(BundleContext bc) throws Exception {
-
- bc.registerService(OSGiTestInterface.class.getName(), this, new Hashtable<String, Object>());
-
- }
-
- public void stop(BundleContext bc) throws Exception {
- }
-
-
-}
diff --git a/java/sca/itest/validation/src/main/java/impl/osgi/OSGiTestInterface.java b/java/sca/itest/validation/src/main/java/impl/osgi/OSGiTestInterface.java
deleted file mode 100644
index bafff878cd..0000000000
--- a/java/sca/itest/validation/src/main/java/impl/osgi/OSGiTestInterface.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package impl.osgi;
-
-/**
- *
- * Test class - Interface for an OSGi service
- *
- */
-public interface OSGiTestInterface {
-
- String testService() throws Exception ;
-
-}
diff --git a/java/sca/itest/validation/src/main/java/impl/osgi/OSGiTestWithPropertyImpl.java b/java/sca/itest/validation/src/main/java/impl/osgi/OSGiTestWithPropertyImpl.java
deleted file mode 100644
index e44d93e6be..0000000000
--- a/java/sca/itest/validation/src/main/java/impl/osgi/OSGiTestWithPropertyImpl.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package impl.osgi;
-
-import java.util.Hashtable;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osoa.sca.annotations.Property;
-
-/**
- *
- * Test class - Implementation of an OSGi service
- *
- */
-public class OSGiTestWithPropertyImpl implements OSGiTestInterface, BundleActivator {
-
- @Property
- public double exchangeRate;
-
- private String currency;
-
- @Property
- public void setCurrency(String currency) {
- this.currency = currency;
- }
-
- public String testService() throws Exception {
-
- if (exchangeRate != 2.0)
- throw new Exception("Property exchangeRate not set correctly, expected 2.0, got " + exchangeRate);
- if (!"USD".equals(currency))
- throw new Exception("Property currency not set correctly, expected USD, got " + currency);
- return OSGiTestWithPropertyImpl.class.getName();
-
- }
-
- public void start(BundleContext bc) throws Exception {
-
- bc.registerService(OSGiTestInterface.class.getName(), this, new Hashtable<String, Object>());
-
- }
-
- public void stop(BundleContext bc) throws Exception {
- }
-
-
-}
diff --git a/java/sca/itest/validation/src/test/java/assembly/xml/ContributionReadException.java b/java/sca/itest/validation/src/test/java/assembly/xml/ContributionReadException.java
index 9b0d51eb59..55999fe27d 100644
--- a/java/sca/itest/validation/src/test/java/assembly/xml/ContributionReadException.java
+++ b/java/sca/itest/validation/src/test/java/assembly/xml/ContributionReadException.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class ContributionReadException extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("ContributionReadException", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/assembly/xml/PolicyImplValidationException.java b/java/sca/itest/validation/src/test/java/assembly/xml/PolicyImplValidationException.java
index e8476991a9..5ab65b2f64 100644
--- a/java/sca/itest/validation/src/test/java/assembly/xml/PolicyImplValidationException.java
+++ b/java/sca/itest/validation/src/test/java/assembly/xml/PolicyImplValidationException.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class PolicyImplValidationException extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("PolicyImplValidationException", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/assembly/xml/PolicyServiceValidationException.java b/java/sca/itest/validation/src/test/java/assembly/xml/PolicyServiceValidationException.java
index 8ae156d63e..52803411cf 100644
--- a/java/sca/itest/validation/src/test/java/assembly/xml/PolicyServiceValidationException.java
+++ b/java/sca/itest/validation/src/test/java/assembly/xml/PolicyServiceValidationException.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class PolicyServiceValidationException extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("PolicyServiceValidationException", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedBindingElement.java b/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedBindingElement.java
index d757ff98dd..8adf1aa2aa 100644
--- a/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedBindingElement.java
+++ b/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedBindingElement.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class UnexpectedBindingElement extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("UnexpectedBindingElement", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedImplementationElement.java b/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedImplementationElement.java
index 9a231a18c7..2790cd0a6c 100644
--- a/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedImplementationElement.java
+++ b/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedImplementationElement.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class UnexpectedImplementationElement extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("UnexpectedImplementationElement", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedInterfaceElement.java b/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedInterfaceElement.java
index 4ae88b9ba3..c6daaebfe5 100644
--- a/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedInterfaceElement.java
+++ b/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedInterfaceElement.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
/**
@@ -51,7 +50,7 @@ public class UnexpectedInterfaceElement extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("UnexpectedInterfaceElement", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java b/java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java
index ff94ad7b93..204034737b 100644
--- a/java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -59,7 +58,7 @@ public class UnknownEJBSessionTypeTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("UnknownEJBSessionType", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java b/java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java
index a192674aeb..ff2e413ab7 100644
--- a/java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -58,7 +57,7 @@ public class UnknownEJBVersionTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("UnknownEJBVersion", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessActivationSpecTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessActivationSpecTestCase.java
index e0e5347d96..1632f95689 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessActivationSpecTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessActivationSpecTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class DoesntProcessActivationSpecTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("DoesntProcessActivationSpec", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java
index 9e08afec09..054f5a6035 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class DoesntProcessDestinationTypeTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("DoesntProcessDestinationType", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java
index ed96072780..f3f61ec04b 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import org.junit.Ignore;
import domain.CustomCompositeBuilder;
@@ -54,7 +53,7 @@ public class DoesntProcessHeadersTestCase extends TestCase {
@Ignore("TUSCANY-2532")
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
// assertEquals("DoesntProcessHeaders", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResourceAdapterTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResourceAdapterTestCase.java
index a2a5b0b872..76d8a63b51 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResourceAdapterTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResourceAdapterTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class DoesntProcessResourceAdapterTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("DoesntProcessResourceAdapter", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseActivationSpecTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseActivationSpecTestCase.java
index 64b41623de..95c108e6db 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseActivationSpecTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseActivationSpecTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class DoesntProcessResponseActivationSpecTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("DoesntProcessResponseActivationSpec", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseConnectionFactoryTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseConnectionFactoryTestCase.java
index 86fbe51dad..2f66bbfe0c 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseConnectionFactoryTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseConnectionFactoryTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class DoesntProcessResponseConnectionFactoryTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("DoesntProcessResponseConnectionFactory", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java
index 6e884c41cd..decf234753 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class DoesntProcessResponseDestinationTypeTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("DoesntProcessResponseDestinationType", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java
index c237f8af18..445a41700b 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class InvalidCorrelationSchemeTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("InvalidCorrelationScheme", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java
index 52dc7e5795..531573a0aa 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class InvalidJMSDeliveryModeTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("InvalidJMSDeliveryMode", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java
index a93df290c3..758e19d264 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class InvalidJMSPriorityTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("InvalidJMSPriority", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java
index 949ec02134..96319438b6 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class InvalidResponseDestinationTypeTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("InvalidResponseDestinationType", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java
index d38a88744f..a2a4caa0b0 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class MissingActivationSpecNameTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getProblems().get(1);
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("MissingActivationSpecName", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java
index 6999ae7969..0d91afd7e6 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class MissingConnectionFactoryNameTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getProblems().get(1);
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("MissingConnectionFactoryName", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java
index 7333fc0f1e..048fcc7d43 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class MissingResponseActivationSpecTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getProblems().get(1);
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("MissingResponseActivationSpec", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java
index ca0ef9a294..856c9f3b27 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class MissingResponseConnectionFactoryTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getProblems().get(1);
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("MissingResponseConnectionFactory", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java
index d9e1c782a8..b584cb8d94 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class MustStartWithSchemaTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("MustStartWithSchema", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java
index 3e4e36d839..ae26008564 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class UnexpectedElementTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("UnexpectedElement", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/UnexpectedResponseElementTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/UnexpectedResponseElementTestCase.java
index 60ea47a85f..fedc1f7530 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/UnexpectedResponseElementTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/UnexpectedResponseElementTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class UnexpectedResponseElementTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("UnexpectedResponseElement", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java
index 6a75a35f99..d94643cbc9 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class UnknownTokenInURITestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("UnknownTokenInURI", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java b/java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java
index c0f60a848f..4cbe3def2d 100644
--- a/java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class InvalidWsdlElementAttrTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("InvalidWsdlElementAttr", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java b/java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java
index 5a74194796..2fe8af318c 100644
--- a/java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class MustUseWsdlBindingTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("MustUseWsdlBinding", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java b/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java
index 7991de7176..09865ab855 100644
--- a/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class WsdlBindingDoesNotMatchTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("WsdlBindingDoesNotMatch", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java b/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java
index 1ef5f7b00a..3be31d5994 100644
--- a/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class WsdlPortTypeDoesNotMatchTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("WsdlPortTypeDoesNotMatch", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java b/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java
index a0a7d12b9f..303b8299ad 100644
--- a/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java
+++ b/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class WsdlServiceDoesNotMatchTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("WsdlServiceDoesNotMatch", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java
index 555810f453..f4ba8eb4e6 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,13 +39,13 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class ComponentReferenceTargetNotFoundTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/ComponentReferenceTargetNotFound/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/ComponentReferenceTargetNotFound/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/ComponentReferenceTargetNotFound").toURL().toString()));
try {
@@ -55,7 +54,7 @@ public class ComponentReferenceTargetNotFoundTestCase extends TestCase {
// do nothing - the SCA binding throws and exception here
// because the interface for the reference is not remotable
}
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -68,7 +67,7 @@ public class ComponentReferenceTargetNotFoundTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("ComponentReferenceTargetNotFound", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java
index 4d70df1102..a7b23ed10f 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -53,7 +52,7 @@ public class DuplicateComponentNameTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("DuplicateComponentName", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java
index 7593f39991..96d8debd4a 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java
@@ -27,23 +27,22 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
* This shows how to test the Calculator service component.
*/
public class DuplicateImplementationPropertyNameTestCase extends TestCase {
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/DuplicateImplementationPropertyName/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/DuplicateImplementationPropertyName/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/DuplicateImplementationPropertyName").toURL().toString()));
}
@@ -56,7 +55,7 @@ public class DuplicateImplementationPropertyNameTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("DuplicateImplementationPropertyName", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java
index 0a711175dc..7246d6e0a3 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java
@@ -27,10 +27,9 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -38,13 +37,13 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
*/
public class DuplicateImplementationReferenceNameTestCase extends TestCase {
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/DuplicateImplementationReferenceName/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/DuplicateImplementationReferenceName/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/DuplicateImplementationReferenceName").toURL().toString()));
}
@@ -57,7 +56,7 @@ public class DuplicateImplementationReferenceNameTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("DuplicateImplementationReferenceName", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java
index 10660795a7..3ffd10f36f 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class DuplicatePropertyNameTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/DuplicatePropertyName/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/DuplicatePropertyName/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/DuplicatePropertyName").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class DuplicatePropertyNameTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("DuplicateComponentPropertyName", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java
index 15b4b15989..0e0e4cd2bd 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class DuplicateReferenceNameTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/DuplicateReferenceName/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/DuplicateReferenceName/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/DuplicateReferenceName").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class DuplicateReferenceNameTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("DuplicateComponentReferenceName", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java
index 55741ec2ef..45c7af3d1f 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class MultipleBindingsForServiceTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/MultipleBindingsForService/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/MultipleBindingsForService/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/MultipleBindingsForService").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class MultipleBindingsForServiceTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("MultipleBindingsForService", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java
index 7f8bd68e5e..ef2d13aaaa 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java
@@ -27,10 +27,9 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -39,13 +38,13 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class NoComponentImplementationTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/NoComponentImplementation/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/NoComponentImplementation/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/NoComponentImplementation").toURL().toString()));
}
@@ -58,7 +57,7 @@ public class NoComponentImplementationTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("NoComponentImplementation", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java
index 1f26d3a7d6..9014fb00e5 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class NoCompositeNamespaceTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/NoCompositeNamespace/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/NoCompositeNamespace/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/NoCompositeNamespace").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class NoCompositeNamespaceTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("NoCompositeNamespace", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java
index d398efc9ea..69382b0456 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,17 +39,17 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class NoMatchingBindingTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
+ NodeFactory nodeFactory = NodeFactory.newInstance();
node =
- nodeFactory.createSCANode("Calculator.composite", new SCAContribution("TestContribution", new File("src/main/resources/NoMatchingBinding")
+ nodeFactory.createNode("Calculator.composite", new Contribution("TestContribution", new File("src/main/resources/NoMatchingBinding")
.toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -64,7 +63,7 @@ public class NoMatchingBindingTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("NoMatchingBinding", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java
index 9d2f028dea..057039b4df 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class PromotedReferenceNotFoundTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/PromotedReferenceNotFound/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/PromotedReferenceNotFound/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/PromotedReferenceNotFound").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class PromotedReferenceNotFoundTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("PromotedReferenceNotFound", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java
index 7f836e4b01..cda4f9cb57 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class PromotedServiceNotFoundTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/PromotedServiceNotFound/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/PromotedServiceNotFound/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/PromotedServiceNotFound").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class PromotedServiceNotFoundTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("PromotedServiceNotFound", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java
index 04c2594cd3..e8475bb865 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class PropertyAttributeMustSupplyNullTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/PropertyAttribute").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class PropertyAttributeMustSupplyNullTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("PropertyMustSupplyNull", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java
index 3dabfecbb6..88721a18e2 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class PropertyAttributeTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/PropertyAttribute/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/PropertyAttribute/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/PropertyAttribute").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class PropertyAttributeTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("PropertyMustSupplyIncompatible", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java
index 0dca8ed1df..1a0739eaa5 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class PropertyNotFoundTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/PropertyNotFound/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/PropertyNotFound/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/PropertyNotFound").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class PropertyNotFoundTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("PropertyNotFound", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java
index 37f7ef352e..c20c551d92 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class PropertyOverrideManyAttributeTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/PropertyAttribute").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class PropertyOverrideManyAttributeTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("PropertyOverrideManyAttribute", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java
index ab57283a9e..7ae97638ce 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class ReferenceIncompatibleComponentInterfaceTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/ReferenceIncompatibleComponentInterface").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class ReferenceIncompatibleComponentInterfaceTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("ReferenceIncompatibleComponentInterface", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java
index 4c3cc3856a..6e5eb41ba0 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class ReferenceIncompatibleInterfaceTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/ReferenceIncompatibleInterface/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/ReferenceIncompatibleInterface/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/ReferenceIncompatibleInterface").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class ReferenceIncompatibleInterfaceTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("ReferenceIncompatibleInterface", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java
index 06fb06f6ad..2eec73f815 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class ReferenceIncompatibleMultiplicityTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/ReferenceIncompatibleMultiplicity/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/ReferenceIncompatibleMultiplicity/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/ReferenceIncompatibleMultiplicity").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class ReferenceIncompatibleMultiplicityTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("ReferenceIncompatibleMultiplicity", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java
index 6bacc8b05e..ab2c373486 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java
@@ -18,21 +18,10 @@
*/
package calculator.warning;
-import java.io.File;
-
import junit.framework.TestCase;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
import domain.CustomCompositeBuilder;
@@ -73,7 +62,7 @@ public class ReferenceNotFoundTestCase extends TestCase {
public void testCalculator() throws Exception {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("ReferenceNotFound", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java
index d615857105..9b5adee7e6 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class ReferenceWithoutTargetsTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/ReferenceWithoutTargets/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/ReferenceWithoutTargets/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/ReferenceWithoutTargets").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class ReferenceWithoutTargetsTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("ReferenceWithoutTargets", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java
index e9b920119a..1b8116a469 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java
@@ -27,11 +27,10 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class ServiceNotFoundForComponentServiceTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/ServiceNotFoundForComponentService/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/ServiceNotFoundForComponentService/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/ServiceNotFoundForComponentService").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -62,7 +61,7 @@ public class ServiceNotFoundForComponentServiceTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("ServiceNotFoundForComponentService", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java
index 4d950e30ff..c848cbb243 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java
@@ -27,10 +27,9 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -39,13 +38,13 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class UnresolvedComponentImplementationTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/UnresolvedComponentImplementation/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/UnresolvedComponentImplementation/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/UnresolvedComponentImplementation").toURL().toString()));
}
@@ -58,7 +57,7 @@ public class UnresolvedComponentImplementationTestCase extends TestCase {
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("UnresolvedComponentImplementation", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java
index 60b08764c1..bcd6637a03 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java
@@ -22,10 +22,10 @@ import java.io.File;
import junit.framework.TestCase;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
/**
* This shows how to test the Calculator service component.
@@ -33,18 +33,18 @@ import org.apache.tuscany.sca.node.SCANodeFactory;
public class XSDValidationTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
private Exception startUpException;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
+ NodeFactory nodeFactory = NodeFactory.newInstance();
try {
- node = nodeFactory.createSCANode(new File("src/main/resources/XsdValidation/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ node = nodeFactory.createNode(new File("src/main/resources/XsdValidation/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/XsdValidation").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
} catch (Exception ex){
startUpException = ex;
}
diff --git a/java/sca/itest/validation/src/test/java/contribution/java/AttributePackageMissingTestCase.java b/java/sca/itest/validation/src/test/java/contribution/java/AttributePackageMissingTestCase.java
index 04135ab2cc..60b0c51fef 100644
--- a/java/sca/itest/validation/src/test/java/contribution/java/AttributePackageMissingTestCase.java
+++ b/java/sca/itest/validation/src/test/java/contribution/java/AttributePackageMissingTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class AttributePackageMissingTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("AttributePackageMissing", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/contribution/namespace/AttributeNameSpaceMissingTestCase.java b/java/sca/itest/validation/src/test/java/contribution/namespace/AttributeNameSpaceMissingTestCase.java
index ab0afc6f65..dd38802bbe 100644
--- a/java/sca/itest/validation/src/test/java/contribution/namespace/AttributeNameSpaceMissingTestCase.java
+++ b/java/sca/itest/validation/src/test/java/contribution/namespace/AttributeNameSpaceMissingTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class AttributeNameSpaceMissingTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("AttributeNameSpaceMissing", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java b/java/sca/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java
index b01ec2a254..d83a4bfed9 100644
--- a/java/sca/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java
+++ b/java/sca/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class AttributeURIMissingTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getProblems().get(2);
+ Problem problem = monitor.getProblems().get(0);
assertNotNull(problem);
assertEquals("AttributeURIMissing", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/contribution/xml/AttributeCompositeMissingTestCase.java b/java/sca/itest/validation/src/test/java/contribution/xml/AttributeCompositeMissingTestCase.java
index 32c1a8b3a8..b64de39c80 100644
--- a/java/sca/itest/validation/src/test/java/contribution/xml/AttributeCompositeMissingTestCase.java
+++ b/java/sca/itest/validation/src/test/java/contribution/xml/AttributeCompositeMissingTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class AttributeCompositeMissingTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("AttributeCompositeMissing", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/domain/CustomCompositeBuilder.java b/java/sca/itest/validation/src/test/java/domain/CustomCompositeBuilder.java
index 65814470a4..6fd5c04671 100644
--- a/java/sca/itest/validation/src/test/java/domain/CustomCompositeBuilder.java
+++ b/java/sca/itest/validation/src/test/java/domain/CustomCompositeBuilder.java
@@ -35,9 +35,9 @@ import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
+import org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingConfigurationBuilderImpl;
import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory;
import org.apache.tuscany.sca.contribution.processor.DefaultValidationSchemaExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
@@ -50,10 +50,11 @@ import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.ModuleActivator;
import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.definitions.Definitions;
import org.apache.tuscany.sca.implementation.node.NodeImplementationFactory;
import org.apache.tuscany.sca.implementation.node.builder.impl.NodeCompositeBuilderImpl;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
@@ -62,24 +63,24 @@ import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
import org.apache.tuscany.sca.workspace.Workspace;
import org.apache.tuscany.sca.workspace.WorkspaceFactory;
-import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilder;
import org.apache.tuscany.sca.workspace.builder.impl.ContributionDependencyBuilderImpl;
public class CustomCompositeBuilder {
private URLArtifactProcessor<Contribution> contributionProcessor;
private ModelResolverExtensionPoint modelResolvers;
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
private WorkspaceFactory workspaceFactory;
private AssemblyFactory assemblyFactory;
private XMLOutputFactory outputFactory;
private StAXArtifactProcessor<Object> xmlProcessor;
- private ContributionDependencyBuilder contributionDependencyBuilder;
+ private ContributionBuilder contributionDependencyBuilder;
private CompositeBuilder domainCompositeBuilder;
private CompositeBuilder nodeCompositeBuilder;
private NodeImplementationFactory nodeFactory;
//private AtomBindingFactory atomBindingFactory;
private static Workspace workspace;
- private List<SCADefinitions> policyDefinitions;
+ private List<Definitions> policyDefinitions;
private Monitor monitor;
private CustomCompositeBuilder() {
@@ -112,7 +113,7 @@ public class CustomCompositeBuilder {
}
// Get XML input/output factories
- modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
@@ -140,16 +141,17 @@ public class CustomCompositeBuilder {
modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
// Create a contribution dependency builder
- contributionDependencyBuilder = new ContributionDependencyBuilderImpl(monitor);
+ contributionDependencyBuilder = new ContributionDependencyBuilderImpl(null);
// Create a composite builder
SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
InterfaceContractMapper contractMapper = utilities.getUtility(InterfaceContractMapper.class);
- domainCompositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper, monitor);
+ domainCompositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper);
// Create a node composite builder
- nodeCompositeBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, contractMapper, null, monitor);
+ CompositeBuilder bindingConfigurationBuilder = new CompositeBindingConfigurationBuilderImpl(assemblyFactory, scaBindingFactory, contractMapper);
+ nodeCompositeBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, contractMapper, bindingConfigurationBuilder);
}
public void loadContribution(String compositeURL, String sourceURI, String sourceURL) throws Exception {
@@ -168,20 +170,17 @@ public class CustomCompositeBuilder {
workspace.getContributions().add(storeContribution);
// Build the contribution dependencies
- Map<Contribution, List<Contribution>> contributionDependencies = new HashMap<Contribution, List<Contribution>>();
Set<Contribution> resolved = new HashSet<Contribution>();
for (Contribution contribution: workspace.getContributions()) {
- List<Contribution> dependencies = contributionDependencyBuilder.buildContributionDependencies(contribution, workspace);
+ contributionDependencyBuilder.build(contribution, workspace, monitor);
// Resolve contributions
- for (Contribution dependency: dependencies) {
+ for (Contribution dependency: contribution.getDependencies()) {
if (!resolved.contains(dependency)) {
resolved.add(dependency);
contributionProcessor.resolve(dependency, workspace.getModelResolver());
}
}
-
- contributionDependencies.put(contribution, dependencies);
}
// Create a composite model for the domain
@@ -210,7 +209,7 @@ public class CustomCompositeBuilder {
domainComposite.getIncludes().addAll(workspace.getDeployables());
// Build the domain composite and wire the components included in it
- domainCompositeBuilder.build(domainComposite);
+ domainCompositeBuilder.build(domainComposite, null, monitor);
}
public void readContribution(String compositeURL, String sourceURI, String sourceURL) throws Exception {
diff --git a/java/sca/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java
index 9d97e3611a..690fb97a31 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class AttributeUnrecognizedNamespaceTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("AttributeUnrecognizedNamespace", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java
index 80c15dc444..a768535fde 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class AttributeWithoutNamespaceTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("AttributeWithoutNamespace", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java
index 81e8aecfeb..64d41bdb48 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class BPELProcessNotFoundTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("BPELProcessNotFound", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java
index fb0c525aea..585bd62027 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class CannotResolveWSDLReferenceTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("CannotResolveWSDLReference", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java
index 445629457e..aab3529fba 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class MyRolePartnerRoleNullTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("MyRolePartnerRoleNull", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java
index 00b904ae65..4c3226f4c8 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java
@@ -21,7 +21,7 @@ package impl.bpel;
import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.monitor.Problem;
import domain.CustomCompositeBuilder;
@@ -49,10 +49,19 @@ public class PartnerLinkHasBothAttrTestCase extends TestCase {
//nothing to do
}
+ private static boolean isMessageLogged(Monitor monitor, String messageId) {
+ for (Problem problem : monitor.getProblems()){
+ if (problem.getMessageId().equals(messageId)){
+ return true;
+ }
+ }
+ return false;
+ }
+
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- assertTrue(((DefaultLoggingMonitorImpl)monitor).isMessageLogged("PartnerLinkHasBothAttr"));
- /*Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ assertTrue(isMessageLogged(monitor, "PartnerLinkHasBothAttr"));
+ /*Problem problem = monitor.getLastLoggedProblem();
assertNotNull(problem);
assertEquals("PartnerLinkHasBothAttr", problem.getMessageId());*/
}
diff --git a/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java
index b7a4ee6fef..b9c0b68f7e 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class PartnerLinkNoMatchingTypeTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("PartnerLinkNoMatchingType", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java
index 32d3211f36..fc32e96b52 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java
@@ -21,7 +21,7 @@ package impl.bpel;
import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.monitor.Problem;
import domain.CustomCompositeBuilder;
@@ -49,10 +49,19 @@ public class PartnerLinkTypeNoRolesTestCase extends TestCase {
//nothing to do
}
+ private static boolean isMessageLogged(Monitor monitor, String messageId) {
+ for (Problem problem : monitor.getProblems()){
+ if (problem.getMessageId().equals(messageId)){
+ return true;
+ }
+ }
+ return false;
+ }
+
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- assertTrue(((DefaultLoggingMonitorImpl)monitor).isMessageLogged("PartnerLinkTypeNoRoles"));
- /*Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ assertTrue(isMessageLogged(monitor, "PartnerLinkTypeNoRoles"));
+ /*Problem problem = monitor.getLastLoggedProblem();
assertNotNull(problem);
assertEquals("PartnerLinkTypeNoRoles", problem.getMessageId());*/
diff --git a/java/sca/itest/validation/src/test/java/impl/ejb/EJBLinkAttributeMissingTestCase.java b/java/sca/itest/validation/src/test/java/impl/ejb/EJBLinkAttributeMissingTestCase.java
index b31451c433..4b367f85ef 100644
--- a/java/sca/itest/validation/src/test/java/impl/ejb/EJBLinkAttributeMissingTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/ejb/EJBLinkAttributeMissingTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class EJBLinkAttributeMissingTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("EJBLinkAttributeMissing", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java b/java/sca/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java
index 3a7745722a..969690acaf 100644
--- a/java/sca/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class ClassNotFoundExceptionTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("ClassNotFoundException", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java b/java/sca/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java
index 59fc3ce79c..eef964e274 100644
--- a/java/sca/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class ContributionResolveExceptionTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
diff --git a/java/sca/itest/validation/src/test/java/impl/osgi/CouldNotLocateOSGiBundleTestCase.java b/java/sca/itest/validation/src/test/java/impl/osgi/CouldNotLocateOSGiBundleTestCase.java
deleted file mode 100644
index 6f54ad140c..0000000000
--- a/java/sca/itest/validation/src/test/java/impl/osgi/CouldNotLocateOSGiBundleTestCase.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package impl.osgi;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.osgi.runtime.OSGiRuntime;
-
-import domain.CustomCompositeBuilder;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class CouldNotLocateOSGiBundleTestCase extends TestCase {
-
- private CustomCompositeBuilder customDomain;
-
- @Override
- protected void setUp() throws Exception
- {
- //OSGiTestBundles.createBundle("src/main/resources/impl/osgi/MissingComponentTypeFile/OSGiTestService.jar", OSGiTestInterface.class, OSGiTestImpl.class);
-
- customDomain = CustomCompositeBuilder.getInstance();
- try {
- customDomain.loadContribution("src/main/resources/impl/osgi/CouldNotLocateOSGiBundle/osgitest.composite",
- "TestContribution", "src/main/resources/impl/osgi/CouldNotLocateOSGiBundle/");
- } catch (Exception ex){
- //throw ex;
- }
- }
-
- @Override
- protected void tearDown() throws Exception {
- //nothing to do
- OSGiRuntime.stop();
- }
-
- public void testCalculator() {
- Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("CouldNotLocateOSGiBundle", problem.getMessageId());
- }
-}
diff --git a/java/sca/itest/validation/src/test/java/impl/osgi/MissingComponentTypeFileTestCase.java b/java/sca/itest/validation/src/test/java/impl/osgi/MissingComponentTypeFileTestCase.java
deleted file mode 100644
index 3d75fa8ccc..0000000000
--- a/java/sca/itest/validation/src/test/java/impl/osgi/MissingComponentTypeFileTestCase.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package impl.osgi;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.osgi.runtime.OSGiRuntime;
-
-import domain.CustomCompositeBuilder;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class MissingComponentTypeFileTestCase extends TestCase {
-
- private CustomCompositeBuilder customDomain;
-
- @Override
- protected void setUp() throws Exception
- {
- OSGiTestBundles.createBundle("src/main/resources/impl/osgi/MissingComponentTypeFile/OSGiTestService.jar", OSGiTestInterface.class, OSGiTestImpl.class);
-
- customDomain = CustomCompositeBuilder.getInstance();
- try {
- customDomain.loadContribution("src/main/resources/impl/osgi/MissingComponentTypeFile/osgitest.composite",
- "TestContribution", "src/main/resources/impl/osgi/MissingComponentTypeFile/");
- } catch (Exception ex){
- //throw ex;
- }
- }
-
- @Override
- protected void tearDown() throws Exception {
- //nothing to do
- OSGiRuntime.stop();
- }
-
- public void testCalculator() {
- Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("MissingComponentTypeFile", problem.getMessageId());
- }
-}
diff --git a/java/sca/itest/validation/src/test/java/impl/osgi/OSGiTestBundles.java b/java/sca/itest/validation/src/test/java/impl/osgi/OSGiTestBundles.java
deleted file mode 100644
index 398c028dd8..0000000000
--- a/java/sca/itest/validation/src/test/java/impl/osgi/OSGiTestBundles.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package impl.osgi;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.net.URL;
-import java.util.jar.JarOutputStream;
-import java.util.jar.Manifest;
-import java.util.zip.ZipEntry;
-
-
-/**
- *
- * Utility class to create OSGi bundles
- *
- * @version $Rev$ $Date$
- */
-public class OSGiTestBundles {
-
- public static void createBundle(String jarName,
- Class<?> interfaceClass, Class<?> implClass) throws Exception {
-
- ByteArrayOutputStream out = new ByteArrayOutputStream();
-
- String EOL = System.getProperty("line.separator");
-
- String packageName = interfaceClass.getPackage().getName();
- String bundleName = interfaceClass.getName();
-
- String manifestStr = "Manifest-Version: 1.0" + EOL
- + "Bundle-ManifestVersion: 2" + EOL + "Bundle-Name: "
- + bundleName + EOL + "Bundle-SymbolicName: " + bundleName + EOL
- + "Bundle-Version: " + "1.0.0" + EOL
- + "Bundle-Localization: plugin" + EOL;
-
- StringBuilder manifestBuf = new StringBuilder();
- manifestBuf.append(manifestStr);
- manifestBuf.append("Export-Package: " + packageName + EOL);
- manifestBuf.append("Import-Package: org.osgi.framework" + EOL);
- manifestBuf.append("Bundle-Activator: " + implClass.getName() + EOL);
-
- ByteArrayInputStream manifestStream = new ByteArrayInputStream(manifestBuf.toString().getBytes());
- Manifest manifest = new Manifest();
- manifest.read(manifestStream);
-
-
- JarOutputStream jarOut = new JarOutputStream(out, manifest);
-
- String interfaceClassName = interfaceClass.getName().replaceAll("\\.",
- "/")
- + ".class";
-
- URL url = interfaceClass.getClassLoader().getResource(
- interfaceClassName);
- String path = url.getPath();
-
- ZipEntry ze = new ZipEntry(interfaceClassName);
-
- jarOut.putNextEntry(ze);
- FileInputStream file = new FileInputStream(path);
- byte[] fileContents = new byte[file.available()];
- file.read(fileContents);
- jarOut.write(fileContents);
-
- String implClassName = implClass.getName().replaceAll("\\.",
- "/")
- + ".class";
-
- url = implClass.getClassLoader().getResource(implClassName);
- path = url.getPath();
-
- ze = new ZipEntry(implClassName);
-
- jarOut.putNextEntry(ze);
- file = new FileInputStream(path);
- fileContents = new byte[file.available()];
- file.read(fileContents);
- jarOut.write(fileContents);
-
- file.close();
-
- jarOut.close();
- out.close();
-
- FileOutputStream fileOut = new FileOutputStream(jarName);
- fileOut.write(out.toByteArray());
- fileOut.close();
-
-
- }
-}
diff --git a/java/sca/itest/validation/src/test/java/impl/osgi/PropertyShouldSpecifySRTestCase.java b/java/sca/itest/validation/src/test/java/impl/osgi/PropertyShouldSpecifySRTestCase.java
deleted file mode 100644
index 117a94337a..0000000000
--- a/java/sca/itest/validation/src/test/java/impl/osgi/PropertyShouldSpecifySRTestCase.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package impl.osgi;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.osgi.runtime.OSGiRuntime;
-
-import domain.CustomCompositeBuilder;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class PropertyShouldSpecifySRTestCase extends TestCase {
-
- private CustomCompositeBuilder customDomain;
-
- @Override
- protected void setUp() throws Exception
- {
- OSGiTestBundles.createBundle("src/main/resources/impl/osgi/PropertyShouldSpecifySR/OSGiTestService.jar", OSGiTestInterface.class, OSGiTestImpl.class);
-
- customDomain = CustomCompositeBuilder.getInstance();
- try {
- customDomain.loadContribution("src/main/resources/impl/osgi/PropertyShouldSpecifySR/osgitest.composite",
- "TestContribution", "src/main/resources/impl/osgi/PropertyShouldSpecifySR/");
- } catch (Exception ex){
- //throw ex;
- }
- }
-
- @Override
- protected void tearDown() throws Exception {
- //nothing to do
- OSGiRuntime.stop();
- }
-
- public void testCalculator() {
- Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("PropertyShouldSpecifySR", problem.getMessageId());
- }
-}
diff --git a/java/sca/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java b/java/sca/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java
index 14ba8e992e..c2fd7b3410 100644
--- a/java/sca/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java
@@ -23,7 +23,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -51,7 +50,7 @@ public class CouldNotResolveLocationTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
Assert.assertNotNull(problem);
Assert.assertEquals("CouldNotResolveLocation", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java b/java/sca/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java
index 461895f824..c6a58d2b88 100644
--- a/java/sca/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class LocationAttributeMissingTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("LocationAttributeMissing", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java b/java/sca/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java
index 9b7dbef3dd..ff0b2f3589 100644
--- a/java/sca/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java
@@ -21,7 +21,7 @@ package impl.spring;
import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.monitor.Problem;
import domain.CustomCompositeBuilder;
@@ -48,10 +48,19 @@ public class ContributionResolveExceptionTestCase extends TestCase {
protected void tearDown() throws Exception {
//node.stop();
}
+
+ private static boolean isMessageLogged(Monitor monitor, String messageId) {
+ for (Problem problem : monitor.getProblems()){
+ if (problem.getMessageId().equals(messageId)){
+ return true;
+ }
+ }
+ return false;
+ }
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- assertTrue(((DefaultLoggingMonitorImpl)monitor).isMessageLogged("ContributionResolveException"));
+ assertTrue(isMessageLogged(monitor, "ContributionResolveException"));
//assertEquals("ContributionResolveException", problem.getMessageId());
}
}
diff --git a/java/sca/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java b/java/sca/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java
index cd38b53f66..7b445960f1 100644
--- a/java/sca/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class LocationAttributeMissingTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("LocationAttributeMissing", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java b/java/sca/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java
index 83550ae58d..6b4521cdc9 100644
--- a/java/sca/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class UnableToResolveComponentTypeTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
//assertNotNull(problem);
//assertEquals("UnableToResolveComponentType", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java b/java/sca/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java
index d098bb4bf8..f46e9e4035 100644
--- a/java/sca/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java
@@ -23,7 +23,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -51,7 +50,7 @@ public class CouldNotResolveLocationTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
Assert.assertNotNull(problem);
Assert.assertEquals("CouldNotResolveLocation", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java b/java/sca/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java
index 2f85d8ed4a..ed95bcdcf0 100644
--- a/java/sca/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class LocationAttributeMissingTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("LocationAttributeMissing", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java b/java/sca/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java
index f90fc3b83f..bd5a6d9601 100644
--- a/java/sca/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class CouldNotLocateFileTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("CouldNotLocateFile", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java b/java/sca/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java
index 01450a8836..390eeb7e95 100644
--- a/java/sca/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java
+++ b/java/sca/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class LocationAttributeMissingTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("LocationAttributeMissing", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/interfacejava/xml/ClassNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/interfacejava/xml/ClassNotFoundTestCase.java
index a03e056298..e2bee4d2ac 100644
--- a/java/sca/itest/validation/src/test/java/interfacejava/xml/ClassNotFoundTestCase.java
+++ b/java/sca/itest/validation/src/test/java/interfacejava/xml/ClassNotFoundTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class ClassNotFoundTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("ClassNotFoundException", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/interfacejava/xml/ContributionResolveExceptionTestCase.java b/java/sca/itest/validation/src/test/java/interfacejava/xml/ContributionResolveExceptionTestCase.java
index e0524f57b7..3b567da717 100644
--- a/java/sca/itest/validation/src/test/java/interfacejava/xml/ContributionResolveExceptionTestCase.java
+++ b/java/sca/itest/validation/src/test/java/interfacejava/xml/ContributionResolveExceptionTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class ContributionResolveExceptionTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
//assertNotNull(problem);
//assertEquals("ContributionResolveException", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java b/java/sca/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java
index e212477c61..fc03bc25eb 100644
--- a/java/sca/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java
+++ b/java/sca/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class InvalidWSDLInterfaceAttrTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("InvalidWSDLInterfaceAttr", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java b/java/sca/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java
index df2a2671df..d41d72585f 100644
--- a/java/sca/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java
+++ b/java/sca/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class WsdlInterfaceDoesNotMatchTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("WsdlInterfaceDoesNotMatch", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/policy/xml/AlwaysProvidedIntentNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/policy/xml/AlwaysProvidedIntentNotFoundTestCase.java
index 361e2f2bfb..2d4bb3d499 100644
--- a/java/sca/itest/validation/src/test/java/policy/xml/AlwaysProvidedIntentNotFoundTestCase.java
+++ b/java/sca/itest/validation/src/test/java/policy/xml/AlwaysProvidedIntentNotFoundTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class AlwaysProvidedIntentNotFoundTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("AlwaysProvidedIntentNotFound", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/policy/xml/ErrorInPolicyIntentDefinitionTestCase.java b/java/sca/itest/validation/src/test/java/policy/xml/ErrorInPolicyIntentDefinitionTestCase.java
index a85dc334f4..5b5bfe7b37 100644
--- a/java/sca/itest/validation/src/test/java/policy/xml/ErrorInPolicyIntentDefinitionTestCase.java
+++ b/java/sca/itest/validation/src/test/java/policy/xml/ErrorInPolicyIntentDefinitionTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class ErrorInPolicyIntentDefinitionTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("ErrorInPolicyIntentDefinition", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/policy/xml/IntentNotSpecifiedTestCase.java b/java/sca/itest/validation/src/test/java/policy/xml/IntentNotSpecifiedTestCase.java
index 3f98757ce5..8ef3cacc4e 100644
--- a/java/sca/itest/validation/src/test/java/policy/xml/IntentNotSpecifiedTestCase.java
+++ b/java/sca/itest/validation/src/test/java/policy/xml/IntentNotSpecifiedTestCase.java
@@ -21,7 +21,7 @@ package policy.xml;
import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.monitor.Problem;
import domain.CustomCompositeBuilder;
@@ -49,10 +49,19 @@ public class IntentNotSpecifiedTestCase extends TestCase {
//node.stop();
}
+ private static boolean isMessageLogged(Monitor monitor, String messageId) {
+ for (Problem problem : monitor.getProblems()){
+ if (problem.getMessageId().equals(messageId)){
+ return true;
+ }
+ }
+ return false;
+ }
+
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- assertTrue(((DefaultLoggingMonitorImpl)monitor).isMessageLogged("IntentNotSpecified"));
- /*Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ assertTrue(isMessageLogged(monitor, "IntentNotSpecified"));
+ /*Problem problem = monitor.getLastLoggedProblem();
assertNotNull(problem);
assertEquals("IntentNotSpecified", problem.getMessageId());*/
}
diff --git a/java/sca/itest/validation/src/test/java/policy/xml/MayProvideIntentNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/policy/xml/MayProvideIntentNotFoundTestCase.java
index 3b8d075165..38d59196dd 100644
--- a/java/sca/itest/validation/src/test/java/policy/xml/MayProvideIntentNotFoundTestCase.java
+++ b/java/sca/itest/validation/src/test/java/policy/xml/MayProvideIntentNotFoundTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class MayProvideIntentNotFoundTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("MayProvideIntentNotFound", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/policy/xml/RequiredAttributeMissingTestCase.java b/java/sca/itest/validation/src/test/java/policy/xml/RequiredAttributeMissingTestCase.java
index bcf1f82392..9671f9c983 100644
--- a/java/sca/itest/validation/src/test/java/policy/xml/RequiredAttributeMissingTestCase.java
+++ b/java/sca/itest/validation/src/test/java/policy/xml/RequiredAttributeMissingTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class RequiredAttributeMissingTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("RequiredAttributeMissing", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/policy/xml/UnableToMapPoliciesTestCase.java b/java/sca/itest/validation/src/test/java/policy/xml/UnableToMapPoliciesTestCase.java
index 5683d54e64..c2ede5cd41 100644
--- a/java/sca/itest/validation/src/test/java/policy/xml/UnableToMapPoliciesTestCase.java
+++ b/java/sca/itest/validation/src/test/java/policy/xml/UnableToMapPoliciesTestCase.java
@@ -20,8 +20,7 @@ package policy.xml;
import junit.framework.TestCase;
-import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
+import org.junit.Ignore;
import org.junit.Ignore;
import domain.CustomCompositeBuilder;
@@ -56,9 +55,9 @@ public class UnableToMapPoliciesTestCase extends TestCase {
//elements...
/*
Monitor monitor = customDomain.getMonitorInstance();
- assertTrue(((DefaultLoggingMonitorImpl)monitor).isMessageLogged("UnableToMapPolicies"));
+ assertTrue(monitor.isMessageLogged("UnableToMapPolicies"));
*/
- /*Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ /*Problem problem = monitor.getLastLoggedProblem();
assertNotNull(problem);
assertEquals("UnableToMapPolicies", problem.getMessageId());*/
}
diff --git a/java/sca/itest/validation/src/test/java/policy/xml/UnrecognizedIntentAttachPointTypeTestCase.java b/java/sca/itest/validation/src/test/java/policy/xml/UnrecognizedIntentAttachPointTypeTestCase.java
index eec39d711e..08c27ee011 100644
--- a/java/sca/itest/validation/src/test/java/policy/xml/UnrecognizedIntentAttachPointTypeTestCase.java
+++ b/java/sca/itest/validation/src/test/java/policy/xml/UnrecognizedIntentAttachPointTypeTestCase.java
@@ -22,7 +22,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class UnrecognizedIntentAttachPointTypeTestCase extends TestCase {
public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("UnrecognizedIntentAttachPointType", problem.getMessageId());
diff --git a/java/sca/itest/ws-void-args-return/pom.xml b/java/sca/itest/ws-void-args-return/pom.xml
index b3f3fe5982..5b5f00aac1 100644
--- a/java/sca/itest/ws-void-args-return/pom.xml
+++ b/java/sca/itest/ws-void-args-return/pom.xml
@@ -51,7 +51,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>