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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to