Mike McNally | 3 Dec 17:17

Interceptor invocation order

When Interceptors are picked up via the Extension feature, is it the
case that ordering of invocation is determined by class name? I'll
check the source but I get dizzy in there sometimes and I might get
confused.

--

-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Nathan Maves | 3 Dec 17:46

Re: Interceptor invocation order

Interceptors loaded by the stripes extension package are not in any
order.  If you really need order then you need to move those
interceptors out of the extension package or mark them with
@DontAutoLoad and list them in the web.xml.

Nathan

On Wed, Dec 3, 2008 at 9:20 AM, Mike McNally <emmecinque@...> wrote:
> When Interceptors are picked up via the Extension feature, is it the
> case that ordering of invocation is determined by class name? I'll
> check the source but I get dizzy in there sometimes and I might get
> confused.
>
> --
> Turtle, turtle, on the ground,
> Pink and shiny, turn around.
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@...
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
(Continue reading)

Levi Hoogenberg | 3 Dec 19:54

Re: Interceptor invocation order

I've been thinking about this lately - an <at> AutoloadOrder(int value) would solve this quite nicely (and has the added benefit of being so generic that it could be used for other autoloaded, ordered configurable components as well).

  Levi

On Wed, Dec 3, 2008 at 5:46 PM, Nathan Maves <nathan.maves-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Interceptors loaded by the stripes extension package are not in any
order.  If you really need order then you need to move those
interceptors out of the extension package or mark them with
<at> DontAutoLoad and list them in the web.xml.

Nathan

On Wed, Dec 3, 2008 at 9:20 AM, Mike McNally <emmecinque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> When Interceptors are picked up via the Extension feature, is it the
> case that ordering of invocation is determined by class name? I'll
> check the source but I get dizzy in there sometimes and I might get
> confused.
>
> --
> Turtle, turtle, on the ground,
> Pink and shiny, turn around.
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Stripes-users mailing list
> Stripes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
Stripes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/stripes-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users
Favicon

Re: Interceptor invocation order

On 03-12-2008 at 19:54, Levi Hoogenberg wrote:
> I've been thinking about this lately - an @AutoloadOrder(int value) would
> solve this quite nicely (and has the added benefit of being so generic that
> it could be used for other autoloaded, ordered configurable components as
> well).

All true.

On the other hand, the order of interceptors is only relevant when there are
dependencies. It is therefore more useful to have this annotation instead:
@AutoloadDependencies(Class<? extends Interceptor>[] dependencies)

And even then, the dependent interceptors are usually your own (and project
dependent). As a result, I find it just as easy to define the interceptors in
web.xml myself.

Oscar

--

-- 
   ,-_
  /() ) Oscar Westra van holthe - Kind      http://www.xs4all.nl/~kindop/
 (__ (
=/  ()  Don't let your boss fuck you; that's anti-capitalist.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Levi Hoogenberg | 4 Dec 08:31

Re: Interceptor invocation order

Sure, that's not very hard. But then again, I found configuring Stripes before 1.5 not that hard either. The way I see it is that Stripes offers an alternative way to do things (configuration) with [I'm exaggerating] limited functionality (it's no longer possible to secify interceptor order). I'm not suggesting anything grand, just a small improvement to avoid having to revert to the old way of doing things (editing web.xml).

I'm not sure whether I agree that dependencies would be better since the only interceptors are most likely to belong to the application. See for example the stripes-guicer plugin - that interceptor doesn't have any dependencies; all it cares for is that it's the first one to run.

  Levi

On Wed, Dec 3, 2008 at 8:32 PM, Oscar Westra van Holthe - Kind <kindop-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org> wrote:
On 03-12-2008 at 19:54, Levi Hoogenberg wrote:
> I've been thinking about this lately - an <at> AutoloadOrder(int value) would
> solve this quite nicely (and has the added benefit of being so generic that
> it could be used for other autoloaded, ordered configurable components as
> well).

All true.

On the other hand, the order of interceptors is only relevant when there are
dependencies. It is therefore more useful to have this annotation instead:
<at> AutoloadDependencies(Class<? extends Interceptor>[] dependencies)

And even then, the dependent interceptors are usually your own (and project
dependent). As a result, I find it just as easy to define the interceptors in
web.xml myself.


Oscar


--
  ,-_
 /() ) Oscar Westra van holthe - Kind      http://www.xs4all.nl/~kindop/
 (__ (
=/  ()  Don't let your boss fuck you; that's anti-capitalist.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
Stripes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/stripes-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users
Gregg Bolinger | 8 Dec 02:01

Re: Interceptor invocation order

I'm all for less XML but for me that doesn't automatically equate to more Annotations.  There should be a nice balance and when convention can be used or an existing annotation improved upon, I'm for that rather than adding something brand spankin new.

Would it be possible to add an attribute to the <at> Intercepts annotation?

<at> Intercepts(value = LifecycleStage.HandlerResolution, order = 1)

Personally I'm fine with doing it in the web.xml but I also understand not wanting to, especially if you have a ton of interceptors to deal with.

Gregg


On Thu, Dec 4, 2008 at 1:31 AM, Levi Hoogenberg <levihoogenberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Sure, that's not very hard. But then again, I found configuring Stripes before 1.5 not that hard either. The way I see it is that Stripes offers an alternative way to do things (configuration) with [I'm exaggerating] limited functionality (it's no longer possible to secify interceptor order). I'm not suggesting anything grand, just a small improvement to avoid having to revert to the old way of doing things (editing web.xml).

I'm not sure whether I agree that dependencies would be better since the only interceptors are most likely to belong to the application. See for example the stripes-guicer plugin - that interceptor doesn't have any dependencies; all it cares for is that it's the first one to run.

  Levi


On Wed, Dec 3, 2008 at 8:32 PM, Oscar Westra van Holthe - Kind <kindop-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org> wrote:
On 03-12-2008 at 19:54, Levi Hoogenberg wrote:
> I've been thinking about this lately - an <at> AutoloadOrder(int value) would
> solve this quite nicely (and has the added benefit of being so generic that
> it could be used for other autoloaded, ordered configurable components as
> well).

All true.

On the other hand, the order of interceptors is only relevant when there are
dependencies. It is therefore more useful to have this annotation instead:
<at> AutoloadDependencies(Class<? extends Interceptor>[] dependencies)

And even then, the dependent interceptors are usually your own (and project
dependent). As a result, I find it just as easy to define the interceptors in
web.xml myself.


Oscar


--
  ,-_
 /() ) Oscar Westra van holthe - Kind      http://www.xs4all.nl/~kindop/
 (__ (
=/  ()  Don't let your boss fuck you; that's anti-capitalist.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
Stripes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/stripes-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
Stripes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users

Gmane