docs: private void processAutomaticLightweightTransaction(BeanMetaData bmd, ByteCodeMetaData byteCodeMetaData) {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
  
          if (ContainerProperties.DisableAutomaticLightweightMethods) {
              if (isTraceOn && tc.isDebugEnabled())
                  Tr.debug(tc, "processAutomaticLightweightTransaction: disabled");
              return;
          }
  
          if (bmd.isLightweight) {
              if (isTraceOn && tc.isDebugEnabled())
                  Tr.debug(tc, "processAutomaticLightweightTransaction: already lightweight");
              return;
          }
  
          if (bmd.type != InternalConstants.TYPE_STATELESS_SESSION &&
              bmd.type != InternalConstants.TYPE_STATEFUL_SESSION &&
              bmd.type != InternalConstants.TYPE_SINGLETON_SESSION) {
              if (isTraceOn && tc.isDebugEnabled())
                  Tr.debug(tc, "processAutomaticLightweightTransaction: unsupported bean type");
              return;
          }
  
          if (bmd.localMethodInfos != null) {
              for (EJBMethodInfoImpl methodInfo : bmd.localMethodInfos) {
                  Method method = methodInfo.getMethod();
                  if (method == null) {
                      // Ignore special-case remove method for component interfaces.
                      continue;
                  }
  
                  TransactionAttribute txAttr = methodInfo.getTransactionAttribute();
                  ActivitySessionAttribute asAttr = methodInfo.getActivitySessionAttribute();
  
                  if (bmd.type == InternalConstants.TYPE_STATEFUL_SESSION) {
                      if (txAttr != TransactionAttribute.TX_SUPPORTS &&
                          txAttr != TransactionAttribute.TX_NOT_SUPPORTED) {
                          // BMT SFSB always switch transactions (either resume a
                          // sticky global, or start a new local), so it would be safe
                          // to elide the transaction pre/postInvoke.  However, we
                          // don't support BMT due to implementation complexities:
                          // 1.  BMStatefulBeanO.postInvoke relies on ContainerTx,
                          //     which is shared with the outer transaction
                          // 2.  EJSContainer.transitionToStickyGlobalTran "knows" that
                          //     preInvokeActivate started a transaction.
                          //
                          // CMT SFSB are enlisted in global transactions, so it is
                          // only possible to support transaction attributes that start
                          // a new transaction (local or global), though we currently
                          // only support transaction attributes that will start a new
                          // local transactions.  If the EJB doesn't have session
                          // synchronization, we could also support Required or
                          // RequiresNew, but we would need to track whether the bean
                          // is already enlisted to handle the pre/post invoke state
                          // transitions.  For Required, we could allow the
                          // optimization if no global exists.  Neither are currently
                          // worth the effort.  Finally, we don't support Never or
                          // Mandatory since those require preInvoke validation.
                          continue;
                      }
  
                      // Remove methods are transaction-aware.
                      if (methodInfo.isSFSBRemoveMethod()) {
                          continue;
                      }
                  } else {
                      if ((txAttr != TransactionAttribute.TX_BEAN_MANAGED ||
                           bmd.type != InternalConstants.TYPE_SINGLETON_SESSION)
                          &&
                          txAttr != TransactionAttribute.TX_REQUIRED &&
                          txAttr != TransactionAttribute.TX_REQUIRES_NEW &&
                          txAttr != TransactionAttribute.TX_SUPPORTS &&
                          txAttr != TransactionAttribute.TX_NOT_SUPPORTED) {
                          // We only support the transaction attributes that don't
                          // require preInvoke validation.  We do not support BMT SLSB
                          // because BMStatelessBeanO.postInvoke relies on ContainerTx,
                          // which is shared with the outer transaction.
                          continue;
                      }
                  }
  
                  if ((asAttr == ActivitySessionAttribute.AS_UNKNOWN ||
                       asAttr == ActivitySessionAttribute.AS_SUPPORTS)
                      &&
                      // Interceptor proxies run arbitrary user code that should run
                      // in the new transaction context.
                      methodInfo.getAroundInterceptorProxies() == null) {
                      ByteCodeMetaData.MethodMetaData byteCodeMethod = byteCodeMetaData.getByteCodeMethodMetaData(method);
                      if (byteCodeMethod != null && byteCodeMethod.ivTrivial) {
                          if (isTraceOn && tc.isDebugEnabled())
                              Tr.debug(tc, "enabling lightweight tx for trivial method " + method);
                          methodInfo.isLightweightTxCapable = true;
                      }
                  }
              }
          }
      }