You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Oliver Heger <ol...@oliver-heger.de> on 2013/03/15 21:44:11 UTC

[configuration] Re: Multi tenant with dynamiccombinedconfiguration

Hi Mario,

this is a shared list, so please prefix the subject with the component 
this question is about (I have done this).

Am 14.03.2013 15:09, schrieb Mario Giammarco:
> Hello,
> I need a multitenant configuration. I have seen the example in your web site but
> I do not understand it fully because I do not know where it reads ${sys:id}
>
> Anyway I have the info of my current tenant in apache shiro getSubject() or,
> eventually I can put in a ThreadLocal. But how can dynamiccombinedconfiguration
> read from shiro/threadlocal?

DynamicCombinedConfiguration uses a pattern string to find the correct 
configuration. This string must conform to the syntax used for variable 
substitution. Documentation can be found in the user's guide under 
"Variable Interpolation" [1] and the following section "Customizing 
Interpolation".

I assume you have to create a custom Lookup implementation which 
accesses your tenant data. The user guide has an example how a custom 
Lookup class is created. Then the pattern string has to use a prefix 
pointing to your Lookup implementation.

HTH
Oliver

[1] 
http://commons.apache.org/proper/commons-configuration//userguide/howto_basicfeatures.html#Variable_Interpolation

>
> Thanks,
> Mario
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [configuration] Re: Multi tenant with dynamiccombinedconfiguration

Posted by Mario Giammarco <mg...@gmail.com>.
Oliver Heger <oliver.heger <at> oliver-heger.de> writes:

 
> so please prefix the subject with the component 
> this question is about

Sorry, thanks.
 Documentation can be found in the user's guide under 
> "Variable Interpolation" [1] and the following section "Customizing 
> Interpolation".
>

Thanks I did not understood that interpolation was related to my task.

Thanks again,
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org