while reviewing patch for https://jira.jboss.org/jira/browse/HORNETQ-174, I had some questions on PagingManager API and its implementation.
Currently, PagingManagerImpl.getPageStore() always return a PageStore. It creates a new one if there is not already one associated to the store name.
This means that when the AddressControl asks the PagingManager to retrieve its page store, we create a page store by side-effect even if there is no paging associated to the address.
I'll fix it by checking if the address is in PagingManager.getStoreNames() before calling PagingManager.getPageStore(). Afaik, this is the only place where we should check if there is an existing page store before calling the method.
I'll also add a comment to PagingManager.getPageStore() javadoc.
Having the side-effect of creating a page store for unknown store name is worth mentioning :)