struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: dynamic interceptor insertion
Date Wed, 02 Jul 2014 18:25:28 GMT

> Date: Wed, 2 Jul 2014 11:38:13 -0600
> Subject: Re: dynamic interceptor insertion
> From: ken.mcwilliams@gmail.com
> To: dev@struts.apache.org
> 
> This is somethings I've wanted to do (dynamically change the interceptor
> stack), I'm not at a development machine so have not checked the
> plausibility of the following but would like input:
> 
> Is it possible to create a custom ActionInvocation object, for this purpose?
> Is it possible to essentially recreate the functionality of
> ActionInvocation within an interceptor which then delegates to other
> interceptors?
> 
> 
> On Wed, Jul 2, 2014 at 9:09 AM, Lukasz Lenart <lukaszlenart@apache.org>
> wrote:
> 
> > 2014-06-27 10:44 GMT+02:00 Gildas de Cadoudal <
> > gildas.de.cadoudal@gmail.com>:
> > > Hi all,
> > >
> > > I would like to dynamically insert an interceptor to a specific place
> > > in existing stack.
> > > Of course I also like the stacks referencing the one where I insert
> > > the interceptor also take advantage of this configuration change.
> > >
> > > Practicable to do this? I started to look on the side of
> > > PackageProvider, but I can not find sufficiently complete
> > > documentation allowing me to do this.
> >
> > Without large changes it isn't possible to change interceptor stack at
> > runtime, it should be only possible to create a new stack with
> > PackageProvider
MG>as borne out by testcase com.opensymphony.xwork2.config.ConfigurationTest
   public void testInitForPackageProviders() {
        loadConfigurationProviders(new StubConfigurationProvider() {
            @Override
            public void register(ContainerBuilder builder,
                    LocatableProperties props) throws ConfigurationException {
                builder.factory(PackageProvider.class, "foo", MyPackageProvider.class);
            }
        });
MG>ken are there reasons why you would not want to use interceptor stack?
> >
> >
> > Regards
> > --
> > Ɓukasz
> > + 48 606 323 122 http://www.lenart.org.pl/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message