code: private Node findEjbLocalRefInsertPoint(Element parent) {
  
          Element e = DomUtils.getChildElementByName(parent, "service-ref");
          if (e != null)
              return e;
  
          e = DomUtils.getChildElementByName(parent, "resource-ref");
          if (e != null)
              return e;
  
          e = DomUtils.getChildElementByName(parent, "resource-env-ref");
          if (e != null)
              return e;
  
          e = DomUtils.getChildElementByName(parent, "message-destination-ref");
          if (e != null)
              return e;
  
          e = DomUtils.getChildElementByName(parent, "security-role-ref");
          if (e != null)
              return e;
  
          e = DomUtils.getChildElementByName(parent, "security-identity");
          if (e != null)
              return e;
  
          // only applies to entity beans
          e = DomUtils.getChildElementByName(parent, "query");
          if (e != null)
              return e;
  
          return null;
      }
docs: The local ref must be inserted into the ejb-jar file at the proper
  location based on the ejb-jar schema definition. Check for elements which
  can immediatly FOLLOW an ejb-ref from the closest to farthest as
  defined by the schema.
  
  @param parent The 'session' or 'entity' XML element.
  @return A suitable node to insert the ejb-local-ref BEFORE.