Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-9407

Spring Boot - Multiple Data Sources and Pluggable Variable Persistence

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 7.46.0.Final
    • None
    • KieServer, SpringBoot
    • None
    • 2020 Week 40-42 (from Sep 28), 2020 Week 43-45 (from Okt 19), 2020 Week 46-48 (from Nov 9)

    Description

      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.

      Attachments

        Activity

          People

            elguardian@gmail.com Enrique González Martínez (Inactive)
            elguardian@gmail.com Enrique González Martínez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: