bug #8842
openCdmServiceRequestExecutor is not stateleass and neither thread save nor access synchronized
50%
Description
CdmServiceRequestExecutor uses the field
private RemoteInvocation currentRemoteInvocation;
to remember the invocation between the step of serializing the request data and of sending the request in the method AbstractHttpInvokerRequestExecutor.executeRequest(HttpInvokerClientConfiguration config, RemoteInvocation invocation)
This method is final and thus can not be overwritten. As workaround currentRemoteInvocation
has apparently been introduced in CdmServiceRequestExecutor
. This fields, however, causes this bean to be no longer stateless.
Concurrent access from multiple threads can cause things to get mixed up. As consequence cdm entities could be stored in the wrong "session"-cache and the application could miss finding entities in the cache causing them to be loaded twice. This second situation can be a root cause for MultipleRepresentationExceptions
Related issues
Updated by Andreas Kohlbecker over 4 years ago
- Description updated (diff)
- Status changed from New to In Progress
Updated by Andreas Kohlbecker over 4 years ago
- Status changed from In Progress to Resolved
- Assignee changed from Andreas Kohlbecker to Andreas Müller
- % Done changed from 0 to 50
The taxeditor|1c21abc1 most probably removed at least two potential root causes for MultipleRepresentation problems:
problems caused by the satefulness during concurrent asynchronous access to the CdmServiceRequestExecutor as described above.
CdmServiceRequestExecutor.java#77
UpdateResult result = (UpdateResult)rir.getValue();
if(result.isOk()){
cdmEntitySessionManager.load(result, true);
}
The UpdateResult
was put into the cache instead of result.getCdmEntity(), so the entity has been omitted since UpdateResult
is not handled in the CacheLoader
Updated by Andreas Kohlbecker over 4 years ago
- Related to bug #8843: Revise term caching added
Updated by Andreas Kohlbecker over 4 years ago
- Related to bug #8812: Connection losses in taxeditor HTTP invoker (RemoteAccessException: Could not access HTTP invoker remote service at ...) added