See https://issues.apache.org/jira/browse/JCR-306
I've attached a patch also but it should be tested (it was done in a hurry). > Hi, > On 1/19/06, Costin Leau <[EMAIL PROTECTED]> wrote: >> I'm trying to create a RepositoryConfig object programatically >> (through Spring) in order to inject dynamic properties at runtime. It >> seems there is no 'clean' way to do this as the RepositoryConfig >> constructor has package visibility and only the Configuration parser >> can create one based on an xml file. > The RepositoryConfig (and the contained more specific component > configuration objects) are used to instantiate and configure the > actual components used by a live Jackrabbit instance. Modifying the > config objects after would not be very useful, so I assume that you > want to modify (or even generate) the configuration on fly before > passing it to the RepositoryImpl constructor. > I refactored the config classes last year but didn't change the way > the config instances are being used by Jackrabbit. In general I think > that a IoC approach (use setters to configure the Jackrabbit > components) would be better than passing config objects around and > letting the components to instantiate any subcomponents based on the > configuration. This is why I didn't really want to make the config > constructors public, otherwise we'd easily up with backwards > compatibility issues if we were to change the way configuration is > handled. > Anyhow, if you really need this, then I suppose it would be OK to > change that. Please file a Jira issue about this. If you want you > could even attach a patch to speed things up. :-) > BR, > Jukka Zitting > -- > Yukatan - http://yukatan.fi/ - [EMAIL PROTECTED] > Software craftmanship, JCR consulting, and Java development -- Best regards, Costin mailto:[EMAIL PROTECTED]
