}
public void setSubscriptionRecoveryPolicy(SubscriptionRecoveryPolicy recoveryPolicy) {
if (this.subscriptionRecoveryPolicy != null && this.subscriptionRecoveryPolicy instanceof RetainedMessageSubscriptionRecoveryPolicy) {
// allow users to combine retained message policy with other ActiveMQ policies
RetainedMessageSubscriptionRecoveryPolicy policy = (RetainedMessageSubscriptionRecoveryPolicy) this.subscriptionRecoveryPolicy;
policy.setWrapped(recoveryPolicy);
} else {
this.subscriptionRecoveryPolicy = recoveryPolicy;
}
}