code: public static void mark(DeploymentUnit unit) {
          unit = DeploymentUtils.getTopDeploymentUnit(unit);
          unit.putAttachment(MARKER, Boolean.TRUE);
      }
docs: Mark the top level deployment as being a JPA deployment. If the deployment is not a top level deployment the parent is
  marked instead