ARTEMIS-2526 - Update ActiveMQServerImpl to call correct
beforeDestroyQueue hook
This commit is contained in:
parent
d7dc8b8de8
commit
1aed3f9dd6
|
@ -2145,7 +2145,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
|
|||
Queue queue = (Queue) binding.getBindable();
|
||||
|
||||
if (hasBrokerQueuePlugins()) {
|
||||
callBrokerQueuePlugins(plugin -> plugin.beforeDestroyQueue(queueName, session, checkConsumerCount, removeConsumers, autoDeleteAddress));
|
||||
callBrokerQueuePlugins(plugin -> plugin.beforeDestroyQueue(queue, session, checkConsumerCount, removeConsumers, autoDeleteAddress));
|
||||
}
|
||||
|
||||
if (session != null) {
|
||||
|
|
|
@ -57,7 +57,10 @@ public interface ActiveMQServerQueuePlugin extends ActiveMQServerBasePlugin {
|
|||
* @param removeConsumers
|
||||
* @param autoDeleteAddress
|
||||
* @throws ActiveMQException
|
||||
*
|
||||
* @deprecated use {@link #beforeDestroyQueue(Queue, SecurityAuth, boolean, boolean, boolean)}
|
||||
*/
|
||||
@Deprecated
|
||||
default void beforeDestroyQueue(SimpleString queueName, final SecurityAuth session, boolean checkConsumerCount,
|
||||
boolean removeConsumers, boolean autoDeleteAddress) throws ActiveMQException {
|
||||
|
||||
|
@ -75,6 +78,7 @@ public interface ActiveMQServerQueuePlugin extends ActiveMQServerBasePlugin {
|
|||
*/
|
||||
default void beforeDestroyQueue(Queue queue, final SecurityAuth session, boolean checkConsumerCount,
|
||||
boolean removeConsumers, boolean autoDeleteAddress) throws ActiveMQException {
|
||||
//by default call the old method for backwards compatibility
|
||||
beforeDestroyQueue(queue.getName(), session, checkConsumerCount, removeConsumers, autoDeleteAddress);
|
||||
}
|
||||
|
||||
|
|
|
@ -239,9 +239,9 @@ public class MethodCalledVerifier implements ActiveMQServerPlugin {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void beforeDestroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount,
|
||||
public void beforeDestroyQueue(Queue queue, SecurityAuth session, boolean checkConsumerCount,
|
||||
boolean removeConsumers, boolean autoDeleteAddress) {
|
||||
Preconditions.checkNotNull(queueName);
|
||||
Preconditions.checkNotNull(queue);
|
||||
methodCalled(BEFORE_DESTROY_QUEUE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue