docs: private boolean isApplicationException(Throwable ex, EJBMethodInfoImpl methodInfo) {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "isApplicationException : " + ex.getClass().getName() + ", " + methodInfo);
  
          // d660332
          if (ex instanceof Exception && (!ContainerProperties.DeclaredUncheckedAreSystemExceptions || !(ex instanceof RuntimeException))) {
              Class<?>[] declaredExceptions = null;
  
              // Checks if the method interface is business or component.
              // If it's a component interface, there is only one interface to worry about   // d734957
              if (ivInterface == WrapperInterface.LOCAL || ivInterface == WrapperInterface.REMOTE) {
                  declaredExceptions = methodInfo.ivDeclaredExceptionsComp;
              } else {
                  // Determine if there were any declared exceptions for the method
                  // interface being used. However, if the wrapper is an aggregate
                  // wrapper (all interfaces), then just find the first set of
                  // non-null declared exceptions. It is possible (thought not likely)
                  // this could result in odd behavior, but a warning was logged
                  // when the wrapper class was created.                       F743-34304
                  if (ivBusinessInterfaceIndex == AGGREGATE_LOCAL_INDEX) {
                      for (Class<?>[] declaredEx : methodInfo.ivDeclaredExceptions) {
                          if (declaredEx != null) {
                              declaredExceptions = declaredEx;
                              break;
                          }
                      }
                  } else {
                      if (isTraceOn && tc.isDebugEnabled())
                          Tr.debug(tc, "ivBusinessInterfaceIndex=" + ivBusinessInterfaceIndex);
                      declaredExceptions = methodInfo.ivDeclaredExceptions[ivBusinessInterfaceIndex]; // F743-24429
                  }
              }
  
              if (declaredExceptions != null) {
                  for (Class<?> declaredException : declaredExceptions) {
                      if (declaredException.isAssignableFrom(ex.getClass())) {
                          if (isTraceOn && tc.isEntryEnabled())
                              Tr.exit(tc, "isApplicationException : true");
                          return true;
                      }
                  }
              }
          }
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(tc, "isApplicationException : false");
  
          return false;
      }