Thanks a lot for your help!

I was asuming I could add my Strategy to the configuration like this:

   public void contributeApplicationStatePers**istenceStrategySource(
           MappedConfiguration<String, MyStatePersistenceStr**ategy>
configuration,

           @Local
           MyStatePersistenceStr**ategy sessionStategy)
   {
       configuration.add("mysession", sessionStategy);
   }


This doesn't work though. Sorry to ask, but could you give me some more
info's on how I get my Strategy added?


Thank you so much!


All best,
Tom



2012/2/22 Howard Lewis Ship [via Tapestry] <
ml-node+s1045711n5505844...@n5.nabble.com>

> 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
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5505844&i=0>>
> wrote:
>
> > On Wed, 22 Feb 2012 14:07:48 -0200, tompeter <[hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=5505844&i=1>>
> 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: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=5505844&i=2>
> > For additional commands, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=5505844&i=3>
> >
>
>
>
> --
> 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: [hidden 
> email]<http://user/SendEmail.jtp?type=node&node=5505844&i=4>
> For additional commands, e-mail: [hidden 
> email]<http://user/SendEmail.jtp?type=node&node=5505844&i=5>
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://tapestry.1045711.n5.nabble.com/Best-practise-to-extend-tapestry-5-so-http-sessions-are-stored-in-db-tp2422175p5505844.html
>  To unsubscribe from Best practise to extend tapestry 5 so http sessions
> are stored in db, click 
> here<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2422175&code=aW5mb0B0b21rcmF1c2UuY29tfDI0MjIxNzV8LTQyODI5ODI4>
> .
> NAML<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
::::::::::::::::::::::::::::::::::::::::

Tom Krause
SONGDADDY

phone: +491791324407
mail: tom.kra...@songdaddy.com
twitter: @songdaddy_
www.songdaddy.com


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Best-practise-to-extend-tapestry-5-so-http-sessions-are-stored-in-db-tp2422175p5505904.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Reply via email to