There's also a symbol that defines the default strategy when @Persist
is used without specifying a strategy; this could allow you to easily
switch over your application to use your new strategy without editing
existing pages and components.

On Wed, Feb 22, 2012 at 9:45 AM, Thiago H. de Paula Figueiredo
<thiag...@gmail.com> wrote:
> On Wed, 22 Feb 2012 14:07:48 -0200, tompeter <i...@tomkrause.com> wrote:
>
>> Hi,
>
>
> Hi!
>
>
>> I am also trying to use an alternate storage strategy but Tapestry doesn't
>> load mine.
>> Could you give me a hint on what I did wrong?
>>
>> 1. I created my own Strategy in TPGStatePersistencyStrategy.class which
>> implements ApplicationStatePersistenceStrategy and extends
>> SessionApplicationStatePersistenceStrategy
>> 2. I added the following line to my AppModule:
>> binder.bind( ApplicationStatePersistenceStrategy.class,
>> TPGStatePersistencyStrategy.class);
>
>
> You've just created an implementation and declared a service. You missed
> adding it to the ApplicationStatePersistenceStrategySource configuration.
> Here's how the HttpSession-backed one is added in the Tapestry sources:
>
>    public void contributeApplicationStatePersistenceStrategySource(
>            MappedConfiguration<String, ApplicationStatePersistenceStrategy>
> configuration,
>
>            @Local
>            ApplicationStatePersistenceStrategy sessionStategy)
>    {
>        configuration.add("session", sessionStategy);
>
>    }
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to