title: BlockingQueue in ServletContextAttributeListener
body: <p>I'm trying to transfer data (from a thread started in a ServletContextListener which is continuously adding data to the queue) to a ServletContextAttributeListener.</p>
  
  <p>The data from the queue needs to be passed on to the connected clients which are notified on "attributeReplaced".</p>
  
  <p>The data is contained in a BlockingQueue.</p>
  
  <p>However I'm kind of confused; if I'm placing the BlockingQueue in the context by calling</p>
  
  <pre><code>private BlockingQueue&lt;String&gt; queue = new LinkedBlockingQueue&lt;String&gt;();
  //..
  event.getServletContext().setAttribute("serialPortData", queue);
  //..
  </code></pre>
  
  <p><strong>Question</strong>: Does the context then contain a copy of this Queue or a pointer?</p>
  
  <p>Because if it only copies the queue then it would not make sense to add a Queue to the context right? Or would you solve this problem in another way?</p>
  
  <p>Thomas.</p>