Using transactions with asynchronous tasks

Using asynchronous tasks could be already a challenge: what if you need to add some spice and add a transaction to it?

Usually, a transaction means something like code blocking. Isn't it awkward to combine two opposing concepts? Well, it's not! They can work together nicely, as this recipe will show you.

Get Java EE 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.