Fix build breakage in akka-osgi-aries due to last commit
(cherry picked from commit 68b60745f2d7b30d9ccd57536cd9427b04303b84)
This commit is contained in:
parent
44c317832a
commit
608d04c050
2 changed files with 10 additions and 3 deletions
|
|
@ -15,7 +15,9 @@ import com.typesafe.config.{ Config, ConfigFactory }
|
|||
* If you're looking for a way to set up Akka using Blueprint without the namespace handler, you should use
|
||||
* [[akka.osgi.OsgiActorSystemFactory]] instead.
|
||||
*/
|
||||
class BlueprintActorSystemFactory(context: BundleContext, name: String) extends OsgiActorSystemFactory(context) {
|
||||
class BlueprintActorSystemFactory(context: BundleContext, name: String, fallbackClassLoader: Option[ClassLoader]) extends OsgiActorSystemFactory(context, fallbackClassLoader) {
|
||||
|
||||
def this(context: BundleContext, name: String) = this(context, name, Some(OsgiActorSystemFactory.akkaActorClassLoader))
|
||||
|
||||
var config: Option[String] = None
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class OsgiActorSystemFactory(val context: BundleContext, val fallbackClassLoader
|
|||
* loaded from the akka-actor bundle.
|
||||
*/
|
||||
def actorSystemConfig(context: BundleContext): Config =
|
||||
ConfigFactory.load(classloader).withFallback(ConfigFactory.defaultReference(classOf[ActorSystem].getClassLoader))
|
||||
ConfigFactory.load(classloader).withFallback(ConfigFactory.defaultReference(OsgiActorSystemFactory.akkaActorClassLoader))
|
||||
|
||||
/**
|
||||
* Determine the name for the [[akka.actor.ActorSystem]]
|
||||
|
|
@ -49,8 +49,13 @@ class OsgiActorSystemFactory(val context: BundleContext, val fallbackClassLoader
|
|||
}
|
||||
|
||||
object OsgiActorSystemFactory {
|
||||
/**
|
||||
* Class loader of akka-actor bundle.
|
||||
*/
|
||||
def akkaActorClassLoader = classOf[ActorSystem].getClassLoader
|
||||
|
||||
/*
|
||||
* Create an [[OsgiActorSystemFactory]] instance to set up Akka in an OSGi environment
|
||||
*/
|
||||
def apply(context: BundleContext): OsgiActorSystemFactory = new OsgiActorSystemFactory(context, Some(classOf[ActorSystem].getClassLoader))
|
||||
def apply(context: BundleContext): OsgiActorSystemFactory = new OsgiActorSystemFactory(context, Some(akkaActorClassLoader))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue