title: Difference between Grails withTransaction() and a transactional service method
body: <p>I'm working on a Grails 3 application with a multi-tenant DB. Understandably, for connection pool performance reasons, any query to the multi-tenant DB needs to be in a transaction. I don't have the link but Graeme Rocher outlines it somewhere on SO.</p>
  
  <p>So it works fine when I do a:</p>
  
  <pre><code>MyDomainClass.withTransaction { status -&gt;
     doStuffHere();
  }
  </code></pre>
  
  <p>but when I move that to a service method</p>
  
  <pre><code>@Transactional
  class MyService {
      doStuffHere() {
      }
  }
  </code></pre>
  
  <p>that method throws a "No session found" error as it would if I wasn't using the withTransaction() closure above.</p>
  
  <p>Anybody know why the difference? Is there something else I should set on the service? It seems redundant to use a withTransaction() inside the service's doStuffHere() method above.</p>