On Thu, 06 Jan 2011 17:21:32 -0200, Michael Gentry <mgen...@masslight.net>
wrote:
I'd like to suggest that @SessionState be deprecated in favor of
@SessionAttribute in the future.
I'm completely against. @SessionState has been used as it is since Tapetry
5 exists. I think @SessionAttribute is dangerous for almost the same
arguments you use against @SessionState. One thing that I loved in
Tapestry, coming from a Struts (argh!) background, was that @SessionState
avoids the problem of having different parts of the code ending up using
the same session attribute name for very different things (including
storing different object types). @SessionState is type-safe,
@SessionAttribute isn't (if one page stores a string in the "user" session
attribute and then another one has a @SessionAttribute("user") private
User user; field, unless you provided a CoercionTuple<String, User>, it
will probably fail).
Conclusion: what is a heaven for one can be a hell for another. :)
--
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