summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/policy-transaction-runtime/src
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-03-03 23:21:03 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-03-03 23:21:03 +0000
commit2e5c11e6a90f8979819c19fa497e7f39f0c9af0c (patch)
tree63cd8d72d8ca20041b2773eb1b4f8e162ebee10e /sca-java-2.x/trunk/modules/policy-transaction-runtime/src
parent7f14619404be75c5ed935c18a609403ffd9b0d6d (diff)
TUSCANY-3477 - Tyding up defaults in the transaction invoker to address test case failures with IncompatibleIntentException
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@918763 13f79535-47bb-0310-9956-ffa450edef68
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: