You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2022/03/08 22:16:47 UTC

[GitHub] [fineract] vidakovic commented on pull request #2127: FINERACT-849: Switch from OpenJPA to EclipseLink

vidakovic commented on pull request #2127:
URL: https://github.com/apache/fineract/pull/2127#issuecomment-1062273465


   @galovics  ... just some remarks (no show stoppers):
   
   - removing "-Werror" is ok given the major benefit of using EclipseLink; maybe someone else can figure this out later... or we just relax a bit here (this flag is really harsh)
   - not sure if I understand the need for "DatabaseSelectingPersistenceUnitPostProcessor"... I understand that it's used to select the database dialect, but isn't this already provided by EclipseLink?
   - same with "EntityScanningPersistenceUnitPostProcessor"
   - ... maybe I found my own answer to those 2 classes: could be replaced by using spring boot JPA starter package with auto configuration; alright, maybe for later in a separate PR; all good
   - all the "saveAndFlush", ok, check
   - we could make the persistence unit configuration a bit more convenient (read: configurable via env vars... especially the cache stuff might be a candidate for that or logging):
   ```
   @Configuration
   public class EclipseLinkJpaConfiguration extends JpaBaseConfiguration {
   
       @Override
       protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
           return new EclipseLinkJpaVendorAdapter();
       }
   
       @Override
       protected Map<String, Object> getVendorProperties() {
           HashMap<String, Object> map = new HashMap<>();
           map.put(PersistenceUnitProperties.WEAVING, true);
           map.put(PersistenceUnitProperties.DDL_GENERATION, "drop-and-create-tables");
           map.put("eclipselink.persistence-context.close-on-commit", "true");
           map.put("eclipselink.cache.shared.default", "false");
           map.put("eclipselink.logging.level.sql", "FINE");
           map.put("eclipselink.logging.parameters", "true");
           return map;
       }
   
       //...
   }
   ```
   ... and instead of the hard coded values we could add application.properties/env vars


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org