Skip to content

Commit 9105cad

Browse files
committed
Update to Hibernate 6.4
Update to hibernate 6.4, in additon - remove hiberante.dialect property - update other dependencies - update databases
1 parent dd826d6 commit 9105cad

File tree

9 files changed

+22
-53
lines changed

9 files changed

+22
-53
lines changed

pom.xml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
<artifactId>maven-compiler-plugin</artifactId>
6363
<configuration>
6464
<release>11</release>
65+
<testRelease>17</testRelease>
6566
</configuration>
6667
</plugin>
6768
<plugin>
@@ -94,7 +95,7 @@
9495
<configuration>
9596
<links>
9697
<link>https://docs.oracle.com/javase/11/docs/api/</link>
97-
<link>https://docs.jboss.org/hibernate/orm/6.1/javadocs/</link>
98+
<link>https://docs.jboss.org/hibernate/orm/6.4/javadocs/</link>
9899
</links>
99100
</configuration>
100101
</plugin>
@@ -202,28 +203,28 @@
202203
<dependency>
203204
<groupId>org.junit</groupId>
204205
<artifactId>junit-bom</artifactId>
205-
<version>5.9.1</version>
206+
<version>5.10.1</version>
206207
<type>pom</type>
207208
<scope>import</scope>
208209
</dependency>
209210
<dependency>
210211
<groupId>org.springframework</groupId>
211212
<artifactId>spring-framework-bom</artifactId>
212-
<version>6.0.3</version>
213+
<version>6.1.3</version>
213214
<type>pom</type>
214215
<scope>import</scope>
215216
</dependency>
216217
<dependency>
217218
<groupId>com.oracle.database.jdbc</groupId>
218219
<artifactId>ojdbc-bom</artifactId>
219-
<version>21.8.0.0</version>
220+
<version>23.3.0.23.09</version>
220221
<type>pom</type>
221222
<scope>import</scope>
222223
</dependency>
223224
<dependency>
224225
<groupId>org.apache.logging.log4j</groupId>
225226
<artifactId>log4j-bom</artifactId>
226-
<version>2.19.0</version>
227+
<version>2.22.1</version>
227228
<type>pom</type>
228229
<scope>import</scope>
229230
</dependency>
@@ -269,37 +270,37 @@
269270
<dependency>
270271
<groupId>org.hsqldb</groupId>
271272
<artifactId>hsqldb</artifactId>
272-
<version>2.7.1</version>
273+
<version>2.7.2</version>
273274
<scope>test</scope>
274275
</dependency>
275276
<dependency>
276277
<groupId>org.postgresql</groupId>
277278
<artifactId>postgresql</artifactId>
278-
<version>42.5.1</version>
279+
<version>42.7.1</version>
279280
<scope>test</scope>
280281
</dependency>
281282
<dependency>
282283
<groupId>com.h2database</groupId>
283284
<artifactId>h2</artifactId>
284-
<version>2.1.214</version>
285+
<version>2.2.224</version>
285286
<scope>test</scope>
286287
</dependency>
287288
<dependency>
288289
<groupId>com.microsoft.sqlserver</groupId>
289290
<artifactId>mssql-jdbc</artifactId>
290-
<version>11.2.2.jre11</version>
291+
<version>12.4.2.jre11</version>
291292
<scope>test</scope>
292293
</dependency>
293294
<dependency>
294295
<groupId>org.firebirdsql.jdbc</groupId>
295296
<artifactId>jaybird</artifactId>
296-
<version>4.0.8.java11</version>
297+
<version>5.0.3.java11</version>
297298
<scope>test</scope>
298299
</dependency>
299300
<dependency>
300301
<groupId>org.mariadb.jdbc</groupId>
301302
<artifactId>mariadb-java-client</artifactId>
302-
<version>3.1.0</version>
303+
<version>3.3.2</version>
303304
<scope>test</scope>
304305
</dependency>
305306
<dependency>
@@ -310,7 +311,7 @@
310311
<dependency>
311312
<groupId>com.ibm.db2</groupId>
312313
<artifactId>jcc</artifactId>
313-
<version>11.5.8.0</version>
314+
<version>11.5.9.0</version>
314315
<scope>test</scope>
315316
</dependency>
316317

@@ -394,7 +395,7 @@
394395
<properties>
395396
<project.reporting.outputEncoding>utf-8</project.reporting.outputEncoding>
396397
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
397-
<hibernate.version>6.1.6.Final</hibernate.version>
398+
<hibernate.version>6.4.2.Final</hibernate.version>
398399
</properties>
399400

400401
</project>

src/main/java/com/github/marschall/hibernate/batchsequencegenerator/BatchSequenceGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ private IdentifierPool replenishIdentifierPool(SharedSessionContractImplementor
302302
try (PreparedStatement statement = coordinator.getStatementPreparer().prepareStatement(this.select)) {
303303
statement.setFetchSize(this.fetchSize);
304304
statement.setInt(1, this.fetchSize);
305-
try (ResultSet resultSet = coordinator.getResultSetReturn().extract(statement)) {
305+
try (ResultSet resultSet = coordinator.getResultSetReturn().extract(statement, this.select)) {
306306
while (resultSet.next()) {
307307
identifiers.add(this.identifierExtractor.extractIdentifier(resultSet));
308308
}

src/test/java/com/github/marschall/hibernate/batchsequencegenerator/configurations/OracleConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public DataSource dataSource() {
1919
oracle.jdbc.OracleDriver.isDebug();
2020
SingleConnectionDataSource dataSource = new SingleConnectionDataSource();
2121
dataSource.setSuppressClose(true);
22-
dataSource.setUrl("jdbc:oracle:thin:@localhost:1521/ORCLPDB1");
22+
dataSource.setUrl("jdbc:oracle:thin:@localhost:1521/FREEPDB1");
2323
dataSource.setUsername("jdbc");
2424
dataSource.setPassword("Cent-Quick-Space-Bath-8");
2525
Properties connectionProperties = new Properties();

src/test/resources/META-INF/persistence.xml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ParentEntity</class>
1111
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
1212

13-
<properties>
14-
<property name="hibernate.dialect" value="org.hibernate.dialect.DB2Dialect" />
15-
</properties>
1613
</persistence-unit>
1714

1815
<persistence-unit name="db2-batched">
@@ -22,7 +19,6 @@
2219
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
2320

2421
<properties>
25-
<property name="hibernate.dialect" value="org.hibernate.dialect.DB2Dialect" />
2622
<property name="hibernate.jdbc.batch_size" value="50" />
2723
<property name="hibernate.order_inserts" value="true" />
2824
<property name="hibernate.order_updates" value="true" />
@@ -36,9 +32,6 @@
3632
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ParentEntity</class>
3733
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
3834

39-
<properties>
40-
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
41-
</properties>
4235
</persistence-unit>
4336

4437
<persistence-unit name="hsql-batched">
@@ -48,7 +41,6 @@
4841
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
4942

5043
<properties>
51-
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
5244
<property name="hibernate.jdbc.batch_size" value="50" />
5345
<property name="hibernate.order_inserts" value="true" />
5446
<property name="hibernate.order_updates" value="true" />
@@ -62,9 +54,6 @@
6254
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ParentEntity</class>
6355
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
6456

65-
<properties>
66-
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
67-
</properties>
6857
</persistence-unit>
6958

7059
<persistence-unit name="h2-batched">
@@ -74,7 +63,6 @@
7463
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
7564

7665
<properties>
77-
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
7866
<property name="hibernate.jdbc.batch_size" value="50" />
7967
<property name="hibernate.order_inserts" value="true" />
8068
<property name="hibernate.order_updates" value="true" />
@@ -88,9 +76,6 @@
8876
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ParentEntity</class>
8977
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
9078

91-
<properties>
92-
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
93-
</properties>
9479
</persistence-unit>
9580

9681
<persistence-unit name="postgres-batched">
@@ -100,7 +85,6 @@
10085
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
10186

10287
<properties>
103-
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
10488
<property name="hibernate.jdbc.batch_size" value="50" />
10589
<property name="hibernate.order_inserts" value="true" />
10690
<property name="hibernate.order_updates" value="true" />
@@ -114,9 +98,6 @@
11498
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ParentEntity</class>
11599
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
116100

117-
<properties>
118-
<property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect" />
119-
</properties>
120101
</persistence-unit>
121102

122103
<persistence-unit name="sqlserver-batched">
@@ -126,7 +107,6 @@
126107
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
127108

128109
<properties>
129-
<property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect" />
130110
<property name="hibernate.jdbc.batch_size" value="50" />
131111
<property name="hibernate.order_inserts" value="true" />
132112
<property name="hibernate.order_updates" value="true" />
@@ -140,9 +120,6 @@
140120
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ParentEntity</class>
141121
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
142122

143-
<properties>
144-
<property name="hibernate.dialect" value="org.hibernate.community.dialect.FirebirdDialect" />
145-
</properties>
146123
</persistence-unit>
147124

148125
<persistence-unit name="firebird-batched">
@@ -152,7 +129,6 @@
152129
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
153130

154131
<properties>
155-
<property name="hibernate.dialect" value="org.hibernate.community.dialect.FirebirdDialect" />
156132
<property name="hibernate.jdbc.batch_size" value="50" />
157133
<property name="hibernate.order_inserts" value="true" />
158134
<property name="hibernate.order_updates" value="true" />
@@ -166,9 +142,6 @@
166142
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ParentEntity</class>
167143
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
168144

169-
<properties>
170-
<property name="hibernate.dialect" value="org.hibernate.dialect.MariaDBDialect" />
171-
</properties>
172145
</persistence-unit>
173146

174147
<persistence-unit name="maria-batched">
@@ -178,7 +151,6 @@
178151
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
179152

180153
<properties>
181-
<property name="hibernate.dialect" value="org.hibernate.dialect.MariaDBDialect" />
182154
<property name="hibernate.jdbc.batch_size" value="50" />
183155
<property name="hibernate.order_inserts" value="true" />
184156
<property name="hibernate.order_updates" value="true" />
@@ -192,9 +164,6 @@
192164
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ParentEntity</class>
193165
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
194166

195-
<properties>
196-
<property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect" />
197-
</properties>
198167
</persistence-unit>
199168

200169
<persistence-unit name="oracle-batched">
@@ -204,7 +173,6 @@
204173
<class>com.github.marschall.hibernate.batchsequencegenerators.entities.ChildEntity</class>
205174

206175
<properties>
207-
<property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect" />
208176
<property name="hibernate.jdbc.batch_size" value="50" />
209177
<property name="hibernate.order_inserts" value="true" />
210178
<property name="hibernate.order_updates" value="true" />
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

2-
ALTER SESSION SET CONTAINER = ORCLPDB1;
2+
ALTER SESSION SET CONTAINER = FREEPDB1;
33

44
CREATE USER jdbc IDENTIFIED BY "Cent-Quick-Space-Bath-8";

src/test/resources/oracle/02_permissions.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
ALTER SESSION SET CONTAINER = ORCLPDB1;
2+
ALTER SESSION SET CONTAINER = FREEPDB1;
33

44
GRANT CONNECT TO jdbc CONTAINER=CURRENT;
55
GRANT CREATE SESSION TO jdbc CONTAINER=CURRENT;

src/test/resources/run_mariadb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ docker run --name jdbc-mariadb \
1010
-p 3307:3306 \
1111
--mount type=tmpfs,destination=/var/lib/mysql \
1212
-v ${DIRECTORY}/mariadb:/docker-entrypoint-initdb.d \
13-
-d mariadb:10.6.10
13+
-d mariadb:11.2.2

src/test/resources/run_oracle.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
DIRECTORY=`dirname $0`
44
DIRECTORY=$(realpath $DIRECTORY)
55

6-
docker run --name jdbc-oracle \
6+
docker run --name jdbc-oracle-23 \
77
-p 1521:1521 -p 5500:5500 \
88
--shm-size=1g \
99
-v ${DIRECTORY}/oracle:/docker-entrypoint-initdb.d/setup \
10-
-d oracle/database:19.3.0-se2
10+
-d oracle/database:23.3.0-free

src/test/resources/run_postgres.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ docker run --name jdbc-postgres \
55
-e POSTGRES_USER=$USER \
66
-p 5432:5432 \
77
--mount type=tmpfs,destination=/var/lib/postgresql/data \
8-
-d postgres:14.5-alpine
8+
-d postgres:16.1-alpine

0 commit comments

Comments
 (0)