GH-9744: Remove deprecated LobHandler references
Fixes: https://github.com/spring-projects/spring-integration/issues/9744
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,17 +30,17 @@ import org.springframework.util.StringUtils;
|
||||
* Parser for {@link JdbcMessageStore}.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
public class JdbcMessageStoreParser extends AbstractBeanDefinitionParser {
|
||||
|
||||
@Override
|
||||
protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
|
||||
|
||||
Object source = parserContext.extractSource(element);
|
||||
|
||||
BeanDefinitionBuilder builder = BeanDefinitionBuilder
|
||||
.genericBeanDefinition(JdbcMessageStore.class);
|
||||
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(JdbcMessageStore.class);
|
||||
|
||||
String dataSourceRef = element.getAttribute("data-source");
|
||||
String simpleJdbcOperationsRef = element.getAttribute("jdbc-operations");
|
||||
@@ -53,18 +53,12 @@ public class JdbcMessageStoreParser extends AbstractBeanDefinitionParser {
|
||||
+ "simple-jdbc-operations should be set for the JDBC message-store", source);
|
||||
}
|
||||
|
||||
if (refToDataSourceSet) {
|
||||
builder.addConstructorArgReference(dataSourceRef);
|
||||
}
|
||||
else {
|
||||
builder.addConstructorArgReference(simpleJdbcOperationsRef);
|
||||
}
|
||||
builder.addConstructorArgReference(refToDataSourceSet ? dataSourceRef : simpleJdbcOperationsRef);
|
||||
|
||||
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "lob-handler");
|
||||
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "serializer");
|
||||
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "deserializer");
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "table-prefix", "tablePrefix");
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "region", "region");
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "table-prefix");
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "region");
|
||||
|
||||
return builder.getBeanDefinition();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -51,7 +51,6 @@ import org.springframework.integration.util.UUIDConverter;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
|
||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
||||
import org.springframework.jdbc.support.lob.LobHandler;
|
||||
import org.springframework.jmx.export.annotation.ManagedAttribute;
|
||||
import org.springframework.jmx.export.annotation.ManagedMetric;
|
||||
import org.springframework.jmx.export.annotation.ManagedResource;
|
||||
@@ -225,16 +224,6 @@ public class JdbcChannelMessageStore implements PriorityCapableChannelMessageSto
|
||||
this.jdbcTemplate = jdbcTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the {@link LobHandler} that is used to create and unpack large objects in SQL queries. The default is
|
||||
* fine for almost all platforms, but some Oracle drivers require a native implementation.
|
||||
* @param lobHandler a {@link LobHandler}
|
||||
* @deprecated since 6.4 (for removal) (with no replacement) in favor of plain JDBC driver support for byte arrays.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "6.4")
|
||||
public void setLobHandler(LobHandler lobHandler) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow for passing in a custom {@link MessageRowMapper}. The {@link MessageRowMapper}
|
||||
* is used to convert the selected database row representing the persisted
|
||||
|
||||
@@ -49,7 +49,6 @@ import org.springframework.integration.util.UUIDConverter;
|
||||
import org.springframework.jdbc.core.JdbcOperations;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.SingleColumnRowMapper;
|
||||
import org.springframework.jdbc.support.lob.LobHandler;
|
||||
import org.springframework.jmx.export.annotation.ManagedAttribute;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.messaging.Message;
|
||||
@@ -318,17 +317,6 @@ public class JdbcMessageStore extends AbstractMessageGroupStore
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the {@link LobHandler} that is used to create and unpack large objects in SQL queries. The default is
|
||||
* fine for almost all platforms, but some Oracle drivers require a native implementation.
|
||||
* @param lobHandler a {@link LobHandler}
|
||||
* @deprecated since 6.4 (for removal) (with no replacement) in favor of plain JDBC driver support for byte arrays.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "6.4")
|
||||
public void setLobHandler(LobHandler lobHandler) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* A converter for serializing messages to byte arrays for storage.
|
||||
* @param serializer the serializer to set
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017-2024 the original author or authors.
|
||||
* Copyright 2017-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,7 +24,6 @@ import java.util.Objects;
|
||||
import org.springframework.core.serializer.support.SerializingConverter;
|
||||
import org.springframework.integration.IntegrationMessageHeaderAccessor;
|
||||
import org.springframework.integration.util.UUIDConverter;
|
||||
import org.springframework.jdbc.support.lob.LobHandler;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -53,21 +52,6 @@ public class ChannelMessageStorePreparedStatementSetter {
|
||||
|
||||
private final SerializingConverter serializer;
|
||||
|
||||
/**
|
||||
* Instantiate a {@link ChannelMessageStorePreparedStatementSetter} with the provided
|
||||
* serializer and lobHandler, which both must not be null.
|
||||
* @param serializer the {@link SerializingConverter} to build {@code byte[]} from
|
||||
* the request message
|
||||
* @param lobHandler the {@link LobHandler} to store {@code byte[]} of the request
|
||||
* message to prepared statement
|
||||
* @deprecated since 6.4 (for removal) (if favor of {@link #ChannelMessageStorePreparedStatementSetter(SerializingConverter)})
|
||||
* with a plain JDBC driver support for byte arrays.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "6.4")
|
||||
public ChannelMessageStorePreparedStatementSetter(SerializingConverter serializer, LobHandler lobHandler) {
|
||||
this(serializer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiate a {@link ChannelMessageStorePreparedStatementSetter} with the provided
|
||||
* serializer and lobHandler, which both must not be null.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,7 +21,6 @@ import java.sql.SQLException;
|
||||
|
||||
import org.springframework.integration.support.converter.AllowListDeserializingConverter;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.jdbc.support.lob.LobHandler;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -41,19 +40,6 @@ public class MessageRowMapper implements RowMapper<Message<?>> {
|
||||
|
||||
private final AllowListDeserializingConverter deserializer;
|
||||
|
||||
/**
|
||||
* Construct an instance based on the provided {@link AllowListDeserializingConverter}
|
||||
* and {@link LobHandler}.
|
||||
* @param deserializer the {@link AllowListDeserializingConverter} to use.
|
||||
* @param lobHandler the {@link LobHandler} to use.
|
||||
* @deprecated since 6.4 (for removal) (if favor of {@link #MessageRowMapper(AllowListDeserializingConverter)})
|
||||
* with a plain JDBC driver support for byte arrays.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "6.4")
|
||||
public MessageRowMapper(AllowListDeserializingConverter deserializer, LobHandler lobHandler) {
|
||||
this(deserializer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an instance based on the provided {@link AllowListDeserializingConverter}.
|
||||
* @param deserializer the {@link AllowListDeserializingConverter} to use.
|
||||
|
||||
@@ -80,19 +80,6 @@
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="lob-handler" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Reference to a lob handler (optional). Only override if using Oracle and
|
||||
the database type is not being detected for some reason.
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="org.springframework.jdbc.support.lob.LobHandler"/>
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="serializer" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
|
||||
Reference in New Issue
Block a user