summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x')
-rw-r--r--sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionImplementationPolicyProvider.java10
-rw-r--r--sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java2
-rw-r--r--sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionReferencePolicyProvider.java10
-rw-r--r--sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionServicePolicyProvider.java8
4 files changed, 15 insertions, 15 deletions
diff --git a/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionImplementationPolicyProvider.java b/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionImplementationPolicyProvider.java
index 845b1be6f5..b0d3351992 100644
--- a/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionImplementationPolicyProvider.java
+++ b/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionImplementationPolicyProvider.java
@@ -24,6 +24,7 @@ import java.util.List;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.invocation.Phase;
import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.policy.PolicyExpression;
import org.apache.tuscany.sca.policy.PolicySet;
import org.apache.tuscany.sca.policy.transaction.TransactionPolicy;
import org.apache.tuscany.sca.provider.BasePolicyProvider;
@@ -44,12 +45,11 @@ public class TransactionImplementationPolicyProvider extends BasePolicyProvider<
}
public PhasedInterceptor createInterceptor(Operation operation) {
-/* TODO - 2.x better way of doing this in 2.x */
+ /* TODO - 2.x better way of doing this in 2.x */
for (PolicySet policySet : policySets) {
- for (Object p : policySet.getPolicies()) {
- if (p instanceof TransactionPolicy) {
- TransactionInterceptor interceptor =
- new TransactionInterceptor(helper, false, (TransactionPolicy)p, null, getPhase());
+ for (PolicyExpression p : policySet.getPolicies()) {
+ if (p.getPolicy() instanceof TransactionPolicy) {
+ TransactionInterceptor interceptor = new TransactionInterceptor(helper, false, (TransactionPolicy)p, null, getPhase());
return interceptor;
}
}
diff --git a/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java b/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java
index 9488475b12..97782403e4 100644
--- a/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java
+++ b/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java
@@ -69,7 +69,7 @@ public class TransactionInterceptor implements PhasedInterceptor {
* @see org.apache.tuscany.sca.invocation.Invoker#invoke(org.apache.tuscany.sca.invocation.Message)
*/
public Message invoke(Message msg) {
- //logger.info("Executing TransactionInterceptor.invoke");
+ logger.info("Executing TransactionInterceptor.invoke");
TransactionalInvocation invocation = new TransactionalInvocation(next, msg);
Message result = null;
diff --git a/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionReferencePolicyProvider.java b/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionReferencePolicyProvider.java
index c6bf3f0c71..a053c765b9 100644
--- a/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionReferencePolicyProvider.java
+++ b/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionReferencePolicyProvider.java
@@ -25,6 +25,7 @@ import org.apache.tuscany.sca.assembly.EndpointReference;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.invocation.Phase;
import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.policy.PolicyExpression;
import org.apache.tuscany.sca.policy.PolicySet;
import org.apache.tuscany.sca.policy.transaction.TransactionPolicy;
import org.apache.tuscany.sca.provider.BasePolicyProvider;
@@ -43,12 +44,11 @@ public class TransactionReferencePolicyProvider extends BasePolicyProvider<Trans
}
public PhasedInterceptor createInterceptor(Operation operation) {
-/* TODO - 2.x better way of doing this in 2.x */
+ /* TODO - 2.x better way of doing this in 2.x */
for (PolicySet policySet : policySets) {
- for (Object p : policySet.getPolicies()) {
- if (p instanceof TransactionPolicy) {
- TransactionInterceptor interceptor =
- new TransactionInterceptor(helper, true, (TransactionPolicy)p, null,getPhase());
+ for (PolicyExpression p : policySet.getPolicies()) {
+ if (p.getPolicy() instanceof TransactionPolicy) {
+ TransactionInterceptor interceptor = new TransactionInterceptor(helper, true, (TransactionPolicy)p, null,getPhase());
return interceptor;
}
}
diff --git a/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionServicePolicyProvider.java b/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionServicePolicyProvider.java
index 8ba6ba7484..5c4039394a 100644
--- a/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionServicePolicyProvider.java
+++ b/sca-java-2.x/trunk/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionServicePolicyProvider.java
@@ -25,6 +25,7 @@ import org.apache.tuscany.sca.assembly.Endpoint;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.invocation.Phase;
import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.policy.PolicyExpression;
import org.apache.tuscany.sca.policy.PolicySet;
import org.apache.tuscany.sca.policy.transaction.TransactionPolicy;
import org.apache.tuscany.sca.provider.BasePolicyProvider;
@@ -44,10 +45,9 @@ public class TransactionServicePolicyProvider extends BasePolicyProvider<Transac
public PhasedInterceptor createInterceptor(Operation operation) {
for (PolicySet policySet : policySets) {
- for (Object p : policySet.getPolicies()) {
- if (p instanceof TransactionPolicy) {
- TransactionInterceptor interceptor =
- new TransactionInterceptor(helper, true, (TransactionPolicy)p, null, getPhase());
+ for (PolicyExpression p : policySet.getPolicies()) {
+ if (p.getPolicy() instanceof TransactionPolicy) {
+ TransactionInterceptor interceptor = new TransactionInterceptor(helper, true, (TransactionPolicy)p, null, getPhase());
return interceptor;
}
}