fixed some major bugs + wrote thread pool builder and dispatcher config + various spawnLink variations on Actor

This commit is contained in:
Jonas Boner 2009-07-01 15:29:06 +02:00
parent 2cfeda0ce0
commit a4f1092659
28 changed files with 2168 additions and 617 deletions

View file

@ -23,6 +23,7 @@ import java.io.{File, IOException}
import javax.ws.rs.core.UriBuilder
import javax.management.JMException
import kernel.nio.{RemoteClient, RemoteServer}
import kernel.state.CassandraNode
import kernel.util.Logging
@ -48,8 +49,11 @@ object Kernel extends Logging {
private[this] var storageServer: VoldemortServer = _
*/
private[this] var remoteServer: RemoteServer = _
def main(args: Array[String]): Unit = {
log.info("Starting Akka kernel...")
startRemoteService
startCassandra
cassandraBenchmark
@ -63,6 +67,21 @@ object Kernel extends Logging {
//startVoldemort
}
private[akka] def startRemoteService = {
// FIXME manage remote serve thread for graceful shutdown
val remoteServerThread = new Thread(new Runnable() {
def run = {
val server = new RemoteServer
server.connect
}
})
remoteServerThread.start
Thread.sleep(1000) // wait for server to start up
RemoteClient.connect
}
private[akka] def startJersey: SelectorThread = {
val initParams = new java.util.HashMap[String, String]
initParams.put(