diff --git a/akka.iws b/akka.iws
index f336abdd37..7b4e8ac4c6 100644
--- a/akka.iws
+++ b/akka.iws
@@ -6,23 +6,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
@@ -171,7 +159,7 @@
-
+
@@ -180,16 +168,16 @@
-
+
-
+
-
+
@@ -204,10 +192,10 @@
-
+
-
+
@@ -249,8 +237,8 @@
-
+
@@ -1716,9 +1704,16 @@
+
+
+
+
+
+
+
-
+
@@ -1730,23 +1725,16 @@
-
-
-
-
-
-
-
-
+
-
+
-
+
diff --git a/bin/start-akka-server.sh b/bin/start-akka-server.sh
index cd3c9e0d4a..3cdf818317 100755
--- a/bin/start-akka-server.sh
+++ b/bin/start-akka-server.sh
@@ -1,27 +1,40 @@
#!/bin/bash
-if [ $# -gt 1 ];
-then
- echo 'USAGE: bin/start-akka-server.sh [akka_home]'
- exit 1
-fi
+VERSION=0.1
+
+#if [ $# -gt 1 ];
+#then
+# echo 'USAGE: bin/start-akka-server.sh'
+# exit 1
+#fi
+
+JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
BASE_DIR=$(dirname $0)/..
echo 'Starting Akka Kernel from directory' $BASE_DIR
-for FILE in $BASE_DIR/lib/*.jar;
-do
- CLASSPATH=$CLASSPATH:$FILE
-done
-CLASSPATH=$CLASSPATH:$BASE_DIR/config
+echo 'Resetting persistent storage in' $BASE_DIR/storage
+rm -rf $BASE_DIR/storage
+mkdir $BASE_DIR/storage
+mkdir $BASE_DIR/storage/bootstrap
+mkdir $BASE_DIR/storage/callouts
+mkdir $BASE_DIR/storage/commitlog
+mkdir $BASE_DIR/storage/data
+mkdir $BASE_DIR/storage/system
+
CLASSPATH=$CLASSPATH:$BASE_DIR/kernel/target/classes
+#CLASSPATH=$CLASSPATH:$BASE_DIR/dist/akka-kernel-$VERSION.jar
+CLASSPATH=$CLASSPATH:$BASE_DIR/lib/scala-library-2.7.5.jar
+CLASSPATH=$CLASSPATH:$BASE_DIR/lib/configgy-1.3.jar
+CLASSPATH=$CLASSPATH:$BASE_DIR/config
STORAGE_OPTS=" \
-Dcassandra \
-Dstorage-config=$BASE_DIR/config/ \
-Dpidfile=akka.pid"
+# To have Akka dump the generated classes, add the '-Daspectwerkz.transform.dump=*' option and it will dump classes to $BASE_DIR/_dump
JVM_OPTS=" \
-server \
-Xdebug \
@@ -40,4 +53,7 @@ JVM_OPTS=" \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false"
-/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java $JVM_OPTS $STORAGE_OPTS -cp $CLASSPATH se.scalablesolutions.akka.Boot se.scalablesolutions.akka.kernel.Kernel ${1}
\ No newline at end of file
+echo "Starting up with options:
+"$JAVA_HOME/bin/java $JVM_OPTS $STORAGE_OPTS -cp $CLASSPATH se.scalablesolutions.akka.Boot se.scalablesolutions.akka.kernel.Kernel ${1}
+
+$JAVA_HOME/bin/java $JVM_OPTS $STORAGE_OPTS -cp $CLASSPATH se.scalablesolutions.akka.Boot se.scalablesolutions.akka.kernel.Kernel ${1}
diff --git a/kernel/src/main/scala/Boot.scala b/kernel/src/main/scala/Boot.scala
index 7ff4873aac..4ea23287a0 100644
--- a/kernel/src/main/scala/Boot.scala
+++ b/kernel/src/main/scala/Boot.scala
@@ -16,25 +16,33 @@ import kernel.util.Logging
*/
object Boot extends Logging {
- val HOME = try { System.getenv("AKKA_HOME") } catch { case e: NullPointerException => throw new IllegalStateException("AKKA_HOME system variable needs to be set") }
- val CLASSES = HOME + "/kernel/target/classes" // FIXME fix classes dir for dist wrap
+ val HOME = try { System.getenv("AKKA_HOME") } catch { case e: NullPointerException => throw new IllegalStateException("AKKA_HOME system variable needs to be set. Should point to the root of the Akka distribution.") }
+ val CLASSES = HOME + "/kernel/target/classes" // FIXME remove for dist
val LIB = HOME + "/lib"
val CONFIG = HOME + "/config"
+ val DEPLOY = HOME + "/deploy"
/**
- * Assumes that the AKKA_HOME directory is set with /config, /classes and /lib beneath it holding files and jars.
+ * Assumes that the AKKA_HOME directory is set with /bin, /config, /deploy and /lib beneath it holding config files and jars.
* Thus:
- * $AKKA_HOME
* $AKKA_HOME/bin
- * $AKKA_HOME/classes
- * $AKKA_HOME/lib
* $AKKA_HOME/config
+ * $AKKA_HOME/lib
+ * $AKKA_HOME/deploy
*/
def main(args: Array[String]): Unit = {
- log.info("Bootstrapping Akka server from AKKA_HOME=%s", HOME)
+ log.info("Bootstrapping Akka server from [AKKA_HOME=%s]", HOME)
- val libs = for (f <- new File(LIB).listFiles().toArray.toList.asInstanceOf[List[File]]) yield f.toURL
- val urls = new File(CLASSES).toURL :: libs
+ val LIB_DIR = new File(LIB)
+ val DEPLOY_DIR = new File(DEPLOY)
+ if (!LIB_DIR.exists) { log.error("Could not find a lib directory with all the akka dependencies at [" + DEPLOY + "]"); System.exit(-1) }
+ if (!DEPLOY_DIR.exists) { log.error("Could not find a deploy directory at [" + DEPLOY + "]"); System.exit(-1) }
+
+ val toDeploy = for (f <- DEPLOY_DIR.listFiles().toArray.toList.asInstanceOf[List[File]]) yield f.toURL
+ if (toDeploy.isEmpty) log.warning("No jars could be found in the [" + DEPLOY + "] directory, nothing to deploy")
+ val libs = for (f <- LIB_DIR.listFiles().toArray.toList.asInstanceOf[List[File]]) yield f.toURL
+ val urls = new File(CLASSES).toURL :: (libs ::: toDeploy)
+
val loader = new URLClassLoader(urls.toArray, ClassLoader.getSystemClassLoader.getParent)
val mainClass = loader.loadClass(args(0))
val mainMethod = mainClass.getMethod("main", Array(args.getClass): _*)
diff --git a/kernel/src/main/scala/Kernel.scala b/kernel/src/main/scala/Kernel.scala
index ae409d3a89..53cd2b4eff 100644
--- a/kernel/src/main/scala/Kernel.scala
+++ b/kernel/src/main/scala/Kernel.scala
@@ -49,6 +49,7 @@ object Kernel extends Logging {
//startJersey
//startZooKeeper
//startVoldemort
+ log.info("Akka kernel started successfully")
}
diff --git a/lib/configgy-1.2.jar b/lib/configgy-1.2.jar
deleted file mode 100644
index 988e533d00..0000000000
Binary files a/lib/configgy-1.2.jar and /dev/null differ
diff --git a/lib/configgy-1.3.jar b/lib/configgy-1.3.jar
new file mode 100644
index 0000000000..ebbaea502e
Binary files /dev/null and b/lib/configgy-1.3.jar differ
diff --git a/lib/scala-library-2.7.3.jar b/lib/scala-library-2.7.5.jar
similarity index 61%
rename from lib/scala-library-2.7.3.jar
rename to lib/scala-library-2.7.5.jar
index 734d361f12..07d2e1381a 100644
Binary files a/lib/scala-library-2.7.3.jar and b/lib/scala-library-2.7.5.jar differ