vidakovic commented on code in PR #4281:
URL: https://github.com/apache/fineract/pull/4281#discussion_r2041196316
##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/BatchRequestContextHolder.java:
##########
@@ -18,25 +18,20 @@
*/
package org.apache.fineract.infrastructure.core.domain;
+import com.alibaba.ttl.TransmittableThreadLocal;
import java.util.Map;
import java.util.Optional;
-import org.springframework.core.NamedThreadLocal;
import org.springframework.transaction.TransactionStatus;
public final class BatchRequestContextHolder {
private BatchRequestContextHolder() {}
- private static final ThreadLocal<Map<String, Object>> batchAttributes =
new NamedThreadLocal<>("batchAttributes");
+ private static final ThreadLocal<Map<String, Object>> batchAttributes =
new TransmittableThreadLocal<>();
- private static final ThreadLocal<Optional<TransactionStatus>>
batchTransaction = new NamedThreadLocal<>("batchTransaction") {
+ private static final ThreadLocal<Optional<TransactionStatus>>
batchTransaction = TransmittableThreadLocal.withInitial(Optional::empty);
Review Comment:
Later for the "async" mode yes. See my previous comments for the dependency.
I think I'll remove for now to keep this as small as possible and avoid
distractions. But later we have to find a solution here if we want to use the
full performance potential.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]