Session javaSession = null;
try {
javaSession = osgiFactory.openJavaSession();
-
for (Iterator<? extends NameVersion> it = osgiDistribution
.nameVersions(); it.hasNext();)
processNameVersion(javaSession, it.next());
+ // explicitly create the corresponding modular distribution as we
+ // have here all necessary info.
ModularDistributionFactory mdf = new ModularDistributionFactory(
- javaSession, osgiDistribution);
+ osgiFactory, osgiDistribution);
mdf.run();
- // TODO why is the created distribution not automatically indexed?
- // osgiFactory.indexNode(node);
- // javaSession.save();
-
- // Node artifact = createDistributionArtifact(javaSession,
- // osgiDistribution);
-
} catch (RepositoryException e) {
throw new SlcException("Cannot process distribution "
+ osgiDistribution, e);
if (log.isDebugEnabled())
log.debug("Run factory for : " + nv + "...");
((BndWrapper) nv).getFactory().run();
+ } else if (nv instanceof Runnable) {
+ ((Runnable) nv).run();
} else {
log.warn("Skip unsupported : " + nv);
}
} else {
- if (log.isDebugEnabled())
- log.debug("Already available : " + nv);
+ if (log.isTraceEnabled())
+ log.trace("Already available : " + nv);
}
}