Skip to content

Commit

Permalink
Merge pull request #26 from rgdoliveira/sync_main
Browse files Browse the repository at this point in the history
Sync main branch with Apache main branch
  • Loading branch information
rgdoliveira authored Mar 12, 2024
2 parents 1fc3420 + 638ab98 commit bc498e6
Show file tree
Hide file tree
Showing 539 changed files with 3,555 additions and 18,869 deletions.
2 changes: 1 addition & 1 deletion .ci/jenkins/tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<logback.configration>logback-test.xml</logback.configration>
<logdir>${project.build.directory}/log</logdir>
<test.loglevel>ERROR</test.loglevel>
<log.logback.version>1.2.9</log.logback.version>
<log.logback.version>1.2.13</log.logback.version>
<log.slf4j.version>1.7.25</log.slf4j.version>
<build-helper-maven-plugin.version>1.9.1</build-helper-maven-plugin.version>

Expand Down
4 changes: 2 additions & 2 deletions addons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ your `pom.xml` file:

<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-process-management</artifactId>
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-process-management</artifactId>
<version>${kogito.version}</version>
</dependency>
</dependencies>
Expand Down
12 changes: 6 additions & 6 deletions addons/common/events/mongodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ To enable this events publisher, make sure dependency for the Kafka events publi
2. Springboot:
```xml
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-springboot-events-kafka</artifactId>
<groupId>org.kie</groupId>
<artifactId>kie-addons-springboot-events-kafka</artifactId>
</dependency>
```

Expand All @@ -31,15 +31,15 @@ Then add the following dependency for MongoDB events publisher:
1. Quarkus:
```xml
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-events-mongodb</artifactId>
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-events-mongodb</artifactId>
</dependency>
```

2. Springboot:
```xml
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-springboot-events-mongodb</artifactId>
<groupId>org.kie</groupId>
<artifactId>kie-addons-springboot-events-mongodb</artifactId>
</dependency>
```

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
*/
package org.kie.kogito.persistence.jdbc.correlation;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Optional;

import javax.sql.DataSource;
Expand All @@ -29,25 +27,13 @@
import org.kie.kogito.correlation.CorrelationInstance;
import org.kie.kogito.correlation.CorrelationService;
import org.kie.kogito.event.correlation.MD5CorrelationEncoder;
import org.kie.kogito.persistence.jdbc.DatabaseType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class JDBCCorrelationService implements CorrelationService {

private static final Logger LOGGER = LoggerFactory.getLogger(JDBCCorrelationService.class);
public class PostgreSQLCorrelationService implements CorrelationService {

private PostgreSQLCorrelationRepository repository;
private CorrelationEncoder correlationEncoder;

public JDBCCorrelationService(DataSource dataSource) {
try (Connection connection = dataSource.getConnection()) {
if (!DatabaseType.POSTGRES.equals(DatabaseType.getDataBaseType(connection))) {
throw new IllegalArgumentException("Only PostgreSQL is supported for correlation");
}
} catch (SQLException e) {
LOGGER.error("Error getting connection for {}", dataSource);
}
public PostgreSQLCorrelationService(DataSource dataSource) {
this.repository = new PostgreSQLCorrelationRepository(dataSource);
this.correlationEncoder = new MD5CorrelationEncoder();
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- To be used with kogito-addons-quarkus-persistence-jdbc for Quarkus or kogito-addons-springboot-persistence-jdbc for SpringBoot
-- To be used with kie-addons-quarkus-persistence-jdbc for Quarkus or kie-addons-springboot-persistence-jdbc for SpringBoot
CREATE TABLE process_instances
(
id character(36) NOT NULL,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.kie.kogito.correlation.CompositeCorrelation;
import org.kie.kogito.correlation.CorrelationInstance;
import org.kie.kogito.correlation.SimpleCorrelation;
import org.kie.kogito.persistence.jdbc.correlation.JDBCCorrelationService;
import org.kie.kogito.persistence.jdbc.correlation.PostgreSQLCorrelationService;
import org.kie.kogito.testcontainers.KogitoPostgreSqlContainer;
import org.postgresql.ds.PGSimpleDataSource;
import org.testcontainers.containers.JdbcDatabaseContainer;
Expand All @@ -42,15 +42,15 @@ public class JDBCCorrelationServiceIT {
@Container
private static final KogitoPostgreSqlContainer PG_CONTAINER = new KogitoPostgreSqlContainer();
private static PGSimpleDataSource dataSource;
private static JDBCCorrelationService correlationService;
private static PostgreSQLCorrelationService correlationService;

@BeforeAll
public static void setUp() {
dataSource = new PGSimpleDataSource();
dataSource.setUrl(PG_CONTAINER.getJdbcUrl());
dataSource.setUser(PG_CONTAINER.getUsername());
dataSource.setPassword(PG_CONTAINER.getPassword());
correlationService = new JDBCCorrelationService(dataSource);
correlationService = new PostgreSQLCorrelationService(dataSource);
//create table
// DDLRunner.init(new GenericRepository(dataSource), true);
initMigration(PG_CONTAINER, "postgresql");
Expand Down
Loading

0 comments on commit bc498e6

Please sign in to comment.