code: public void assemble(Document document, EJBInfo ejbInfo, String ejbLinkValue) {
          Element ejbJarType = document.getDocumentElement();
          Element entBeansType = DomUtils.getChildElementByName(ejbJarType, "enterprise-beans");
  
          String beanType = ejbInfo.getBeanType();
          if (!("Session".equals(beanType) || "Entity".equals(beanType)))
          {
               throw new UnsupportedOperationException("Unknown EJBControl type: "
                      + ejbInfo.getBeanType()
                      + beanType
                      + " Expected 'Session' or 'Entity'");
          }
  
          /* TODO: Currently, we update all session and entity bean entries with a ejb ref, even
             if the control is not used from the ejb.  We should probably only add an ejb ref
             to a given session or entity bean if the control is referenced by it. */
          List sessionEjbList = DomUtils.getChildElementsByName(entBeansType, "session");
          insertEJBRefsInEJBJar(document, ejbInfo, ejbLinkValue, sessionEjbList);
  
          List entityEjbList = DomUtils.getChildElementsByName(entBeansType, "entity");
          insertEJBRefsInEJBJar(document, ejbInfo, ejbLinkValue, entityEjbList);
      }
docs: Assemble entry point.  Based on the type of EJBControl build a list of
  DOM elements of the property type (either session or entity) and process
  each entry in the list.
  
  @param document     DOM tree of an ejb-jar.xml file.
  @param ejbInfo      Contains information about the EJB control.
  @param ejbLinkValue The ejb-link value for the EJBs.