blended.container.context.impl.internal.ContainerContextActivator.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of blended.container.context.impl Show documentation
Show all versions of blended.container.context.impl Show documentation
A simple OSGI service to provide access to the container's config directory.
The newest version!
package blended.container.context.impl.internal
import blended.container.context.api.ContainerIdentifierService
import domino.DominoActivator
import scala.util.control.NonFatal
class ContainerContextActivator extends DominoActivator {
private[this] val log = org.log4s.getLogger
whenBundleActive {
try {
val containerContext = new ContainerContextImpl()
val idSvc = new ContainerIdentifierServiceImpl(containerContext)
log.info(s"Container identifier is [${idSvc.uuid}]")
log.info(s"Profile home directory is [${containerContext.getProfileDirectory()}]")
log.info(s"Container Context properties are : ${idSvc.properties.mkString("[", ",", "]")}")
idSvc.providesService[ContainerIdentifierService]
} catch {
case NonFatal(e) =>
log.error(e.getMessage())
log.debug(e)("")
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy