You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by abangkis <ab...@gmail.com> on 2010/11/03 18:16:35 UTC

configuration precedence

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
--

Re: configuration precedence

Posted by abangkis <ab...@gmail.com>.
Ok, thanks a lot Christian :)

On Thu, Nov 4, 2010 at 3:29 AM, Christian Köberl <
tapestry.christian.koeberl@gmail.com> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


--

Re: configuration precedence

Posted by Christian Köberl <ta...@gmail.com>.

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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org