-
Bug
-
Resolution: Unresolved
-
Critical
-
1.1.14.Final, 2.0.0.Final
The wildfly-http-client library is used to allow EJB client applications to invoke EJB client-related operations using the HTTP protocol. These EJB client invocations may be invoked while in transaction scope, and the invocation thread uses various thread-local Contextuals to manage the transactions, such as LocalTransactionContext, RemoteTransactionContext and ContextTransactionManager.
The wildfly-http-client library makes use of an HttpTargetContext to send the invocation from client to server and the HttpTargetContext in turn delegates to an HttpConnectionPool to establish the connection, setup the invocation request and send the invocation along this connection. Rather than performing the sending of the request using the calling thread, the HttpConnectionPool method getConnection() will add a connection request to a queue and then call runPending() to run any pending requests held in the queue. The connection for processing the pending request is obtained via UndertowClient.getInstance().connect(lambda expression involving connection, ...) and once obtained, the lambda expression is called. This lambda performs all of the request setup processing, including checking for transactions and marshalling any transaction state into the payload of the request.
At present, the thread used to call UndertowClient.getInstance().connect() and the thread used to call the lambda expression are not the same, and the Contextuals associated with the calling thread have been dropped before they can be used to process the request.
For example:
14:40:27,602 INFO [org.wildfly.httpclient.common] (main) HttpConnectionPool: thread before call to UndertowClient.getInstance().connect() = Thread[main,5,main] 14:40:27,610 INFO [org.wildfly.httpclient.common] (XNIO-1 I/O-1) HttpConnectionPool: thread after call to UndertowClient.getInstance().connect() = Thread[XNIO-1 I/O-1,5,main]
This mechanism needs to be fixed so that if thread transfers do occur, the contexts are carried over from the old thread to the new thread.
- blocks
-
WFLY-17986 Support external EJB client access to EAP deployments on OpenShift over http
- Coding In Progress
-
WEJBHTTP-81 EJB/HTTP does not correctly delegate load balancing nor fail-over to a load balancer
- Pull Request Sent
- causes
-
WFLY-17595 Transient failure in testsuite/integration/multinode
- Closed
- relates to
-
JBEAP-25242 [GSS](7.4.z) WEJBHTTP-103 - wildfly-http-client does not preserve transaction Contextuals on invocation
- New
-
JBEAP-25631 [GSS](8.0.z) WEJBHTTP-103 - wildfly-http-client does not preserve transaction Contextuals on invocation
- New