We've aways agreed that paging is done at the address level.. correct?
That's why we aways paged before routing.
Paging should be a buffer before routing.
So when depaging, we would create the references correctly without create duplications.
Now it's being done inside QueueImpl/route.
On the case of having multiple Bindings to a queue, the Address could become in page mode in the middle of routing, and we must ensure to page/depage atomically.
Unless we change requirements and start paging at Queue level (not address level any more) but that would make us loosing reference counting for messages when paging. (It was a basic requirement for making us paging at address level).
I'm not following what you're trying to say here...
Never mind.. I thought the PagingManager.page call was moved inside the Queue. I read it wrong.
I fixed the test as i stated on the JIRA.
(There was nothing wrong with the test. Just had to make a few tweaks)