title: JMS and MDB with setRollbackOnly
body: <p>I have a java class which consumes messages from a queue, sending HTTP calls to some urls. I have made some search on google and also on stackoverflow (and really sorry if i have missed any sources mentioning about the problem) but couldnt find anything in details about setRollbackOnly call. </p>
  
  <p>My question is... in case I rollback, the message which is consumed from the queue will be blocking the rest of the queue and will be looping until it is processed successfully or it will be requeued at the end of the current queue? </p>
  
  <p>My code which I use for consuming from the queue and sending HTTP calls is below and the whole application is running on Glassfish server:</p>
  
  <pre>
  public class RequestSenderBean implements MessageListener
  {
    @Resource
    private MessageDrivenContext mdbContext;
  
    public RequestSenderBean(){}
  
    public void onMessage(final Message message)
    {
      try
      {
        if(message instanceof ObjectMessage)
        {
  
            String responseOfCall=sendHttpPost(URL, PARAMS_FROM_MESSAGE);
  
            if(responseOfCall.startsWith("Success"))
            {
              //Everything is OK, do some stuff
            }
            else if(responseOfCall.startsWith("Failure"))
            {
              //Failure, do some other stuff
            }
  
      }
      catch(final Exception e)
      {
        e.printStackTrace();
        mdbContext.setRollbackOnly();
      }
    }
  }
  </pre>