Added possibility to use Kernel as j2ee context listener
This commit is contained in:
parent
d9c58388a9
commit
41a90d041d
1 changed files with 12 additions and 1 deletions
|
|
@ -9,6 +9,8 @@ import se.scalablesolutions.akka.remote.{RemoteNode,BootableRemoteActorService}
|
|||
import se.scalablesolutions.akka.util.Logging
|
||||
import se.scalablesolutions.akka.actor.{ActorRegistry,BootableActorLoaderService}
|
||||
|
||||
import javax.servlet.{ServletContextListener,ServletContextEvent}
|
||||
|
||||
/**
|
||||
* The Akka Kernel.
|
||||
*
|
||||
|
|
@ -71,4 +73,13 @@ object Kernel extends Logging {
|
|||
log.info(" Running version %s", VERSION)
|
||||
log.info("==============================")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
And this one can be added to web.xml mappings as a listener to boot and shutdown Akka
|
||||
*/
|
||||
|
||||
class Kernel extends ServletContextListener {
|
||||
def contextDestroyed(e : ServletContextEvent) : Unit = Kernel.shutdown
|
||||
def contextInitialized(e : ServletContextEvent) : Unit = Kernel.boot
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue