diff options
-rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/subscription/Subscription_0_10.java | 14 | ||||
-rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java | 4 |
2 files changed, 15 insertions, 3 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/subscription/Subscription_0_10.java b/java/broker/src/main/java/org/apache/qpid/server/subscription/Subscription_0_10.java index 9f97d479e3..cbc8664574 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/subscription/Subscription_0_10.java +++ b/java/broker/src/main/java/org/apache/qpid/server/subscription/Subscription_0_10.java @@ -102,7 +102,7 @@ public class Subscription_0_10 implements Subscription, FlowCreditManager.FlowCr public void stateChange(Subscription sub, State oldState, State newState) { - // TODO something ? log a message here ? + CurrentActor.get().message(SubscriptionMessages.STATE(newState.toString())); } }; private AMQQueue _queue; @@ -179,8 +179,15 @@ public class Subscription_0_10 implements Subscription, FlowCreditManager.FlowCr _trace = (String) arguments.get("qpid.trace.id"); _id = getConfigStore().createId(); getConfigStore().addConfiguredObject(this); - _logActor = new SubscriptionActor(CurrentActor.get().getRootMessageLogger(), this); - + String filterLogString = null; + LogActor _logActor = CurrentActor.get(); + if (_logActor.getRootMessageLogger().isMessageEnabled(_logActor, this, SubscriptionMessages.CREATE_LOG_HIERARCHY)) + { + filterLogString = getFilterLogString(); + _logActor.message(SubscriptionMessages.CREATE(filterLogString, queue.isDurable() && exclusive, + filterLogString.length() > 0)); + } + } public AMQShortString getConsumerTag() @@ -268,6 +275,7 @@ public class Subscription_0_10 implements Subscription, FlowCreditManager.FlowCr } _creditManager.removeListener(this); getConfigStore().removeConfiguredObject(this); + CurrentActor.get().message(SubscriptionMessages.CLOSE()); } finally { diff --git a/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java b/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java index 209bee4565..7715f70f0d 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java +++ b/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java @@ -35,6 +35,8 @@ import org.apache.qpid.server.filter.FilterManager; import org.apache.qpid.server.filter.FilterManagerFactory; import org.apache.qpid.server.flow.FlowCreditManager_0_10; import org.apache.qpid.server.flow.WindowCreditManager; +import org.apache.qpid.server.logging.actors.CurrentActor; +import org.apache.qpid.server.logging.actors.GenericActor; import org.apache.qpid.server.message.MessageMetaData_0_10; import org.apache.qpid.server.message.MessageTransferMessage; import org.apache.qpid.server.protocol.AMQSessionModel; @@ -251,6 +253,8 @@ public class ServerSessionDelegate extends SessionDelegate filterManager, method.getArguments()); + CurrentActor.set(GenericActor.getInstance(sub)); + ((ServerSession)session).register(destination, sub); try { |