code: @Override
      public JMSContext createContext(int sessionMode) throws JMSRuntimeException {
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(this, tc, "createContext", new Object[] { sessionMode });
  
          JmsJMSContextImpl jmsContext = null;
  
          // If the context created is container-managed, then JMSRuntimeException must be thrown
          if (jmsConnection.isManaged()) {
              JMSException jmse = (JMSException) JmsErrorUtils.newThrowable(JMSException.class,
                                                                            "CREATECONTEXT_IN_CONTAINER_CWSIA0513",
                                                                            null, tc);
              throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
          }
  
          try {
              //CTS test failure was reported when the session mode was passed as -1,  so adding the validation
              switch (sessionMode)
              {
                  case JMSContext.AUTO_ACKNOWLEDGE:
                  case JMSContext.CLIENT_ACKNOWLEDGE:
                  case JMSContext.DUPS_OK_ACKNOWLEDGE:
                  case JMSContext.SESSION_TRANSACTED: {
                      break;
                  }
                  default:
                      throw (JMSRuntimeException) JmsErrorUtils.newThrowable(JMSRuntimeException.class,
                                                                             "INVALID_ACKNOWLEDGE_MODE_CWSIA0514",
                                                                             new Object[] {},
                                                                             tc
                                      );
              }
  
              jmsContext = new JmsJMSContextImpl(jmsConnection, sessionMode, false);
          } finally {
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                  SibTr.exit(this, tc, "createContext", new Object[] { jmsContext });
          }
          return jmsContext;
      }
docs: /*
  For every {@link JmsJMSContextImpl#createContext(int)} the same jmsConnection
  is used but a new jmsSession is created.
  
  @see javax.jms.JMSContext#createContext(int)