summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/testing/itest/lifecycle/src/main
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleReferenceBindingProvider.java8
-rw-r--r--sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleServiceBindingProvider.java8
-rw-r--r--sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImpl.java8
-rw-r--r--sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/helloworld/StatusImpl.java4
-rw-r--r--sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleProvider.java4
-rw-r--r--sca-java-2.x/trunk/testing/itest/lifecycle/src/main/resources/lifecycle.composite2
6 files changed, 23 insertions, 11 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleReferenceBindingProvider.java b/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleReferenceBindingProvider.java
index 5709de7747..5c2ca0bf77 100644
--- a/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleReferenceBindingProvider.java
+++ b/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleReferenceBindingProvider.java
@@ -22,6 +22,8 @@ package binding.lifecycle;
import helloworld.StatusImpl;
import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.assembly.impl.EndpointImpl;
+import org.apache.tuscany.sca.assembly.impl.EndpointReferenceImpl;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.invocation.Invoker;
@@ -41,11 +43,13 @@ public class LifecycleReferenceBindingProvider implements ReferenceBindingProvid
}
public void start() {
- StatusImpl.statusString += "Reference binding start ";
+ StatusImpl.appendStatus("Reference binding start",
+ ((EndpointReferenceImpl)endpoint).toStringWithoutHash());
}
public void stop() {
- StatusImpl.statusString += "Reference binding stop ";
+ StatusImpl.appendStatus("Reference binding stop",
+ ((EndpointReferenceImpl)endpoint).toStringWithoutHash());
}
public InterfaceContract getBindingInterfaceContract() {
diff --git a/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleServiceBindingProvider.java b/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleServiceBindingProvider.java
index 0f62e13aed..158aa27201 100644
--- a/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleServiceBindingProvider.java
+++ b/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleServiceBindingProvider.java
@@ -20,6 +20,8 @@
package binding.lifecycle;
import helloworld.StatusImpl;
+
+import org.apache.tuscany.sca.assembly.impl.EndpointImpl;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.provider.ServiceBindingProvider;
import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
@@ -34,11 +36,13 @@ public class LifecycleServiceBindingProvider implements ServiceBindingProvider {
}
public void start() {
- StatusImpl.statusString += "Service binding start ";
+ StatusImpl.appendStatus("Service binding start",
+ ((EndpointImpl)endpoint).toStringWithoutHash());
}
public void stop() {
- StatusImpl.statusString += "Service binding stop ";
+ StatusImpl.appendStatus("Service binding stop",
+ ((EndpointImpl)endpoint).toStringWithoutHash());
}
public InterfaceContract getBindingInterfaceContract() {
diff --git a/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImpl.java b/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImpl.java
index 9328b53bac..d8a56eacde 100644
--- a/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImpl.java
+++ b/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImpl.java
@@ -39,22 +39,22 @@ public class HelloworldClientImpl implements Helloworld {
@Init
public void initialize() throws Exception{
if (throwTestExceptionOnInit) {
- StatusImpl.statusString += "Exception on init ";
+ StatusImpl.appendStatus("Exception on init", "HelloworldClientImpl");
throw new Exception("Exception on init");
}
- StatusImpl.statusString += "HelloworldClientImpl init ";
+ StatusImpl.appendStatus("Init", "HelloworldClientImpl");
System.out.println(">>>>>> " + sayHello("init"));
}
@Destroy
public void destroy() throws Exception{
if (throwTestExceptionOnDestroy) {
- StatusImpl.statusString += "Exception on destroy ";
+ StatusImpl.appendStatus("Exception on destroy", "HelloworldClientImpl");
throw new Exception("Exception on destroy");
}
- StatusImpl.statusString += "HelloworldClientImpl destroy ";
+ StatusImpl.appendStatus("Destroy", "HelloworldClientImpl");
}
public String sayHello(String name) throws Exception {
diff --git a/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/helloworld/StatusImpl.java b/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/helloworld/StatusImpl.java
index a18633ca74..2932da1554 100644
--- a/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/helloworld/StatusImpl.java
+++ b/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/helloworld/StatusImpl.java
@@ -22,5 +22,9 @@ package helloworld;
public class StatusImpl {
public static String statusString = "";
+
+ public static void appendStatus(String event, String location){
+ statusString += event + " - " + location + "\n";
+ }
}
diff --git a/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleProvider.java b/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleProvider.java
index c06346d8d3..f1e303882f 100644
--- a/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleProvider.java
+++ b/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleProvider.java
@@ -56,11 +56,11 @@ class LifecycleProvider implements ImplementationProvider {
}
public void start() {
- StatusImpl.statusString += "Implementation start ";
+ StatusImpl.appendStatus("Implementation start", comp.getName());
}
public void stop() {
- StatusImpl.statusString += "Implementation stop ";
+ StatusImpl.appendStatus("Implementation stop", comp.getName());
}
public boolean supportsOneWayInvocation() {
diff --git a/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/resources/lifecycle.composite b/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/resources/lifecycle.composite
index 2c48cc4bf9..c959749c03 100644
--- a/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/resources/lifecycle.composite
+++ b/sca-java-2.x/trunk/testing/itest/lifecycle/src/main/resources/lifecycle.composite
@@ -20,7 +20,7 @@
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
targetNamespace="http://sample"
- name="domainview">
+ name="lifecycle">
<component name="HelloworldService1">
<implementation.java class="helloworld.HelloworldServiceImpl"/>