I have an Akka microkernel below:
class ServiceKernel extends Bootable {
val system = ActorSystem("service-kernel")
def startup = {
system.actorOf(Props(new Boot(false))) ! Start
}
def shutdown = {
system.shutdown()
}
}
Since the kernel extends Bootable, not Apphow can I access the command line arguments used when starting the kernel? For example, if I start the kernel using start namespace.ServiceKernel -d rundevmodeor similar. Thank!
Additional Information
I thought it was worth adding this information about running the script into the microkernel. As /bin/startyou will notice the following:
#!/bin/sh
AKKA_HOME="$(cd "$(cd "$(dirname "$0")"; pwd -P)"/..; pwd)"
AKKA_CLASSPATH="$AKKA_HOME/config:$AKKA_HOME/lib/*"
JAVA_OPTS="-Xms256M -Xmx512M -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2"
java $JAVA_OPTS -cp "$AKKA_CLASSPATH" -Dakka.home="$AKKA_HOME" akka.kernel.Main "$@"
Although om-nom-nom originally proposed options -D, it looks the way it is used, and the main start parameter is passed to the class akka.kernel.Main(which in this case will be the class ServiceKernelabove).
source