On Fri, May 2, 2008 at 8:45 AM, James Carman <[EMAIL PROTECTED]> wrote:
> When I was reading the discussion about session.dirty
>  
> (http://www.nabble.com/What-is-session.dirty%28%29-for--td17021032.html#a17021032)
>  on the users list, I came up with an idea.  Perhaps we could come up
>  with a set of reusable AspectJ aspects for these sort of cases.  For
>  this particular case, we'd introduce an annotation like @SessionData
>  or something and create an aspect that says "anytime a setter is
>  called on a class with the @SessionData annotation, we call
>  session.dirty()".  Now, this would be a separate subproject of Wicket
>  so that it's not required or anything.  Then, if folks wanted to, they
>  could weave that into their own classes to make sure that they're
>  taking care of their session data properly (in a cluster).  I can
>  imagine that we might be able to do the on-before-first-render stuff
>  with aspects, too.  Again, the aspects would be optional, kind of like
>  how the spring-aspects (for @Configurable and @Transactional) are
>  optional, but very useful.


Anything AOP would complicate our building process and would mean
additional dependencies. I wouldn't be crazy about that. Also, the
ideal case would be that you could just extend the session and provide
your properties without having to even know about the dirty call in
setters. There should be simpler solutions than introducing AOP and/
or annotations.

Can't we create create a proxy object for the session right after it
is created that adds calling dirty() to the setters it finds? Maybe
optional?

Eelco

Reply via email to