docs: private synchronized JMSContext getInternalJMSContext() {
          TransactionSynchronizationRegistry tranSyncRegistry = null;
          try {
  
              boolean tranIsActive = false;
  
              tranSyncRegistry = (TransactionSynchronizationRegistry) new InitialContext().lookup(TSR_LOOKUP_NAME);
  
              if (tranSyncRegistry != null)
              {
                  tranIsActive = (tranSyncRegistry.getTransactionStatus() == Status.STATUS_ACTIVE);
              }
  
              if (tranIsActive)
              {
  
                  Object resource = tranSyncRegistry.getResource(jmsContextInfo);
  
                  if (resource != null) {
  
                      return (JMSContext) resource;
  
                  } else {
  
                      final JMSContext transactedContext = createJMSContext(jmsContextInfo, tranIsActive);
  
                      //Once the new JMSContext is created,  add it to the transaction registry to 
                      //retrieve it later if the new JMSContext is requested for the same configuration
                      //but in same transactional context
                      tranSyncRegistry.putResource(jmsContextInfo, transactedContext);
  
                      //Register a Synchronization object in transaction registry for a call back
                      //when the transaction is complete,  we will close the JMSContext once the 
                      //Transaction is complete
                      tranSyncRegistry.registerInterposedSynchronization(new Synchronization() {
                          @Override
                          public void beforeCompletion() {}
  
                          @Override
                          public synchronized void afterCompletion(int status) {
                              transactedContext.close();
                              inTransaction = false;
                          }
                      });
  
                      return transactedContext;
                  }
              } else {
  
                  //Non transacted,  create a new JMSContext and return it
                  if (internalJMSContext == null) {
                      internalJMSContext = createJMSContext(jmsContextInfo, tranIsActive);
                  }
                  return internalJMSContext;
              }
          } catch (Exception e)
          {
              throw new RuntimeException(e.getLocalizedMessage(), e);
          }
      }