docs: public EnterpriseBean preInvoke(EJSWrapperBase wrapper,
                                      int methodId,
                                      EJSDeployedSupport s,
                                      Object[] args) throws RemoteException {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d532639.2
  
          // Get the EJBMethodInfoImpl object for the methodId
          // assigned to this method by ejbdeploy tool.
          EJBMethodInfoImpl methodInfo = mapMethodInfo(s, wrapper, methodId, null);
  
          try {
              if (isTraceOn) {
                  if (TEEJBInvocationInfo.isTraceEnabled())
                      TEEJBInvocationInfo.tracePreInvokeBegins(s, wrapper);
  
                  if (tc.isEntryEnabled())
                      Tr.entry(tc, "EJBpreInvoke(" + methodId + ":" +
                                   methodInfo.getMethodName() + ")");
                  // d191679 Begins
                  if (tcClntInfo.isDebugEnabled())
                      Tr.debug(tcClntInfo, "preInvoke(" + methodInfo.getMethodName() + ")");
                  // d191679 Ends
              }
  
              // If this is a stateless SessionBean create, run only the bare minimum of
              // collaborators and other processing. This path is encapsulated in a separate
              // method for now, to avoid lots of "if" statements within this method.
              Object bean = null; // Changed EnterpriseBean to Object       d366807.1
              if (methodInfo.isStatelessSessionBean && methodInfo.isHomeCreate) {
                  bean = preInvokeForStatelessSessionCreate(wrapper, methodId, s, methodInfo, args); //LIDB2617.11
              } else {
                  // Perform preinvoke processing that must occur prior
                  // to activation of the EJB.
                  bean = preInvokeActivate(wrapper, methodId, s, methodInfo);
  
                  // Now perform preinvoke processing that must occur after
                  // the EJB is activated.
                  preInvokeAfterActivate(wrapper, bean, s, args);
              }
  
              // Normal path exit.
              if (isTraceOn) {
                  if (tc.isEntryEnabled()) {
                      ContainerTx containerTx = s.currentTx;
  
                      Tr.exit(tc, "EJBpreInvoke(" + methodId + ":" +
                                  methodInfo.getMethodName() + ") " +
                                  " Invoking method '" + methodInfo.getMethodName() +
                                  "' on bean '" + wrapper.getClass().getName() +
                                  "(" + wrapper.beanId + ")" +
                                  "', '" + containerTx + "', isGlobalTx=" +
                                  (containerTx != null ? (containerTx.isTransactionGlobal() ? "true" : "false") : "Unknown"));
                  }
  
                  if (TEEJBInvocationInfo.isTraceEnabled())
                      TEEJBInvocationInfo.tracePreInvokeEnds(s, wrapper);
              }
  
              // No exceptions occured, so return the Enterprise bean
              // that was activated and/or loaded.
              return (EnterpriseBean) bean;
          } catch (Throwable t) {
              //FFDCFilter.processException( t, CLASS_NAME + ".preInvoke", "2558");
              preinvokeHandleException(t, wrapper, methodId, s, methodInfo);
  
              // This will never happen since the setUncheckException should
              // always throw an exception.  But we need this line to make
              // the compiler happy (it does know exception always thrown).
              return null;
          }
      }