code: @Override
  	public AbstractMessage nextElement()
  	{
  		if (endOfQueueReached)
  			throw new NoSuchElementException();
  			
  		try
  		{
  			checkNotClosed();
  			AbstractMessage msg = fetchNext();
  			if (msg != null)
  			{
  				nextMessage = null; // Consume fetched message
  
  				// Make sure the message is fully deserialized and marked as read-only
  				msg.ensureDeserializationLevel(MessageSerializationLevel.FULL);
  				msg.markAsReadOnly();
  				
  				return msg;
  			}
  			
  			throw new NoSuchElementException();
  		}
  		catch (NoSuchElementException e)
  		{
  			throw e;
  		}
  		catch (JMSException e)
  		{
  			throw new IllegalStateException(e.toString());
  		}
  	}
docs: /* (non-Javadoc)
  @see java.util.Enumeration#nextElement()