@Transactional
  public void create(StackEntity stack)
      throws AmbariException {
    EntityManager entityManager = entityManagerProvider.get();
    entityManager.persist(stack);
  }
Persists a new stack instance.

@param stack
         the stack to persist (not {@code null}).
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StackDAO.java