title: Spring Data For MongoDB
body: <p>I am using <code>mongodb with spring mvc</code> for a REST API. I have a controller which adds comments for events. This controller use a method of my event service. And implementation of them are below. However It seems to me as if my mongodb connection works without <code>transaction</code>. I have <code>1 insert</code> and <code>1 update</code> in that my controller adding comment. If update of event throws an error, the request commits inserting.Why is it not doing rollback? How can I fix this problem?</p>
  
  <pre><code>public Comments addComment(Comments comment) throws Exception{
      comment.setCommentDate(SowUtil.getDateTimeDB());
      comment.setCommenter(personService.findPersonById("531cc90e3c37b20bef47dfc7"));
      mongoTemplate.insert(comment);
      Events adv = findEventById(comment.getEventId());
      adv.addComment(comment);
      eventService.save(adv);
      return comment;
  }
  </code></pre>