Transaction Policy: Stage2
igarashitm Jul 20, 2012 11:09 PMNow I'm struggling with https://issues.jboss.org/browse/SWITCHYARD-748
Code
What I have done so far
- Added 3 more intents according to SCA Policy spec - "managedTransaction.global", "managedTransaction.local" and "noManagedTransaction"
- Added 1 original intent - "propagatesOrCreatesTransaction"
- Clarified the runtime-specific behavior (the behavior when policy is absent. see table below)
Transaction behavior
Interaction Policy | Implementation Policy | Transaction Provided | Result |
---|---|---|---|
<absent> | <any> | <any> | Propagates transaction if exists, otherwise does nothing |
propagatesTransaction | managedTransaction.global or <absent> | yes | Propagates transaction |
propagatesTransaction | managedTransaction.global or <absent> | no | Raise an error (unlike spec) |
propagatesTransaction | managedTransaction.local or noManagedTransaction | <any> | Raise an error |
propagatesOrCreatesTransaction | managedTransaction.global or <absent> | yes | Propagates transaction |
propagatesOrCreatesTransaction | managedTransaction.global or <absent> | no | Creates new transaction, and completes it after invocation |
propagatesOrCreatesTransaction | managedTransaction.local or noManagedTransaction | <any> | Raise an error |
suspendsTransaction | managedTransaction.global | yes | Suspends existing transaction and creates new one. After invocation, complete the transaction created, and then resume the original transaction |
suspendsTransaction | managedTransaction.global | no | Creates new transaction, and completes it after invocation |
suspendsTransaction | managedTransaction.local | yes | Suspends existing transaction and creates new one. After invocation, complete the transaction created, and then resume the original transaction |
suspendsTransaction | managedTransaction.local | no | Creates new transaction, and completes it after invocation |
suspendsTransaction | noManagedTransaction or <absent> | yes | Suspends existing transaction and resumes it after invocation |
suspendsTransaction | noManagedTransaction or <absent> | no | Does nothing |
What should be done
- In the case of managedTransaction.local, we need to guarantee that the service invocation doesn't propagate transaction to the outbound
- Implement reference interaction policy processing
- Create demo application
I'm looking forward to seeing your advice
Thanks,
Tomo