jakartaee / concurrency

Eclipse Project for Concurrency Utilities
https://projects.eclipse.org/projects/ee4j.cu
Other
66 stars 38 forks source link

Transaction context propagation #102

Open njr-11 opened 4 years ago

njr-11 commented 4 years ago

MicroProfile Context Propagation includes the ability to propagate JTA transactions to completion stage actions and executor tasks. Much of the capability is considered optional, acknowledging that some transaction managers will not have the ability to use a transaction across multiple threads, or to perform transactional operations simultaneously from multiple threads. MicroProfile documentation for this can be found here. Some of the scenarios could benefit from some better APIs from the transaction manager, so there could be some opportunity for collaboration with the JTA spec, if this is pursued.

One other difference is that MicroProfile treats transaction context the same as any other type of context, vs how Jakarta EE Concurrency uses an execution property to provide behavior that corresponds to MicroProfile's cleared or unchanged configuration at the executor level. I wouldn't consider this an obstacle, just something to remember to account for if work is done in this area.

hantsy commented 1 year ago

Spring uses https://github.com/micrometer-metrics/context-propagation to switch between different context.