You can use the @ApplicationState annotation on a field to mark it as
an application-wide state object.  It will be stored in the
HttpSession.

Most of the infrastructure for storing such an object in the
ServletContext is available; see the
ApplicationStatePersistenceStrategySource service.

What's missing is to define a "context" application state persistence
strategy, contribute it to the service, and contribute a
ApplicationStateContribution to the ApplicationStateManager service to
defne that your ASO belongs in the context, not the (default) session.

Again, these are things that will eventually be cooked right into
Tapestry (hint: add a JIRA issue) but in the meantime, can be added on
an ad-hoc basis.  Now that's what I call Dependency Injection!

Side note: and that's why we need T5 IoC and not Guice or Spring.
Those don't have a concept similar to Tapestry's service configuration
/ contribution system.

On 7/11/07, Michael Bernagou <[EMAIL PROTECTED]> wrote:
Hi,

I search into the mailing list and didn't find how to declare an object such
as an ArrayList at the context level.
ASO is for session and @Persist for requests, but what about the
Application/Context level?

My site needs to maintains a list of users with their status without having
to reload it from the database at each new session created.

Thanks

M.



--
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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to