configuration precedence

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

configuration precedence

abangkis
Hi in http://tapestry.apache.org/tapestry5.1/guide/conf.html said that there
are 3 place where you can configure tapestry :
- app module
- web.xml
- passing it as a parameter to the JVM using the -D option

I was wondering what kind of precedence between this 3 option. For example
if  i set production mode to false in my app module

        configuration.add(SymbolConstants.PRODUCTION_MODE, "false");

And then set it true in the web.xml

<context-param>
 <param-name>tapestry.production-mode</param-name>
<param-value>true</param-value>
 </context-param>


Would the xml value override the appmodule configuration ?

Thanks,
Abangkis
--
Reply | Threaded
Open this post in threaded view
|

Re: configuration precedence

derkoe


abangkis wrote:
>
> Hi in http://tapestry.apache.org/tapestry5.1/guide/conf.html said that
> there
> are 3 place where you can configure tapestry :
> - app module
> - web.xml
> - passing it as a parameter to the JVM using the -D option
>
> I was wondering what kind of precedence between this 3 option.

The order is:
 - SystemProperties
 - ServletContext
 - ApplicationDefaults
 - FactoryDefaults

(that means SystemProperties overwrites ServletContext overwrites
ApplicationDefaults overwrites FactoryDefaults)

See TapestryIOCModule#contributeSymbolSource and
TapestryAppInitializer#addSyntheticSymbolSourceModule.

--
View this message in context: http://tapestry-users.832.n2.nabble.com/configuration-precedence-tp5702320p5703132.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: configuration precedence

abangkis
Ok, thanks a lot Christian :)

On Thu, Nov 4, 2010 at 3:29 AM, Christian Köberl <
[hidden email]> wrote:

>
>
> abangkis wrote:
> >
> > Hi in http://tapestry.apache.org/tapestry5.1/guide/conf.html said that
> > there
> > are 3 place where you can configure tapestry :
> > - app module
> > - web.xml
> > - passing it as a parameter to the JVM using the -D option
> >
> > I was wondering what kind of precedence between this 3 option.
>
> The order is:
>  - SystemProperties
>  - ServletContext
>  - ApplicationDefaults
>  - FactoryDefaults
>
> (that means SystemProperties overwrites ServletContext overwrites
> ApplicationDefaults overwrites FactoryDefaults)
>
> See TapestryIOCModule#contributeSymbolSource and
> TapestryAppInitializer#addSyntheticSymbolSourceModule.
>
> --
> View this message in context:
> http://tapestry-users.832.n2.nabble.com/configuration-precedence-tp5702320p5703132.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--