summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/policy-transaction-runtime/src
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/modules/policy-transaction-runtime/src')
-rw-r--r--sca-java-2.x/trunk/modules/policy-transaction-runtime/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/policy-transaction-runtime/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java b/sca-java-2.x/trunk/modules/policy-transaction-runtime/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java
index 0d72fa5520..f6e0e87ece 100644
--- a/sca-java-2.x/trunk/modules/policy-transaction-runtime/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java
+++ b/sca-java-2.x/trunk/modules/policy-transaction-runtime/src/main/java/org/apache/tuscany/sca/policy/transaction/runtime/TransactionInterceptor.java
@@ -76,15 +76,24 @@ public class TransactionInterceptor implements PhasedInterceptor {
if (msg.getOperation().isNonBlocking()) {
}
- TransactionIntent interactionIntent = TransactionIntent.propagatesTransacton;
+
+ // initialize default values
+ TransactionIntent interactionIntent = null; //TransactionIntent.propagatesTransacton;
+ TransactionIntent implementationIntent = TransactionIntent.managedTransactionGlobal;
+
if (interactionPolicy != null) {
if (interactionPolicy.getAction() == TransactionPolicy.Action.PROPAGATE) {
interactionIntent = TransactionIntent.propagatesTransacton;
+ } else if (interactionPolicy.getAction() == TransactionPolicy.Action.REQUIRE_NONE) {
+ interactionIntent = TransactionIntent.suspendsTransaction;
+ if(implementationPolicy == null) {
+ implementationIntent = TransactionIntent.noManagedTransaction;
+ }
} else {
interactionIntent = TransactionIntent.suspendsTransaction;
}
}
- TransactionIntent implementationIntent = TransactionIntent.managedTransactionGlobal;
+
if (implementationPolicy != null) {
switch (implementationPolicy.getAction()) {
case REQUIRE_GLOBAL: