Commit 10e02626 authored by Andre Freyssinet's avatar Andre Freyssinet

Fix initialization of interceptors in case of explicit setProperties.

parent cee9b50c
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 2020 ScalAgent Distributed Technologies
* Copyright (C) 2001 - 2021 ScalAgent Distributed Technologies
* Copyright (C) 1996 - 2000 Dyade
*
* This library is free software; you can redistribute it and/or
......@@ -426,21 +426,11 @@ public abstract class Destination extends Agent implements DestinationMBean {
interceptorsProp = null;
interceptors = null;
if (firstTime && prop != null && prop.containsKey(AdminCommandConstant.INTERCEPTORS)) {
if (prop != null && prop.containsKey(AdminCommandConstant.INTERCEPTORS)) {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, this + ": setProperties interceptors = " + prop.get(AdminCommandConstant.INTERCEPTORS));
//TODO: clean prop
addInterceptor(getDestinationId(), getName(), prop);
}
// Interceptors are set the first time in agent initialization
if (!firstTime) {
if (interceptorsProp != null) {
interceptors = new ArrayList<MessageInterceptor>();
InterceptorsHelper.addInterceptors(getDestinationId(), getName(), AdminCommandConstant.INTERCEPTORS, interceptorsProp, interceptors);
} else {
interceptors = null;
}
}
}
protected boolean isLocal(AgentId id) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment