Deployment class loader now inhertits from system class loader
This commit is contained in:
parent
6aebe4b9ba
commit
8fb281f4b0
2 changed files with 8 additions and 8 deletions
|
|
@ -30,7 +30,7 @@ trait BootableActorLoaderService extends Bootable with Logging {
|
||||||
}
|
}
|
||||||
val toDeploy = for (f <- DEPLOY_DIR.listFiles().toArray.toList.asInstanceOf[List[File]]) yield f.toURL
|
val toDeploy = for (f <- DEPLOY_DIR.listFiles().toArray.toList.asInstanceOf[List[File]]) yield f.toURL
|
||||||
log.info("Deploying applications from [%s]: [%s]", DEPLOY, toDeploy.toArray.toList)
|
log.info("Deploying applications from [%s]: [%s]", DEPLOY, toDeploy.toArray.toList)
|
||||||
new URLClassLoader(toDeploy.toArray, getClass.getClassLoader)
|
new URLClassLoader(toDeploy.toArray, ClassLoader.getSystemClassLoader)
|
||||||
} else if (getClass.getClassLoader.getResourceAsStream("akka.conf") ne null) {
|
} else if (getClass.getClassLoader.getResourceAsStream("akka.conf") ne null) {
|
||||||
getClass.getClassLoader
|
getClass.getClassLoader
|
||||||
} else throw new IllegalStateException(
|
} else throw new IllegalStateException(
|
||||||
|
|
@ -39,17 +39,12 @@ trait BootableActorLoaderService extends Bootable with Logging {
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract override def onLoad = {
|
abstract override def onLoad = {
|
||||||
for (loader <- applicationLoader;
|
for (loader <- applicationLoader; clazz <- BOOT_CLASSES) {
|
||||||
clazz <- BOOT_CLASSES)
|
|
||||||
{
|
|
||||||
log.info("Loading boot class [%s]", clazz)
|
log.info("Loading boot class [%s]", clazz)
|
||||||
loader.loadClass(clazz).newInstance
|
loader.loadClass(clazz).newInstance
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onLoad
|
super.onLoad
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract override def onUnload = {
|
abstract override def onUnload = ActorRegistry.shutdownAll
|
||||||
ActorRegistry.shutdownAll
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -34,6 +34,11 @@ import org.jboss.netty.handler.codec.compression.{ZlibEncoder, ZlibDecoder}
|
||||||
* RemoteNode.start(hostname, port)
|
* RemoteNode.start(hostname, port)
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
* You can specify the class loader to use to load the remote actors.
|
||||||
|
* <pre>
|
||||||
|
* RemoteNode.start(hostname, port, classLoader)
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
* If you need to create more than one, then you can use the RemoteServer:
|
* If you need to create more than one, then you can use the RemoteServer:
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue