summaryrefslogtreecommitdiffstats
path: root/sandbox/dougsleite/guardian-model/src/main/java/org/apache/tuscany/sca/guardian/GuardianMemberImpl.java
diff options
context:
space:
mode:
authordougsleite <dougsleite@13f79535-47bb-0310-9956-ffa450edef68>2009-07-06 12:41:48 +0000
committerdougsleite <dougsleite@13f79535-47bb-0310-9956-ffa450edef68>2009-07-06 12:41:48 +0000
commitf1dfba0cc9000fcf881267608c02b683dcf2f796 (patch)
treed7653d10bdec1ab0b404fd92092f8c8aef0c3b01 /sandbox/dougsleite/guardian-model/src/main/java/org/apache/tuscany/sca/guardian/GuardianMemberImpl.java
parent6c479469ad629e1bc05e1e2eb4114941b4405f5a (diff)
- Restructured the iTest package
- Added a new test scenario: Primary-Backup with N backups - Added a new tag element (<affected_participants>) into the recovery rules XML file git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@791465 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/dougsleite/guardian-model/src/main/java/org/apache/tuscany/sca/guardian/GuardianMemberImpl.java')
-rw-r--r--sandbox/dougsleite/guardian-model/src/main/java/org/apache/tuscany/sca/guardian/GuardianMemberImpl.java22
1 files changed, 8 insertions, 14 deletions
diff --git a/sandbox/dougsleite/guardian-model/src/main/java/org/apache/tuscany/sca/guardian/GuardianMemberImpl.java b/sandbox/dougsleite/guardian-model/src/main/java/org/apache/tuscany/sca/guardian/GuardianMemberImpl.java
index 220325b1f0..682a6d8e1b 100644
--- a/sandbox/dougsleite/guardian-model/src/main/java/org/apache/tuscany/sca/guardian/GuardianMemberImpl.java
+++ b/sandbox/dougsleite/guardian-model/src/main/java/org/apache/tuscany/sca/guardian/GuardianMemberImpl.java
@@ -28,7 +28,9 @@ import org.osoa.sca.annotations.Init;
import org.osoa.sca.annotations.Reference;
import org.osoa.sca.annotations.Scope;
import org.osoa.sca.annotations.Destroy;
+import org.osoa.sca.annotations.Service;
+@Service(GuardianMember.class)
@Scope("COMPOSITE")
public class GuardianMemberImpl implements GuardianMember {
@@ -89,7 +91,7 @@ public class GuardianMemberImpl implements GuardianMember {
//Adapt to allow a regular expression
//If participantList is null then signal to ALL participants
- public void gthrow(GlobalException ex, List<String> participantList) {
+ public void gthrow(GlobalExceptionInterface ex, List<String> participantList) {
//1)Block the participant until raise an exception
if (!service.isBlocked()) {
service.block();
@@ -101,14 +103,6 @@ public class GuardianMemberImpl implements GuardianMember {
guardianGroup.gthrow(ex, participantList);
}
-
- //if (participantList == null || !participantList.contains(getParticipantIdentifier())) {
-// if (getParticipantIdentifier().equals(ex.getSignalingParticipant())) {
-// //2A)Call the gthrow of the GuardianGroup - communicate with other guardian members
-// System.out.println("HERE AT " + getParticipantIdentifier());
-// guardianGroup.gthrow(ex, participantList);
-// }
-
}
@@ -126,7 +120,7 @@ public class GuardianMemberImpl implements GuardianMember {
}
- public boolean propagate(GlobalException ex) {
+ public boolean propagate(GlobalExceptionInterface ex) {
//1)Compares the current context with the exception's target context
return !getCurrentContext().equals(ex.getTargetContext());
}
@@ -197,13 +191,13 @@ public class GuardianMemberImpl implements GuardianMember {
public String getParticipantIdentifier() {
//1) Return the participant identifier -> context list dot separated
- StringBuffer id = new StringBuffer();
+ StringBuffer participantIdentifier = new StringBuffer();
//id.append(this.id + "." + Context.INIT_CONTEXT.getName());
- id.append(this.id);
+ participantIdentifier.append(this.id);
for (int i = 0; i < contextList.size(); i++) {
- id.append("." + contextList.get(i).getName());
+ participantIdentifier.append("." + contextList.get(i).getName());
}
- return id.toString();
+ return participantIdentifier.toString();
}
public void setUniqueParticipantID(int id) {