Permalink
Browse files

Fix build breakage in akka-osgi-aries due to last commit

(cherry picked from commit 68b6074)
  • Loading branch information...
mpilquist authored and patriknw committed Nov 16, 2012
1 parent 44c3178 commit 608d04c0501dcbd075e62ba2fe2351133cf46430
@@ -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))
}

0 comments on commit 608d04c

Please sign in to comment.