Skip to content

Commit

Permalink
Merge pull request #8620 from jmesnil/WFLY-6077_auto-jms-queues_attri…
Browse files Browse the repository at this point in the history
…butes

[WFLY-6077] address-settings's auto-create|delete-jms-queues
  • Loading branch information
n1hility committed Jan 29, 2016
2 parents 52ce361 + 5212ff9 commit 06ee4cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,9 @@ static AddressSettings createSettings(final OperationContext context, final Mode
if (config.hasDefined(AddressSettingDefinition.SLOW_CONSUMER_THRESHOLD.getName())) {
settings.setSlowConsumerThreshold(AddressSettingDefinition.SLOW_CONSUMER_THRESHOLD.resolveModelAttribute(context, config).asLong());
}
if (config.hasDefined(AddressSettingDefinition.AUTO_CREATE_JMS_QUEUES.getName())) {
settings.setAutoCreateJmsQueues(AddressSettingDefinition.AUTO_CREATE_JMS_QUEUES.resolveModelAttribute(context, config).asBoolean());
}
if (config.hasDefined(AddressSettingDefinition.AUTO_DELETE_JMS_QUEUES.getName())) {
settings.setAutoDeleteJmsQueues(AddressSettingDefinition.AUTO_DELETE_JMS_QUEUES.resolveModelAttribute(context, config).asBoolean());
}
// always set the auto-create|delete-jms-queues attributes as their default attribute values differ from Artemis defaults.
settings.setAutoCreateJmsQueues(AddressSettingDefinition.AUTO_CREATE_JMS_QUEUES.resolveModelAttribute(context, config).asBoolean());
settings.setAutoDeleteJmsQueues(AddressSettingDefinition.AUTO_DELETE_JMS_QUEUES.resolveModelAttribute(context, config).asBoolean());
return settings;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@
public class AddressSettingDefinition extends PersistentResourceDefinition {

public static final SimpleAttributeDefinition AUTO_CREATE_JMS_QUEUES = create("auto-create-jms-queues", ModelType.BOOLEAN)
.setDefaultValue(new ModelNode(AddressSettings.DEFAULT_AUTO_CREATE_QUEUES))
// Default value is false to have the same behaviour than the legacy messaging subsystem (Artemis defaults to true)
.setDefaultValue(new ModelNode(false))
.setAllowNull(true)
.setAllowExpression(true)
.build();

public static final SimpleAttributeDefinition AUTO_DELETE_JMS_QUEUES = create("auto-delete-jms-queues", ModelType.BOOLEAN)
.setDefaultValue(new ModelNode(AddressSettings.DEFAULT_AUTO_DELETE_QUEUES))
// Default value is false to have the same behaviour than the legacy messaging subsystem (Artemis defaults to true)
.setDefaultValue(new ModelNode(false))
.setAllowNull(true)
.setAllowExpression(true)
.build();
Expand Down

0 comments on commit 06ee4cc

Please sign in to comment.