code: static String getIdlExceptionName(String exClassName, boolean mangleComponents)
      {
          StringBuilder idlName = new StringBuilder(256);
  
          idlName.append("IDL:");
          idlName.append(exClassName.replace('.', '/'));
  
          if (exClassName.endsWith("Exception"))
          {
              idlName.setLength(idlName.length() - 7);
          }
          else
          {
              idlName.append("Ex");
          }
  
          if (mangleComponents) // PM94096
          {
              for (int begin = 0; begin < idlName.length();)
              {
                  int end = idlName.indexOf("/", begin);
                  if (end == -1)
                  {
                      end = idlName.length();
                  }
  
                  if (idlName.charAt(begin) == '_')
                  {
                      idlName.insert(begin, 'J');
                      end++;
                  }
                  else
                  {
                      String comp = idlName.substring(begin, end);
                      if (isIDLKeyword(comp))
                      {
                          idlName.insert(begin, '_');
                          end++;
                      }
                  }
  
                  begin = end + 1;
              }
          }
  
          idlName.append(":1.0");
  
          return idlName.toString();
      }
docs: Returns the OMG IDL Exception name for the specified exception
  class name. <p>
  
  The name mangling performed by this method follows the OMG IDL
  specification, which basically is as follows:
  
  <ul>
  <li> replace all '.' separators with '/'.
  <li> prepend "IDL:"
  <li> replace the ending "Exception" with "Ex" or add "Ex".
  <li> (optionally) prepend 'J' if the name starts with '_',
  or prepend '_' if the component name is an IDL keyword
  <li> append ":1.0".
  </ul>
  
  For example, "javax.ejb.RemoveException" would be mapped to
  "IDL:javax/ejb/RemoveEx:1.0".
  
  @param exClassName fully qualified name of an exception class
  @param mangleComponents true if component names should be mangled