Hi all,

I have the following folders structure

/payex.properties

/prod/payex.properties
/dev/payex.properties

My idea is for the tapestry to always load the root (/payex.properties) and
then give the execution mode to load one of the payex.properties that
contain environment specific fields. My first initial guess was to try
something like

    public static void contributeSymbolSource(final
OrderedConfiguration<SymbolProvider> configuration,
@Symbol(SymbolConstants.EXECUTION_MODE) String environment) {
        configuration.add("PayexSymbols", new
ClasspathResourceSymbolProvider("payex.properties"),
"before:ApplicationDefaults");
        configuration.add("PayexSymbols", new
ClasspathResourceSymbolProvider(environment + "/payex.properties"),
"before:ApplicationDefaults");
    }

But I got the following exception.

java.lang.IllegalStateException: Construction of service 'SymbolSource' has
failed due to recursion: the service depends on itself in some way. Please
check org.apache.tapestry5.ioc.internal.services.SymbolSourceImpl(List) (at
SymbolSourceImpl.java:198) via
org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at
TapestryIOCModule.java:49) for references to another service that is itself
dependent on service 'SymbolSource'.

I guess I can't use @Symbol at the same time I want to contribute to it

Is my hierarchy even possible to achieve given all of this?
-- 
Sincerely
*Boris Horvat*

Reply via email to