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
|
||||
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) {
|
||||
getClass.getClassLoader
|
||||
} else throw new IllegalStateException(
|
||||
|
|
@ -39,17 +39,12 @@ trait BootableActorLoaderService extends Bootable with Logging {
|
|||
}
|
||||
|
||||
abstract override def onLoad = {
|
||||
for (loader <- applicationLoader;
|
||||
clazz <- BOOT_CLASSES)
|
||||
{
|
||||
for (loader <- applicationLoader; clazz <- BOOT_CLASSES) {
|
||||
log.info("Loading boot class [%s]", clazz)
|
||||
loader.loadClass(clazz).newInstance
|
||||
}
|
||||
|
||||
super.onLoad
|
||||
}
|
||||
|
||||
abstract override def onUnload = {
|
||||
ActorRegistry.shutdownAll
|
||||
}
|
||||
abstract override def onUnload = ActorRegistry.shutdownAll
|
||||
}
|
||||
|
|
@ -34,6 +34,11 @@ import org.jboss.netty.handler.codec.compression.{ZlibEncoder, ZlibDecoder}
|
|||
* RemoteNode.start(hostname, port)
|
||||
* </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:
|
||||
*
|
||||
* <pre>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue