Hi Howard,

yes the SystemPropertySymbolProvider is in place but in Tapestry 5.3.6
the TapestryFilter used it to resolve system properties but now it
doesn't. As a consequence properties like
tapestry.disable-default-modules that are accessed within the
TapestryAppInitializer cannot be read and therefore have no effect.

The code in T5.4 looks like this:
SymbolProvider contextProvider = new ServletContextSymbolProvider(context);
SymbolProvider contextPathProvider = new
SingleKeySymbolProvider(SymbolConstants.CONTEXT_PATH,
context.getContextPath());
SymbolProvider combinedProvider = new
DelegatingSymbolProvider(contextPathProvider, contextProvider);

  String executionMode =
System.getProperty(SymbolConstants.EXECUTION_MODE, "production");

  TapestryAppInitializer appInitializer = new
TapestryAppInitializer(logger, combinedProvider,
                filterName, executionMode);


And the code in T5.3.6:
SymbolProvider provider = new SymbolProvider()
{
      SymbolProvider contextProvider = new
ServletContextSymbolProvider(context);
      SymbolProvider systemProvider = new SystemPropertiesSymbolProvider();

      public String valueForSymbol(String symbolName)
      {
           String contextValue = contextProvider.valueForSymbol(symbolName);
           if (contextValue != null) return contextValue;

           return systemProvider.valueForSymbol(symbolName);
       }
};

String executionMode =
System.getProperty(SymbolConstants.EXECUTION_MODE, "production");

TapestryAppInitializer appInitializer = new
TapestryAppInitializer(logger, provider, filterName, executionMode);


g,
Kris

On Thu, Dec 27, 2012 at 5:47 PM, Howard Lewis Ship <hls...@gmail.com> wrote:
> I think you are mistaken:
>
>     @Contribute(SymbolSource.class)
>     public static void
> setupStandardSymbolProviders(OrderedConfiguration<SymbolProvider>
> configuration,
>                                                     @ApplicationDefaults
>                                                     SymbolProvider
> applicationDefaults,
>
>                                                     @FactoryDefaults
>                                                     SymbolProvider
> factoryDefaults)
>     {
>         configuration.add("SystemProperties", new
> SystemPropertiesSymbolProvider(), "before:*");
>         configuration.add("EnvironmentVariables", new
> SystemEnvSymbolProvider());
>         configuration.add("ApplicationDefaults", applicationDefaults);
>         configuration.add("FactoryDefaults", factoryDefaults);
>     }
>
> Whatever you are seeing is caused by something else: a typo perhaps, or
> something preventing the system property from being visible to the running
> application.
>
>
> On Thu, Dec 27, 2012 at 8:44 AM, Howard Lewis Ship <hls...@gmail.com> wrote:
>
>> If that is true, it is an accident, possibly a bad merge.
>>
>>
>> On Thu, Dec 27, 2012 at 3:00 AM, Kristian Marinkovic <
>> kristian.marinko...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> i was just testing the 5.4-alpha-1 release and realized that the
>>> SystemPropertiesSymbolProvider is not used anymore by the
>>> TapestryFilter.
>>>
>>> I'm not sure whether it happened accidentally or on purpose?
>>>
>>> g,
>>> Kris
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator of Apache Tapestry
>>
>> The source for Tapestry training, mentoring and support. Contact me to
>> learn how I can get you up and productive in Tapestry fast!
>>
>> (971) 678-5210
>> http://howardlewisship.com
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to