[ 
https://issues.apache.org/jira/browse/QPID-7933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16185827#comment-16185827
 ] 

Keith Wall commented on QPID-7933:
----------------------------------

A workaround for this problem is to add the following 
{{org.apache.qpid.server.virtualhost.AbstractVirtualHost:2634}} i.e. the 
{{#onRestart}} method

{code}
        final ConfigurationChangeListener listener = new 
StoreConfigurationChangeListener(getDurableConfigurationStore());
        applyToChildren(child -> child.addChangeListener(listener));
{code}

Whilst this would fix the problem, it feels ugly because there would then be 
two instances of StoreConfigurationChangeListener (the original one attached to 
the virtualhost and the new one attached to all the children).  It really 
testifies to the poor separation of concerns.

> [Java Broker] Changes made to existing durable children of virtualhost not 
> recorded to the configuration store after a virtualhost restart
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-7933
>                 URL: https://issues.apache.org/jira/browse/QPID-7933
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>            Reporter: Keith Wall
>
> If a *virtualhost* is stopped, the object's children are closed and evacuated 
> from memory.  On restart, the children are recovered from the store.   
> However, the restart path AbstractVirtualHost#onRestart fails to reinstall 
> the StoreConfigurationChangeListener on the recovered children.   The effect 
> of this is that subsequent changes made to *existing* durable children (for 
> instance, a queue's alert threshold) are not persisted to the configuration 
> store.   
> The persistence of newly added objects (or the deletion of existing objects) 
> is not affected.  This is because the VirtualHost still has its 
> StoreConfigurationChangeListener intact.  (The virtualhost is not closed 
> during a restart).
> A restart at the virtualhostnode level does not suffer this problem.  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to