title: Using ActiveMQ fileQueueCursor and the temp store without enabling persistence
body: <p>I'm using ActiveMQ 5.7.0 and want the fileQueueCursor to spill into the temp store if the queue destination reaches a certain memory threshold.  I don't want to enable persistence.</p>
  
  <p>I've configured a destinationPolicy:</p>
  
  <pre><code>    &lt;destinationPolicy&gt;
          &lt;policyMap&gt;
              &lt;policyEntries&gt;
                  &lt;policyEntry queue="&gt;"&gt;  
                      &lt;pendingQueuePolicy&gt;
                          &lt;fileQueueCursor /&gt;
                      &lt;/pendingQueuePolicy&gt;
                  &lt;/policyEntry&gt;
              &lt;/policyEntries&gt;
          &lt;/policyMap&gt;
      &lt;/destinationPolicy&gt;
  </code></pre>
  
  <p>I've also configured systemUsage with a low memoryUsage for testing:</p>
  
  <pre><code>    &lt;systemUsage&gt;
          &lt;systemUsage&gt;
              &lt;memoryUsage&gt;
                  &lt;memoryUsage limit="5 mb" /&gt;
              &lt;/memoryUsage&gt;
              &lt;tempUsage&gt;
                  &lt;tempUsage limit="32 mb" /&gt;
              &lt;/tempUsage&gt;
          &lt;/systemUsage&gt;
      &lt;/systemUsage&gt;
  </code></pre>
  
  <p>I have some code running in my debugger which will insert messages into the queue.  While running I can see messages about increased memory usage:</p>
  
  <p>2013-May-09 17:40:12.963 PDT DEBUG [ActiveMQ Transport: tcp:///127.0.0.1:63223@61616] [org.apache.activemq.usage.Usage:fireEvent] [Usage.java:245] [] [] [] - default:memory:queue://testReq:memory: usage change from: 69% of available memory, to: 70% of available memory</p>
  
  <p>I've noticed that AMQ's FilePendingMessageCursor.flushToDisk() is called at around 70% memory usage but because the 'store' member is null the code is not executed.</p>
  
  <p>When I enable persistence the store is not null and flushToDisk() completes.</p>
  
  <p>Is it possible to set a temporary store without enabling persistence?  </p>