"request" is not implemented.

You can achieve the same result by creating a HiveMind service with a
"threaded" scope (i.e., one instance per thread).

On 4/23/07, Kalle Korhonen <[EMAIL PROTECTED]> wrote:

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




--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

Reply via email to