Skip to content

Commit

Permalink
[WFLY-19305]: ClassCastException when running live-only HA policy.
Browse files Browse the repository at this point in the history
 * Replacing the use of LiveOnlyPolicyConfiguration by PrimaryOnlyPolicyConfiguration.

Jira: https://issues.redhat.com/browse/WFLY-19305
  • Loading branch information
ehsavoie committed May 3, 2024
1 parent 7e3db1d commit 096ddb5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import org.apache.activemq.artemis.core.config.HAPolicyConfiguration;
import org.apache.activemq.artemis.core.config.ScaleDownConfiguration;
import org.apache.activemq.artemis.core.config.ha.ColocatedPolicyConfiguration;
import org.apache.activemq.artemis.core.config.ha.LiveOnlyPolicyConfiguration;
import org.apache.activemq.artemis.core.config.ha.PrimaryOnlyPolicyConfiguration;
import org.apache.activemq.artemis.core.config.ha.ReplicaPolicyConfiguration;
import org.apache.activemq.artemis.core.config.ha.ReplicatedPolicyConfiguration;
import org.apache.activemq.artemis.core.config.ha.SharedStorePrimaryPolicyConfiguration;
Expand Down Expand Up @@ -119,7 +119,7 @@ public void addHAPolicyConfiguration(OperationContext context, Configuration con

private HAPolicyConfiguration buildLiveOnlyConfiguration(OperationContext context, ModelNode model) throws OperationFailedException {
ScaleDownConfiguration scaleDownConfiguration = ScaleDownAttributes.addScaleDownConfiguration(context, model);
return new LiveOnlyPolicyConfiguration(scaleDownConfiguration);
return new PrimaryOnlyPolicyConfiguration(scaleDownConfiguration);
}

private HAPolicyConfiguration buildReplicationPrimaryConfiguration(OperationContext context, ModelNode model) throws OperationFailedException {
Expand Down

0 comments on commit 096ddb5

Please sign in to comment.