code: static String[] getRemoteTypeIds(Class<?> remoteInterface) {
          ArrayList<String> remoteTypes = new ArrayList<String>();
          remoteTypes.add(getRemoteTypeId(remoteInterface));
  
          Class<?>[] interfaces = remoteInterface.getInterfaces();
          for (Class<?> remote : interfaces) {
              if (remote != Remote.class) {
                  remoteTypes.add(getRemoteTypeId(remote));
              }
          }
  
          return remoteTypes.toArray(new String[remoteTypes.size()]);
      }
docs: Returns a list of the remote interface types that the
  generated Stub or Tie may be 'narrowed' to, in the format
  RMI:class:0000000000000000. This includes the remote
  ejb interface class specified, and all super classes,
  excluding Object and Remote. <p>
  
  @param remoteInterface the Remote Business or Component
  interface for the ejb.