[WFCORE-2096] Decouple OperationContext-specific ServiceTarget/Builder from the con… #2008
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…text when op execution is done
https://issues.jboss.org/browse/WFCORE-2096
Goal is to prevent refs to the ServiceTarget provided by OperationContext holding refs to all the state associated with the op after the op is done, since it is valid for users of the OC to hold a ref to the target after the op is done.
Makes the ServiceTarget and ServiceBuilder impl classes created by OperationContextImpl static so they hold no OperationContext.this ref. Provides a temporary ref to the OCI logic to their constructors, and clears that ref when op execution is done, turning the objects after that point into simple wrappers around the normal MSC classes.