Skip to content

Commit

Permalink
Fix outdated (and maybe wrong) jpa related properties (eclipse-hawkbi…
Browse files Browse the repository at this point in the history
…t#1702)

Signed-off-by: Marinov Avgustin <[email protected]>
  • Loading branch information
avgustinmm authored Apr 9, 2024
1 parent 85e2299 commit 718c738
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,23 +482,21 @@ public EclipseLinkJpaDialect getJpaDialect() {

@Override
protected Map<String, Object> getVendorProperties() {

final Map<String, Object> properties = new HashMap<>(7);
// Turn off dynamic weaving to disable LTW lookup in static weaving mode
properties.put(PersistenceUnitProperties.WEAVING, "false");
// needed for reports
properties.put(PersistenceUnitProperties.ALLOW_NATIVE_SQL_QUERIES, "true");
// flyway
properties.put(PersistenceUnitProperties.DDL_GENERATION, "none");
// Embeed into hawkBit logging
// Embed into hawkBit logging
properties.put(PersistenceUnitProperties.LOGGING_LOGGER, "JavaLogger");
// Ensure that we flush only at the end of the transaction
properties.put(PersistenceUnitProperties.PERSISTENCE_CONTEXT_FLUSH_MODE, "COMMIT");
// Enable batch writing
properties.put(PersistenceUnitProperties.BATCH_WRITING, "JDBC");
// Batch size
properties.put(PersistenceUnitProperties.BATCH_WRITING_SIZE, "500");

return properties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ spring.jpa.show-sql=false
# (see details: https://github.com/eclipse-ee4j/eclipselink/issues/1393)
spring.datasource.url=jdbc:h2:mem:testdb;MODE=LEGACY;
# Logging
spring.datasource.eclipselink.logging.logger=JavaLogger
spring.jpa.properties.eclipselink.logging.level=off
# Cluster aware
spring.datasource.eclipselink.query-results-cache=false
spring.datasource.eclipselink.cache.shared.default=false
spring.jpa.properties.eclipselink.query-results-cache=false
spring.jpa.properties.eclipselink.cache.shared.default=false
# Flyway DDL
spring.flyway.enabled=true
spring.flyway.init-on-migrate=true
spring.flyway.clean-disabled=true
spring.flyway.sql-migration-suffixes=${spring.jpa.database}.sql
spring.flyway.table=schema_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
logging.level.root=ERROR
logging.level.org.eclipse.hawkbit.repository.test.matcher.EventVerifier=ERROR
logging.level.org.eclipse.persistence=ERROR
spring.datasource.eclipselink.logging.logger=JavaLogger
spring.jpa.properties.eclipselink.logging.level=FINE
spring.jpa.properties.eclipselink.logging.level.sql=FINE
spring.jpa.properties.eclipselink.logging.parameters=true
Expand Down

0 comments on commit 718c738

Please sign in to comment.