code: public AbstractMessage get( LocalSession localSession , 
  				    			TransactionSet transactionSet , 
                                  MessageSelector selector ) throws JMSException
      {
      	if (closed)
      		return null;
      	
      	this.lastActivity = System.currentTimeMillis();
      	
      	AbstractMessage msg = null;
      	
          // Search in volatile store first
          if (volatileStore != null)
          {
              msg = getFromStore(localSession, volatileStore, transactionSet, selector);
              
              // Then in persistent store
  	        if (msg == null && persistentStore != null)
  	        	msg = getFromStore(localSession, persistentStore, transactionSet, selector);
          }
          else
          if (persistentStore != null)
  	        msg = getFromStore(localSession, persistentStore, transactionSet, selector);
          
          return msg;
      }
docs: Get the first available message from this destination (matching an optional message selector).
  If a message is found, the transaction set is updated accordingly.
  @return a message or null if there is no available message (or queue is closed)