In WildFly, a test like quarkus/ContextEndpoint.java at ba1872440834519a88b88f5b7de04f645965a2cb · quarkusio/quarkus · GitHub can not work. The issue is that if the code in the async block happens after main thread exits the interceptor (which it may well do), the transaction status is not as expected. Ondrej's suggestion is to allow my MP Reactive feature pack to add the same mechanisms that Quarkus uses to work. I believe the intent is to leave 'raw' WildFly untouched unless the MP Reactive feature pack is installed.
mmusgrov ok, fine. All my initial attempts for migration are linked as references to github in the initial post. That's if you want to check the code.
I'm fine to take care of it. I plan to work on it next week (this week I'm struggling with preparation of presentation for DevConf.cz). I talked with Kabir and he is ok with this time schedule.
I will let you know if I find some trouble.
By coupling I meant the fact that's hard to separate the async functionality from the non-async functionality. The asynchronous code requires code we already have in the JTA interceptor currently and the JTA interceptor needs to call back to the async callbacks to find out the results and work with it. The code is coupled in way that's pretty difficult to separate the asynchronous functionality and strip it away in form of some interface that could be implemented in the WildFly MicroProfile integration code.
Does it make sense?
My proposal is to have all the functionality in the JTA interceptor, which I think is reasonable as it's all about transactions - in sync or async mode.
I'm not sure what you mean by "something in WFLY code". Do you mean something specific? Then just point me to the place. I will try to investigate on it then.
The outcome of the further discussion of this topic on different channels the result was done that we could implement the asynchronous functionality in the Narayana code base. If there is some code that will be adopted from the Quarkus code base it has to be correctly licensed (the possible option is to create a separate class which will be licensed with apache license v2).
I started to work on the solution and there could be seen the PR here:
(the PR is mostly done but some adjustments still have to be done as the integration with WildFly has to work and the context propagation tests have to pass)