title: Grails Session scope for service not working as expected
body: <p>I'm making a web app that stores reports of various types as domain objects, so I have a domain object <code>HeadOfHousehold</code> which contains name data, and references to other domain objects such as the <code>reports</code>, <code>addresses</code>, and any dependants.  I am trying to build a list of recently viewed/created <code>HeadOfHousehold</code> objects.  After multiple Google searches, and scouring the manual, it appeared that a service would be an appropriate solution.  So I created <code>ClientListService</code>:</p>
  
  <pre><code>@Transactional
  class ClientListService {
      static scope = "session"
      String message // right now I'll be happy to just see the same message across 
                    // pages I can add a list and manipulate it later.
  }
  </code></pre>
  
  <p>I thought I could then reference it in my various controllers, and it would persist Something like this:</p>
  
  <pre><code>def clientListService
  
  def index(){
      hasSearched = false
      clientListService = new ClientListService(message: "Hello")
      [errorMessage: params.errorMessage, clients:clientListService]
  
  }
  </code></pre>
  
  <p>Which should be available in a later controller:</p>
  
  <pre><code>class HeadOfHouseHoldController {
       def clientListService
      def index() {
  
          [customer: HeadOfHousehold.get(params.id), clients: clientListService]
      }//...
  </code></pre>
  
  <p>However when I try to get the message, it appears as if the object is null. 
  From my index.gsp:</p>
  
  <pre><code>***************${clients?.message}********************
  </code></pre>
  
  <p>So I don't know if I am not defining session properly (I'm not doing anything special to do so), if I'm misunderstanding how the session scope works, or something else.  I do see the proper message on the original page which has defined the object, however I don't see it on any subsequent pages.</p>
  
  <p>Also, I'm not sure if this is the proper way to go about this; right now all I really need is the list of <code>HeadOfHouseholds</code> that I would need (so I can add to the list from other pages), however I can see possibly adding other logic and items into such a class.</p>