code: @Override
      public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException {
          checkClosed();
          actionOnConnectionTaken = true;
          if (transacted || acknowledgeMode == Session.SESSION_TRANSACTED)
              throw new JMSException("SQSSession does not support transacted");
  
          SQSSession sqsSession;
          if (acknowledgeMode == Session.AUTO_ACKNOWLEDGE) {
              sqsSession = new SQSSession(this, AcknowledgeMode.ACK_AUTO.withOriginalAcknowledgeMode(acknowledgeMode));
          } else if (acknowledgeMode == Session.CLIENT_ACKNOWLEDGE || acknowledgeMode == Session.DUPS_OK_ACKNOWLEDGE) {
              sqsSession = new SQSSession(this, AcknowledgeMode.ACK_RANGE.withOriginalAcknowledgeMode(acknowledgeMode));
          } else if (acknowledgeMode == SQSSession.UNORDERED_ACKNOWLEDGE) {
              sqsSession = new SQSSession(this, AcknowledgeMode.ACK_UNORDERED.withOriginalAcknowledgeMode(acknowledgeMode));
          } else {
              LOG.error("Unrecognized acknowledgeMode. Cannot create Session.");
              throw new JMSException("Unrecognized acknowledgeMode. Cannot create Session.");
          }
          synchronized (stateLock) { 
              checkClosing();
              sessions.add(sqsSession);
  
              /**
               * Any new sessions created on a started connection should be
               * started on creation
               */
              if (running) {
                  sqsSession.start();
              }
          }
                 
          return sqsSession;
      }
docs: Creates a <code>Session</code>
  
  @param transacted
  Only false is supported.
  @param acknowledgeMode
  Legal values are <code>Session.AUTO_ACKNOWLEDGE</code>,
  <code>Session.CLIENT_ACKNOWLEDGE</code>,
  <code>Session.DUPS_OK_ACKNOWLEDGE</code>, and
  <code>SQSSession.UNORDERED_ACKNOWLEDGE</code>
  @return a new session.
  @throws JMSException
  If the QueueConnection object fails to create a session due
  to some internal error or lack of support for the specific
  transaction and acknowledge mode.