Skip to content

Commit 177bda5

Browse files
committed
GH-9744: Remove deprecated LobHandler references
Fixes: #9744
1 parent 9962ee4 commit 177bda5

File tree

6 files changed

+10
-82
lines changed

6 files changed

+10
-82
lines changed

spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/config/JdbcMessageStoreParser.java

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,17 +30,17 @@
3030
* Parser for {@link JdbcMessageStore}.
3131
*
3232
* @author Dave Syer
33+
* @author Artem Bilan
34+
*
3335
* @since 2.0
3436
*/
3537
public class JdbcMessageStoreParser extends AbstractBeanDefinitionParser {
3638

3739
@Override
3840
protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
39-
4041
Object source = parserContext.extractSource(element);
4142

42-
BeanDefinitionBuilder builder = BeanDefinitionBuilder
43-
.genericBeanDefinition(JdbcMessageStore.class);
43+
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(JdbcMessageStore.class);
4444

4545
String dataSourceRef = element.getAttribute("data-source");
4646
String simpleJdbcOperationsRef = element.getAttribute("jdbc-operations");
@@ -53,18 +53,12 @@ protected AbstractBeanDefinition parseInternal(Element element, ParserContext pa
5353
+ "simple-jdbc-operations should be set for the JDBC message-store", source);
5454
}
5555

56-
if (refToDataSourceSet) {
57-
builder.addConstructorArgReference(dataSourceRef);
58-
}
59-
else {
60-
builder.addConstructorArgReference(simpleJdbcOperationsRef);
61-
}
56+
builder.addConstructorArgReference(refToDataSourceSet ? dataSourceRef : simpleJdbcOperationsRef);
6257

63-
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "lob-handler");
6458
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "serializer");
6559
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "deserializer");
66-
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "table-prefix", "tablePrefix");
67-
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "region", "region");
60+
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "table-prefix");
61+
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "region");
6862

6963
return builder.getBeanDefinition();
7064

spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/store/JdbcChannelMessageStore.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -51,7 +51,6 @@
5151
import org.springframework.jdbc.core.JdbcTemplate;
5252
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
5353
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
54-
import org.springframework.jdbc.support.lob.LobHandler;
5554
import org.springframework.jmx.export.annotation.ManagedAttribute;
5655
import org.springframework.jmx.export.annotation.ManagedMetric;
5756
import org.springframework.jmx.export.annotation.ManagedResource;
@@ -225,16 +224,6 @@ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
225224
this.jdbcTemplate = jdbcTemplate;
226225
}
227226

228-
/**
229-
* Override the {@link LobHandler} that is used to create and unpack large objects in SQL queries. The default is
230-
* fine for almost all platforms, but some Oracle drivers require a native implementation.
231-
* @param lobHandler a {@link LobHandler}
232-
* @deprecated since 6.4 (for removal) (with no replacement) in favor of plain JDBC driver support for byte arrays.
233-
*/
234-
@Deprecated(forRemoval = true, since = "6.4")
235-
public void setLobHandler(LobHandler lobHandler) {
236-
}
237-
238227
/**
239228
* Allow for passing in a custom {@link MessageRowMapper}. The {@link MessageRowMapper}
240229
* is used to convert the selected database row representing the persisted

spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/store/JdbcMessageStore.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
import org.springframework.jdbc.core.JdbcOperations;
5050
import org.springframework.jdbc.core.JdbcTemplate;
5151
import org.springframework.jdbc.core.SingleColumnRowMapper;
52-
import org.springframework.jdbc.support.lob.LobHandler;
5352
import org.springframework.jmx.export.annotation.ManagedAttribute;
5453
import org.springframework.lang.Nullable;
5554
import org.springframework.messaging.Message;
@@ -318,17 +317,6 @@ public void setRegion(String region) {
318317
this.region = region;
319318
}
320319

321-
/**
322-
* Override the {@link LobHandler} that is used to create and unpack large objects in SQL queries. The default is
323-
* fine for almost all platforms, but some Oracle drivers require a native implementation.
324-
* @param lobHandler a {@link LobHandler}
325-
* @deprecated since 6.4 (for removal) (with no replacement) in favor of plain JDBC driver support for byte arrays.
326-
*/
327-
@Deprecated(forRemoval = true, since = "6.4")
328-
public void setLobHandler(LobHandler lobHandler) {
329-
330-
}
331-
332320
/**
333321
* A converter for serializing messages to byte arrays for storage.
334322
* @param serializer the serializer to set

spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/store/channel/ChannelMessageStorePreparedStatementSetter.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2024 the original author or authors.
2+
* Copyright 2017-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@
2424
import org.springframework.core.serializer.support.SerializingConverter;
2525
import org.springframework.integration.IntegrationMessageHeaderAccessor;
2626
import org.springframework.integration.util.UUIDConverter;
27-
import org.springframework.jdbc.support.lob.LobHandler;
2827
import org.springframework.messaging.Message;
2928
import org.springframework.util.Assert;
3029

@@ -53,21 +52,6 @@ public class ChannelMessageStorePreparedStatementSetter {
5352

5453
private final SerializingConverter serializer;
5554

56-
/**
57-
* Instantiate a {@link ChannelMessageStorePreparedStatementSetter} with the provided
58-
* serializer and lobHandler, which both must not be null.
59-
* @param serializer the {@link SerializingConverter} to build {@code byte[]} from
60-
* the request message
61-
* @param lobHandler the {@link LobHandler} to store {@code byte[]} of the request
62-
* message to prepared statement
63-
* @deprecated since 6.4 (for removal) (if favor of {@link #ChannelMessageStorePreparedStatementSetter(SerializingConverter)})
64-
* with a plain JDBC driver support for byte arrays.
65-
*/
66-
@Deprecated(forRemoval = true, since = "6.4")
67-
public ChannelMessageStorePreparedStatementSetter(SerializingConverter serializer, LobHandler lobHandler) {
68-
this(serializer);
69-
}
70-
7155
/**
7256
* Instantiate a {@link ChannelMessageStorePreparedStatementSetter} with the provided
7357
* serializer and lobHandler, which both must not be null.

spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/store/channel/MessageRowMapper.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@
2121

2222
import org.springframework.integration.support.converter.AllowListDeserializingConverter;
2323
import org.springframework.jdbc.core.RowMapper;
24-
import org.springframework.jdbc.support.lob.LobHandler;
2524
import org.springframework.messaging.Message;
2625
import org.springframework.util.Assert;
2726

@@ -41,19 +40,6 @@ public class MessageRowMapper implements RowMapper<Message<?>> {
4140

4241
private final AllowListDeserializingConverter deserializer;
4342

44-
/**
45-
* Construct an instance based on the provided {@link AllowListDeserializingConverter}
46-
* and {@link LobHandler}.
47-
* @param deserializer the {@link AllowListDeserializingConverter} to use.
48-
* @param lobHandler the {@link LobHandler} to use.
49-
* @deprecated since 6.4 (for removal) (if favor of {@link #MessageRowMapper(AllowListDeserializingConverter)})
50-
* with a plain JDBC driver support for byte arrays.
51-
*/
52-
@Deprecated(forRemoval = true, since = "6.4")
53-
public MessageRowMapper(AllowListDeserializingConverter deserializer, LobHandler lobHandler) {
54-
this(deserializer);
55-
}
56-
5743
/**
5844
* Construct an instance based on the provided {@link AllowListDeserializingConverter}.
5945
* @param deserializer the {@link AllowListDeserializingConverter} to use.

spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/config/spring-integration-jdbc.xsd

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,6 @@
8080
</xsd:documentation>
8181
</xsd:annotation>
8282
</xsd:attribute>
83-
<xsd:attribute name="lob-handler" type="xsd:string">
84-
<xsd:annotation>
85-
<xsd:documentation><![CDATA[
86-
Reference to a lob handler (optional). Only override if using Oracle and
87-
the database type is not being detected for some reason.
88-
]]></xsd:documentation>
89-
<xsd:appinfo>
90-
<tool:annotation kind="ref">
91-
<tool:expected-type type="org.springframework.jdbc.support.lob.LobHandler"/>
92-
</tool:annotation>
93-
</xsd:appinfo>
94-
</xsd:annotation>
95-
</xsd:attribute>
9683
<xsd:attribute name="serializer" type="xsd:string">
9784
<xsd:annotation>
9885
<xsd:documentation><![CDATA[

0 commit comments

Comments
 (0)