Deployment class loader now inhertits from system class loader

This commit is contained in:
Jonas Bonér 2010-02-16 09:39:56 +01:00
parent 6aebe4b9ba
commit 8fb281f4b0
2 changed files with 8 additions and 8 deletions

View file

@ -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
}

View file

@ -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>