Hi,

On 7/14/06, Torgeir Veimo <[EMAIL PROTECTED]> wrote:
It would be convenient to be able to construct a TransientRepository
with an InputStream or URL as argument for the repository config file
instead of a filename, when the repository config file is included as
part of a web application. This would allow the application to be
configured even when the WAR file is not unpacked.

You can do this with a bit of extra code:

   String repositoryHome = ...;
   InputStream repositoryXml = ...;
   RepositoryConfig config = RepositoryConfig.create(
       new InputSource(repositoryXml), repositoryHome);
   Repository repository = new TransientRepository(config);

It would of course be possible to add a utility constructor that
automates this. Please file a Jira enhancement request (optionally
with a patch :-) if you like. There's also a related issue (JCR-248)
for JCA.

BR,

Jukka Zitting

--
Yukatan - http://yukatan.fi/ - [EMAIL PROTECTED]
Software craftsmanship, JCR consulting, and Java development

Reply via email to