[
https://issues.jboss.org/browse/WFCORE-972?page=com.atlassian.jira.plugin...
]
Harald Pehl commented on WFCORE-972:
------------------------------------
That's right, the main driver is to support multiple independent management requests
in parallel. The main use case is when we execute r-r-d operations. For complex UIs like
Infinispan or ActiveMQ we need to read dozens of resource descriptions upfront.
Right now we partition these r-r-d operations into composite operations with a max of
three operations per composite (to reduce the payload). Then we execute and parse the
composite operations one after the other. That's necessary to unambiguously map the
operation to the result. If we had an unique identifier (correlation id) on the request /
response, we would be able to send the operations in parallel and use the correlation id
for the mapping.
Provide a way to correlate HTTP management requests
---------------------------------------------------
Key: WFCORE-972
URL:
https://issues.jboss.org/browse/WFCORE-972
Project: WildFly Core
Issue Type: Enhancement
Components: Domain Management
Reporter: Heiko Braun
Assignee: Heiko Braun
Fix For: 3.0.0.Beta1
{noformat}
public class CorrelationHandler implements HttpHandler {
private static final HttpString HEADER = new HttpString("X-CORR-ID");
private final HttpHandler next;
public CorrelationHandler(HttpHandler next) {
this.next = next;
}
@Override
public void handleRequest(HttpServerExchange exchange) throws Exception {
String corr = exchange.getRequestHeaders().getFirst(HEADER);
if(corr != null) {
exchange.getResponseHeaders().put(HEADER, corr);
}
next.handleRequest(exchange);
}
}
{noformat}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)