OK, thanks for the pointer to some practical examples. They do seem quite
interesting and helpful. Previously I have done something like this
String bundleDir = "my/bundles";
File dir = new File(bundleDir);
Map<String, String> config = new HashMap<String, String>();
config.put("felix.log.level", "1");
config.put("felix.auto.deploy.action", "install,update,start");
config.put(AutoProcessor.AUTO_DEPLOY_DIR_PROPERY,
dir.getAbsolutePath());
File cache = new File("felix-cache");
deleteDir(cache);
cache.mkdir();
config.put(BundleCache.CACHE_ROOTDIR_PROP, ".");
ServiceLoader<FrameworkFactory> loader =
ServiceLoader.load(FrameworkFactory.class);
FrameworkFactory factory = loader.iterator().next();
Framework fw = factory.newFramework(config);
fw.init();
BundleContext bc = fw.getBundleContext();
AutoProcessor.process(config, bc);
fw.start();
But I haven't actually touched that for some time. I shall have to
investigate your examples a bit and try it out again to refresh my memory.
Who knows, maybe I will learn to like Pax Exam :)
Teemu
2011/1/28 Bertrand Delacretaz <[email protected]>
> Hi,
>
> On Thu, Jan 27, 2011 at 9:06 PM, teemu kanstren <[email protected]>
> wrote:
> >... -integration with the environment (Felix, external bundles) using a
> > programmatic setup of Felix and programmatic control of Felix/access to
> > bundlecontext, etc....
>
> That's where pax exam would help you - we're using it in Sling, you
> can see an example at
> http://svn.apache.org/repos/asf/sling/trunk/installer/it
>
> -Bertrand
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>