Hi all,

when I tried:
<contribution configuration-id="tapestry.state.ApplicationObjects">
  <state-object name="currentUser" scope="request">
    <invoke-factory object="service:currentUserFactory" />
  </state-object>
</contribution>
I get:
Application object 'currentUser' references uknown scope 'request' and has
been ignored.

Googling for state-object, some posts hint that request scope is there or
could be easily implemented. You might ask why I'd want a request scope as
the object isn't much of an ASO, but my use case is I only keep the
identifier of the current user around (request.getRemoteUser) and not all
pages and components access the current user object, so I'd like to minimize
the use of the session. This article (
http://earthli.com/news/view_folder.php?id=18) suggests using service with
threaded model, which I suppose I could do, but then changing between
request and session scopes also requires a different annotation (InjectState
-> InjectObject) and other configuration changes. Is there some other way of
specifying request scoped ASOs or is this perhaps implemented in 4.1? I'm
currently using 4.0.2.

Kalle

Reply via email to