code: public synchronized JNDIResourceModel createUnique(Set<ProjectModel> applications, String jndiName)
      {
          JNDIResourceModel jndiResourceModel = getUniqueByProperty(JNDIResourceModel.JNDI_LOCATION, jndiName);
          if (jndiResourceModel == null)
          {
              jndiResourceModel = super.create();
              jndiResourceModel.setJndiLocation(jndiName);
              jndiResourceModel.setApplications(applications);
          }
          else
          {
              for (ProjectModel application : applications)
              {
                  if (!jndiResourceModel.isAssociatedWithApplication(application))
                      jndiResourceModel.addApplication(application);
              }
          }
          return jndiResourceModel;
      }
docs: Create unique; if existing convert an existing {@link JNDIResourceModel} if one exists.