Skip to content

Commit

Permalink
1.8.3 fix access to autoCommitOverrideEbeanConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
magicprinc committed May 27, 2024
1 parent 0eeb09d commit 59898d8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
group = com.github.magicprinc

version = 1.8.2
version = 1.8.3

org.gradle.jvmargs = -Dfile.encoding=UTF-8 -XX:+UseParallelGC -Xms512m -Xmx1024m -Djava.net.preferIPv4Stack=true
systemProp.file.encoding = UTF-8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import io.ebean.datasource.DataSourceConfig;
import io.ebean.datasource.DataSourceFactory;
import io.ebean.datasource.DataSourcePool;
import lombok.Getter;
import lombok.Setter;

/**
HikariCP backed DataSourceFactory.
Expand All @@ -13,6 +15,13 @@
*/
public class HikariEbeanConnectionPoolFactory implements DataSourceFactory {

/**
By default, Ebean pool autoCommit == false.
It can be overridden in config or globally here (if not null).
*/
@Getter @Setter
static Boolean autoCommitOverrideEbeanConfig = null;

@Override
public DataSourcePool createPool (String name, DataSourceConfig config) {
return new HikariEbeanDataSourcePool(name, config, SmartConfig.asProperties());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.function.IntConsumer;
import java.util.function.LongConsumer;

import static com.github.magicprinc.hibean.HikariEbeanConnectionPoolFactory.autoCommitOverrideEbeanConfig;
import static com.github.magicprinc.hibean.SmartConfig.alias;
import static com.github.magicprinc.hibean.SmartConfig.normValue;
import static com.github.magicprinc.hibean.SmartConfig.trim;
Expand Down Expand Up @@ -55,11 +56,6 @@
*/
@Slf4j
class HikariEbeanDataSourcePool extends HikariEbeanDataSourceWrapper {
/**
By default, Ebean pool autoCommit == false.
It can be overridden in config or globally here (if not null).
*/
public static Boolean autoCommitOverrideEbeanConfig = null;

public HikariEbeanDataSourcePool (String callerPoolName, DataSourceConfig config, Map<String,String> avajeConfig) {
val cfg = SmartConfig.of(avajeConfig);// System.properties overwrite file.properties
Expand Down

0 comments on commit 59898d8

Please sign in to comment.