docs: private void validateEJBBindings(BeanMetaData bmd) // F743-36290.1
      throws EJBConfigurationException
      {
          // Check out the binding(s) that have been specified for this bean and/or it's home.
          //
          // When business interface bindings are supplied there needs to be a matching business interface
          // class for each of the bindings.   Also, local buisiness interface bindgins must begin with
          // "ejblocal:" and remote business interface bindings must NOT begin with "ejblocal:".
          //
          // If a home binding has been specified, there needs to be a matcthing home interface.  Also,
          // local home bindings must begin with "ejblocal:", and remote home bindings must NOT begin with "ejblocal:".
          //
          // Since all of the checks in this section only apply to EJB3 beans so we will throw an exception
          // and fail application start if any of the listed configuration errors are detected.
  
          if (bmd.businessInterfaceJndiBindingNames != null)
          {
              for (Map.Entry<String, String> entry : bmd.businessInterfaceJndiBindingNames.entrySet())
              {
                  String bindingInterface = entry.getKey();
                  String bindingValue = entry.getValue();
                  boolean matchFound = false;
  
                  String[] localBusinessInterfaces = bmd.ivBusinessLocalInterfaceClassNames;
                  if (localBusinessInterfaces != null)
                  {
                      for (String localBusinessInterface : localBusinessInterfaces)
                      {
                          if (bindingInterface.equals(localBusinessInterface))
                          {
                              matchFound = true;
  
                              // Also, make sure binding for this local business interface begins with ejblocal:
                              if (!bindingValue.startsWith(EJBLOCAL_BINDING_PREFIX))
                              {
                                  Tr.error(tc, "IMPROPER_LOCAL_JNDI_BINDING_PREFIX_CNTR0136E",
                                           new Object[] { bmd.enterpriseBeanName,
                                                         bmd._moduleMetaData.ivName,
                                                         bindingValue });
                                  throw new EJBConfigurationException("The specific Java Naming and Directory Interface (JNDI)" +
                                                                      " binding name provided for a local bean does not begin with" +
                                                                      " ejblocal:. The " + bindingValue +
                                                                      " binding name that is specified for the " + bmd.enterpriseBeanName +
                                                                      " bean in the " + bmd._moduleMetaData.ivName +
                                                                      " module does not begin with ejblocal:.");
                              }
                          }
                      }
                  }
  
                  String[] remoteBusinessInterfaces = bmd.ivBusinessRemoteInterfaceClassNames;
                  if (remoteBusinessInterfaces != null)
                  {
                      for (String remoteBusinessInterface : remoteBusinessInterfaces)
                      {
                          if (bindingInterface.equals(remoteBusinessInterface))
                          {
                              matchFound = true;
  
                              // Also, make sure binding for this remote business interface does NOT begin with ejblocal:
                              if (bindingValue.startsWith(EJBLOCAL_BINDING_PREFIX))
                              {
                                  Tr.error(tc, "IMPROPER_REMOTE_JNDI_BINDING_PREFIX_CNTR0137E",
                                           new Object[] { bmd.enterpriseBeanName,
                                                         bmd._moduleMetaData.ivName,
                                                         bindingValue });
                                  throw new EJBConfigurationException("The specific Java Naming and Directory Interface (JNDI)" +
                                                                      " binding name that is provided for a remote" +
                                                                      " bean begins with ejblocal:.  The " + bindingValue +
                                                                      " remote binding name that is specified for the " + bmd.enterpriseBeanName +
                                                                      " bean in the " + bmd._moduleMetaData.ivName +
                                                                      " module cannot begin with ejblocal:.");
                              }
                          }
                      }
                  }
  
                  if (bmd.ivLocalBean) // d617690
                  {
                      if (bindingInterface.equals(bmd.enterpriseBeanClassName)) // F743-1756.3
                      {
                          matchFound = true;
  
                          // Also, make sure binding for this local interface begins with ejblocal:
                          if (!bindingValue.startsWith(EJBLOCAL_BINDING_PREFIX))
                          {
                              Tr.error(tc, "IMPROPER_LOCAL_JNDI_BINDING_PREFIX_CNTR0136E",
                                       new Object[] { bmd.enterpriseBeanName,
                                                     bmd._moduleMetaData.ivName,
                                                     bindingValue });
                              throw new EJBConfigurationException("The specific Java Naming and Directory Interface (JNDI)" +
                                                                  " binding name provided for a local bean does not begin with" +
                                                                  " ejblocal:. The " + bindingValue +
                                                                  " binding name that is specified for the " + bmd.enterpriseBeanName +
                                                                  " bean in the " + bmd._moduleMetaData.ivName +
                                                                  " module does not begin with ejblocal:.");
                          }
                      }
                  }
  
                  if (!matchFound)
                  {
                      Tr.error(tc, "JNDI_BINDING_HAS_NO_CORRESPONDING_BUSINESS_INTERFACE_CLASS_CNTR0140E",
                               new Object[] { bmd.enterpriseBeanName,
                                             bmd._moduleMetaData.ivName,
                                             bindingInterface });
                      throw new EJBConfigurationException("The " + bmd.enterpriseBeanName +
                                                          " bean in the " + bmd._moduleMetaData.ivName +
                                                          " module has specified the [" + bindingInterface +
                                                          "] business interface, which does not exist" +
                                                          " for a business interface Java Naming and Directory Interface (JNDI) binding.");
                  }
              }
          }
  
          if (bmd.localHomeJndiBindingName != null)
          {
              if (bmd.localHomeInterfaceClassName == null)
              {
                  Tr.error(tc, "JNDI_BINDING_HAS_NO_CORRESPONDING_HOME_INTERFACE_CLASS_CNTR0141E",
                           new Object[] { bmd.enterpriseBeanName, bmd._moduleMetaData.ivName });
                  throw new EJBConfigurationException("The " + bmd.enterpriseBeanName +
                                                      " bean in the " + bmd._moduleMetaData.ivName +
                                                      " module has specified a home Java Naming and Directory Interface (JNDI)" +
                                                      " binding. The binding does not have a matching home interface class.");
              }
  
              if (!bmd.localHomeJndiBindingName.startsWith(EJBLOCAL_BINDING_PREFIX))
              {
                  Tr.error(tc, "IMPROPER_LOCAL_JNDI_BINDING_PREFIX_CNTR0136E",
                           new Object[] { bmd.enterpriseBeanName,
                                         bmd._moduleMetaData.ivName,
                                         bmd.localHomeJndiBindingName });
                  throw new EJBConfigurationException("The specific Java Naming and Directory Interface (JNDI)" +
                                                      " binding name provided for a local home does not begin with" +
                                                      " ejblocal:. The " + bmd.localHomeJndiBindingName +
                                                      " binding name that is specified for the home of " + bmd.enterpriseBeanName +
                                                      " bean in the " + bmd._moduleMetaData.ivName +
                                                      " module does not begin with ejblocal:.");
              }
          }
  
          if (bmd.remoteHomeJndiBindingName != null)
          {
              if (bmd.homeInterfaceClassName == null)
              {
                  Tr.error(tc, "JNDI_BINDING_HAS_NO_CORRESPONDING_HOME_INTERFACE_CLASS_CNTR0141E",
                           new Object[] { bmd.enterpriseBeanName, bmd._moduleMetaData.ivName });
                  throw new EJBConfigurationException("The " + bmd.enterpriseBeanName +
                                                      " bean in the " + bmd._moduleMetaData.ivName +
                                                      " module has specified a home Java Naming and Directory Interface (JNDI)" +
                                                      " binding. The binding does not have a matching home interface class.");
              }
  
              if (bmd.remoteHomeJndiBindingName.startsWith(EJBLOCAL_BINDING_PREFIX))
              {
                  Tr.error(tc, "IMPROPER_REMOTE_JNDI_BINDING_PREFIX_CNTR0137E",
                           new Object[] { bmd.enterpriseBeanName,
                                         bmd._moduleMetaData.ivName,
                                         bmd.remoteHomeJndiBindingName });
                  throw new EJBConfigurationException("The specific Java Naming and Directory Interface (JNDI)" +
                                                      " binding name that is provided for a remote" +
                                                      " home begins with ejblocal:.  The " + bmd.remoteHomeJndiBindingName +
                                                      " remote binding name that is specified for the home of " + bmd.enterpriseBeanName +
                                                      " bean in the " + bmd._moduleMetaData.ivName +
                                                      " module cannot begin with ejblocal:.");
              }
          }
      }