Sounds good. I don't think it makes the contract fuzzy if we support
both an annotation and detach() btw. I would see the annotation as
optional. In fact, I wouldn't be against annotations being optional
anywhere (saves some more rewriting for WIA too).

Eelco


On 11/2/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
should we extend the support of these annotations to behaviors and models?

behaviors can benefit from all 4, while models can benefit from
attach/detach ones

im not sure where imodel.detach() would fit then. i would love to keep it
since it makes the contract clear, but it is a bit weird if we support both.

-igor


On 10/30/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
>
> On 10/30/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> >
> > On 10/29/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > >
> > > yes private or package scope methods should always be called
> >
> >
> > not quiet, package scoped methods can still have overrides, see
> > ReflectionUtils.overrides(Method,Method) for some nasty code :)
>
>
>
> ahh you are right.
> I don't use package scope things a lot but
>
> Package y
> class A { void test(){}}
> class B extends A { int test(){return 1;}}
>
> fails. (java 4 compile covariant not supported)
>
> but move B to another package:
> Package z
> class B extends A { int test(){return 1;}}
>
> works..
> And then ofcourse the A.test() is nowhere to be found..
>
> so yes if in the same package this works:
> void test()
>     {
>         super.test();
>         return;
>     }
>
> Then it is really as it is protected (instead of what you also could thing
> private)
>
>
>
>
> >
> > the initial implementation of this is in. it only works on Component so
> > far,
> > but there is soom room for improvement i think.
> >
> > for example both requestcycle and session have detach() but no attach(),
> > so
> > we can extend annotation support to those as well.
>
>
> RequestCycle doesnt have a detach() (only a private one that is our one
> cleanup method)
> RC has onBeginRequest and onEndRequest.
>
> Session does have detach. But WebSession also have attach.. Why that is i
> don't know....
>
>
> johanm
>
>


Reply via email to