Project

General

Profile

Actions

bug #8842

open

CdmServiceRequestExecutor is not stateleass and neither thread save nor access synchronized

Added by Andreas Kohlbecker over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Highest
Category:
taxeditor
Target version:
Start date:
Due date:
% Done:

50%

Estimated time:
Severity:
critical
Found in Version:

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

Related to EDIT - bug #8843: Revise term cachingNewKatja Luther

Actions
Related to EDIT - bug #8812: Connection losses in taxeditor HTTP invoker (RemoteAccessException: Could not access HTTP invoker remote service at ...)ResolvedAndreas Müller

Actions
Actions #1

Updated by Andreas Kohlbecker over 4 years ago

  • Description updated (diff)
Actions #2

Updated by Andreas Kohlbecker over 4 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
Actions #3

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:

  1. problems caused by the satefulness during concurrent asynchronous access to the CdmServiceRequestExecutor as described above.

  2. 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

Actions #4

Updated by Andreas Kohlbecker over 4 years ago

  • Related to bug #8843: Revise term caching added
Actions #5

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
Actions

Also available in: Atom PDF