Hi, On Tue, Jun 15, 2010 at 7:45 AM, Carsten Ziegeler <[email protected]> wrote: >> ...Other than configuring the embedded Jackrabbit server, couldn't you use >> jcrinstall for this? > jcrinstall is nice if you have a somehow running system and a > repository. In my use cases I don't even have a repository but I'm using > launchpad to start my OSGi app :)...
You should be able to use the osgi controller part of jcrinstall only, that doesn't require a repository (it has very minimal dependencies actually) and the API is very simple. The interface and class found in the o.a.s.osgi.installer package [1] are the API to that module. To create configs, you'd just need to use the InstallableResource(String url, Dictionary<String, Object> d) constructor to define a config, and OsgiInstaller.registerResources or OsgiInstaller. addResource to inject them. The OSGi controller uses digests computed on the supplied Dictionary objects to find out if a config has changed and must be updated. There might be conflicts if you modify the config later via other means, but solving that would solve it for jcrinstall as well, instead of being a separate solution. -Bertrand [1] http://svn.apache.org/repos/asf/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/
