diff --git a/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/AbstractJMSProcessor.java b/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/AbstractJMSProcessor.java index 5c322a9ce2..4b89380532 100644 --- a/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/AbstractJMSProcessor.java +++ b/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/AbstractJMSProcessor.java @@ -31,6 +31,7 @@ import org.apache.nifi.jms.cf.JMSConnectionFactoryProvider; import org.apache.nifi.jms.cf.JMSConnectionFactoryProviderDefinition; import org.apache.nifi.jms.cf.JndiJmsConnectionFactoryHandler; import org.apache.nifi.jms.cf.JndiJmsConnectionFactoryProperties; +import org.apache.nifi.migration.PropertyConfiguration; import org.apache.nifi.processor.AbstractProcessor; import org.apache.nifi.processor.ProcessContext; import org.apache.nifi.processor.ProcessSession; @@ -109,14 +110,6 @@ public abstract class AbstractJMSProcessor extends Abstract .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT) .build(); - static final PropertyDescriptor SESSION_CACHE_SIZE = new PropertyDescriptor.Builder() - .name("Session Cache size") - .displayName("Session Cache Size") - .description("This property is deprecated and no longer has any effect on the Processor. It will be removed in a later version.") - .required(false) - .defaultValue("1") - .addValidator(StandardValidators.NON_NEGATIVE_INTEGER_VALIDATOR) - .build(); static final PropertyDescriptor CHARSET = new PropertyDescriptor.Builder() .name("character-set") .displayName("Character Set") @@ -187,6 +180,11 @@ public abstract class AbstractJMSProcessor extends Abstract .build(); } + @Override + public void migrateProperties(final PropertyConfiguration config) { + config.removeProperty("Session Cache size"); + } + @Override protected Collection customValidate(ValidationContext validationContext) { return new ConnectionFactoryConfigValidator(validationContext).validateConnectionFactoryConfig(); diff --git a/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/ConsumeJMS.java b/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/ConsumeJMS.java index 6b61fe4f73..d4f8e8a085 100644 --- a/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/ConsumeJMS.java +++ b/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/ConsumeJMS.java @@ -239,7 +239,6 @@ public class ConsumeJMS extends AbstractJMSProcessor { _propertyDescriptors.add(USER); _propertyDescriptors.add(PASSWORD); _propertyDescriptors.add(CLIENT_ID); - _propertyDescriptors.add(SESSION_CACHE_SIZE); // change the validator on CHARSET property PropertyDescriptor charsetWithELValidatorProperty = new PropertyDescriptor.Builder() diff --git a/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/PublishJMS.java b/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/PublishJMS.java index 1e37f6aea1..4650ed3d9c 100644 --- a/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/PublishJMS.java +++ b/nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/PublishJMS.java @@ -178,7 +178,6 @@ public class PublishJMS extends AbstractJMSProcessor { _propertyDescriptors.add(USER); _propertyDescriptors.add(PASSWORD); _propertyDescriptors.add(CLIENT_ID); - _propertyDescriptors.add(SESSION_CACHE_SIZE); _propertyDescriptors.add(MESSAGE_BODY); _propertyDescriptors.add(CHARSET);