Skip to content

Commit

Permalink
chore(merge): release-10.2.0 into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
bonita-ci committed Sep 25, 2024
2 parents 16bf420 + 25191b7 commit 402c407
Show file tree
Hide file tree
Showing 18 changed files with 75 additions and 525 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ protected SessionFactory buildSessionFactory(LocalSessionFactoryBuilder sfb) {
//register type before loading mappings/entities, type should be present before loading JPA entities
switch (vendor) {
case ORACLE:
sfb.setInterceptor(new OracleInterceptor());
// FIXME set following interceptor when this module is configured to run on all DB
// sfb.setInterceptor(new OracleInterceptor());
break;
case MYSQL:
case OTHER:
sfb.registerTypeOverride(XMLType.INSTANCE);
break;
case SQLSERVER:
sfb.setInterceptor(new SQLServerInterceptor());
// FIXME set following interceptor when this module is configured to run on all DB
// sfb.setInterceptor(new SQLServerInterceptor());
sfb.registerTypeOverride(XMLType.INSTANCE);
break;
case POSTGRES:
Expand All @@ -43,7 +45,7 @@ protected SessionFactory buildSessionFactory(LocalSessionFactoryBuilder sfb) {
sfb.registerTypeOverride(new PostgresMaterializedClobType());
sfb.registerTypeOverride(PostgresXMLType.INSTANCE);
break;
};
}
return super.buildSessionFactory(sfb);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ public Properties getTenantProperties(long tenantId) throws IOException {
Properties allProperties = getPlatformProperties();
Properties tenantProperties = mergeProperties(getPropertiesFromClassPath(
"bonita-tenant-community.properties",
"bonita-tenant-private-community.properties",
"bonita-tenant-sp.properties",
"bonita-tenant-sp-cluster.properties"), getConfigurationService().getTenantEngineConf(tenantId));
allProperties.putAll(tenantProperties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,12 @@ serverApi=org.bonitasoft.engine.api.impl.ServerAPIImpl

# Hibernate Dialects
h2.hibernate.dialect=org.hibernate.dialect.H2Dialect
mysql.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
oracle.hibernate.dialect=org.hibernate.dialect.Oracle12cDialect
postgres.hibernate.dialect=org.hibernate.dialect.PostgreSQL10Dialect
sqlserver.hibernate.dialect=org.bonitasoft.engine.persistence.SQLServerExtendedDialect

# Hibernate Interceptors for journal (runtime database)
h2.hibernate.journal.interceptor=
mysql.hibernate.journal.interceptor=
oracle.hibernate.journal.interceptor=org.bonitasoft.engine.persistence.OracleInterceptor
postgres.hibernate.journal.interceptor=org.bonitasoft.engine.persistence.PostgresInterceptor
sqlserver.hibernate.journal.interceptor=org.bonitasoft.engine.persistence.SQLServerInterceptor

# Quartz properties
h2.quartz.connection.jobstoredriver=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
mysql.quartz.connection.jobstoredriver=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
oracle.quartz.connection.jobstoredriver=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
postgres.quartz.connection.jobstoredriver=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
sqlserver.quartz.connection.jobstoredriver=org.quartz.impl.jdbcjobstore.MSSQLDelegate

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,4 @@ dependencies {
testImplementation("com.pholser:junit-quickcheck-generators:${Deps.junitQuickCheck}")
}

// run:
// ./gradlew mysqlDatabaseTest
// ./gradlew oracleDatabaseTest
// ./gradlew sqlserverDatabaseTest
// ./gradlew postgresDatabaseTest
// to run tests on specific docker DB:
databaseIntegrationTest { includes '**/*Test.class' }

This file was deleted.

This file was deleted.

This file was deleted.

17 changes: 9 additions & 8 deletions services/bonita-persistence/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
plugins {
id('bonita-tests')
}

dependencies {
api libs.commonsLang
api project(':services:bonita-events')
Expand All @@ -14,16 +10,21 @@ dependencies {
api project(':services:bonita-commons')
api project(':services:bonita-lock')
api libs.slf4jApi

implementation(libs.javaxAnnotations)
testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"

compileOnly libs.jakartaTransactionApi

annotationProcessor libs.lombok
compileOnly libs.lombok
testRuntimeOnly libs.logback

testImplementation "junit:junit:${Deps.junit4Version}"
testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}"
testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}"
testImplementation "com.github.stefanbirkner:system-rules:${Deps.systemRulesVersion}"

testAnnotationProcessor libs.lombok
testImplementation libs.lombok

testRuntimeOnly libs.logback
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.util.HashSet;
import java.util.Set;

import lombok.Getter;
import org.hibernate.boot.SessionFactoryBuilder;
import org.hibernate.boot.spi.MetadataImplementor;
import org.hibernate.boot.spi.SessionFactoryBuilderFactory;
Expand All @@ -27,6 +28,7 @@ public class CustomDataTypesRegistration implements SessionFactoryBuilderFactory

private static final org.slf4j.Logger logger = LoggerFactory.getLogger(CustomDataTypesRegistration.class);

@Getter
private static Set<BasicType> typeOverrides = new HashSet<>();

@Override
Expand All @@ -39,11 +41,8 @@ public SessionFactoryBuilder getSessionFactoryBuilder(final MetadataImplementor
return defaultBuilder;
}

static void addTypeOverride(BasicType type) {
public static void addTypeOverride(BasicType type) {
typeOverrides.add(type);
}

public static Set<BasicType> getTypeOverrides() {
return typeOverrides;
}
}
Loading

0 comments on commit 402c407

Please sign in to comment.