code: public static int getIsolationLevel(SynchronizationRegistryUOWScope txKey,
                                          int preferredIsolationLevel) {
          int isolationLevel;
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d532639.2
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "getIsolationLevel: " + txKey);
  
          ContainerTx ctx = (ContainerTx) txKey.getResource(containerTxResourceKey);
  
          if (ctx == null) {
              // The Container is not involved in the specified transaction.
              // The call is probably for a JSP/Servlet, so just get the preferred
              // value from the PortabilityLayer and return it.
              if (isTraceOn && tc.isEventEnabled())
                  Tr.event(tc, "ContainerTx is null, determining from PortabilityLayer");
              isolationLevel = preferredIsolationLevel;
          } else {
              // The Container is involved in the specified tranaction.
              // Get the isolation level from the ContainerTx object. And, if
              // the value is NONE (either not set yet, or was not specified
              // for the bean method), then obtain the preferred value from
              // the PortabilityLayer and set that for the transaction.
              isolationLevel = ctx.getIsolationLevel();
  
              if (isolationLevel == java.sql.Connection.TRANSACTION_NONE) {
                  if (isTraceOn && tc.isEventEnabled())
                      Tr.event(tc, "Determining from PortabilityLayer");
  
                  isolationLevel = preferredIsolationLevel;
                  try {
                      ctx.setIsolationLevel(isolationLevel);
                  } catch (IsolationLevelChangeException ex) {
                      // This would be a Container internal error.  It would seem to
                      // only be possible if another thread were modifying the
                      // ContainerTx at the same time.  Log it and continue.
                      FFDCFilter.processException(ex, CLASS_NAME + ".getIsolationLevel",
                                                  "1433");
                      Tr.error(tc, "IGNORING_UNEXPECTED_EXCEPTION_CNTR0033E", ex);
                  }
              }
          }
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(tc, "getIsolationLevel: " +
                          MethodAttribUtils.getIsolationLevelString(isolationLevel));
  
          return isolationLevel;
      }
docs: d107762