Jose Alberto Hernandez created FINERACT-2845:
------------------------------------------------
Summary: Auditing handler rebuilds its mapping metadata on every
command
Key: FINERACT-2845
URL: https://issues.apache.org/jira/browse/FINERACT-2845
Project: Apache Fineract
Issue Type: Improvement
Components: fineract-backoffice
Affects Versions: 1.15.0
Reporter: Jose Alberto Hernandez
```
h2. Background
{\{JpaAuditingHandlerRegistrar}} registers the \{{jpaAuditingHandler}} bean
with \{{setScope("prototype")}}. The
prototype scope was introduced in 2022 to fix a race condition:
\{{CustomAuditingHandler.markCreated}} and
{\{markModified}} call \{{setDateTimeProvider(...)}} on the handler before
delegating to the parent, so a shared
instance could have one thread overwrite another thread's provider.
Since the upgrade to Spring Boot 4.1 (Spring Data Commons 4.1.0) that scope has
become very expensive. The
{\{MappingAuditableBeanWrapperFactory(PersistentEntities)}} constructor now
eagerly iterates every persistent entity
to build the auditing metadata.
```
--
This message was sent by Atlassian Jira
(v8.20.10#820010)