All Downloads are FREE. Search and download functionalities are using the official Maven repository.

blended.container.context.impl.internal.ContainerContextActivator.scala Maven / Gradle / Ivy

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