code: private int getEJBMethodId(Method method)
      {
          // Get target method signature.
          String targetSignature = MethodAttribUtils.methodSignature(method);
  
          // Search array of EJBMethodInfo object until the one that matches
          // target signature is found or all array elements are processed.
          EJBMethodInfoImpl minfo = null;
          int n = super.methodInfos.length;
          int methodId = -1;
          for (int i = 0; i < n; ++i)
          {
              minfo = super.methodInfos[i];
              if (targetSignature.equals(minfo.getMethodSignature()))
              {
                  methodId = i;
                  break;
              }
          }
  
          // Return methodId to caller (or -1 if not found).
          return methodId;
      }
docs: Get the method ID associated with a specified Method object.
  The method ID can be used as a index into the array of
  EJBMethodInfo objects (super.methodInfos).
  
  @param method - the target of this request.
  
  @return method ID for the target method or -1 if not found.