docs: SICoreConnection createCoreConnection(final String userName,
                                            final String password) throws ResourceException {
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.entry(this, TRACE, "createCoreConnection", new Object[] {
                                                                             userName, "*****" });
          }
  
          SICoreConnectionFactory coreConnectionFactory = null;
  
          if (!UTEHelperFactory.jmsTestEnvironmentEnabled) {
  
              try {
  
                  coreConnectionFactory = SICoreConnectionFactorySelector
                                  .getSICoreConnectionFactory(FactoryType.TRM_CONNECTION);
  
              } catch (final SIException exception) {
  
                  FFDCFilter.processException(exception, CLASS_NAME
                                                         + ".createManagedConnection", FFDC_PROBE_5, this);
                  throw new ResourceException(NLS
                                  .getFormattedMessage("EXCEPTION_RECEIVED_CWSJR1064",
                                                       new Object[] { exception,
                                                                     "getSICoreConnectionFactory" }, null),
                                  exception);
  
              }
  
          } else {
  
              coreConnectionFactory = UTEHelperFactory.getHelperInstance()
                              .setupJmsTestEnvironment();
  
          }
  
          if (coreConnectionFactory == null) {
              throw new ResourceAdapterInternalException(NLS.getFormattedMessage(
                                                                                 ("SICORECONNECTION_ERROR_CWSJR1066"),
                                                                                 new Object[] { "createManagedConnection" }, null));
          }
  
          final SICoreConnection coreConnection;
  
          try {
  
              final Map trmProperties = _managedConnectionFactory
                              .getTrmProperties();
              coreConnection = coreConnectionFactory.createConnection(userName,
                                                                      password, trmProperties);
  
          } catch (final SIException exception) {
  
              FFDCFilter
                              .processException(
                                                exception,
                                                CLASS_NAME
                                                                + ".createManagedConnection (Subject, ConnectionRequestInfo)",
                                                FFDC_PROBE_6, this);
              if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) {
                  SibTr.exception(this, TRACE, exception);
              }
  
              throw new ResourceException(NLS.getFormattedMessage(
                                                                  "EXCEPTION_RECEIVED_CWSJR1065", new Object[] { exception,
                                                                                                                "createManagedConnection" }, null), exception);
  
          } catch (final SIErrorException exception) {
  
              FFDCFilter
                              .processException(
                                                exception,
                                                CLASS_NAME
                                                                + ".createManagedConnection (Subject, ConnectionRequestInfo)",
                                                FFDC_PROBE_7, this);
              if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) {
                  SibTr.exception(this, TRACE, exception);
              }
  
              throw new ResourceException(NLS.getFormattedMessage(
                                                                  "EXCEPTION_RECEIVED_CWSJR1065", new Object[] { exception,
                                                                                                                "createManagedConnection" }, null), exception);
  
          }
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.exit(this, TRACE, "createCoreConnection", coreConnection);
          }
          return coreConnection;
  
      }