-
Feature Request
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
False
-
NEW
-
NEW
-
Undefined
-
---
-
---
-
-
2020 Week 40-42 (from Sep 28), 2020 Week 43-45 (from Okt 19), 2020 Week 46-48 (from Nov 9)
Add the possibility in spring to add named beans during object marshalling strategy resolution so:
<marshalling-strategy> <resolver>mvel</resolver> <identifier>new org.drools.persistence.jpa.marshaller.JPAPlaceholderResolverStrategy(auditEntityManager) </identifier> <parameters/> </marshalling-strategy>
auditEntityManager is defined as:
@Bean(name = "auditEntityManager") @ConditionalOnMissingBean(name = "auditEntityManager") public LocalContainerEntityManagerFactoryBean entityManagerFactory(@Qualifier("jpaAuditDataSource") DataSource dataSource, JpaProperties jpaProperties) { return EntityManagerFactoryHelper.create(applicationContext, dataSource, jpaProperties, AUDIT_PERSISTENCE_UNIT_NAME, PERSISTENCE_XML_LOCATION); }
The auditEntityManager will become an implicit context param when resolving the the parameters during mvel evaluation.