Hi,

On Tue, Dec 9, 2008 at 1:14 PM,  <[EMAIL PROTECTED]> wrote:
> How to configure RepositoryConfig so that It can take variables like
> {repo.home} from my custom Properties variablerather tahn System
> properties
>
> I have a component based on Jackrabbit and require it to connect to
> different database and therefore want the runtime change of the Properties
> such as repo.home and such variables and therefore require to pass the
> Properties file but can't find any method relating to that

You can instantiate a RepositoryConfigurationParser [1] with a custom
set of properties, and use that instance to parse the repository
configuration file. Something like this:

    Properties properties = ...; // Your custom set of properties
    RepositoryConfigurationParser parser =
        new RepositoryConfigurationParser(properties);
    RepositoryConfig config = parser.parseRepositoryConfig(...);
    Repository repository = RepositoryImpl.create(config);

[1] 
http://jackrabbit.apache.org/api/1.5/org/apache/jackrabbit/core/config/RepositoryConfigurationParser.html

BR,

Jukka Zitting

Reply via email to