checking for AKKA_HOME at boot + added Cassidy

This commit is contained in:
Jonas Boner 2009-08-02 11:47:00 +02:00
parent 9bb152d3de
commit 136cb4e334
10 changed files with 27 additions and 7 deletions

Binary file not shown.

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>2.0-SNAPSHOT</version>
<packaging>jar</packaging>
</project>

View file

@ -2,5 +2,5 @@
# mvn -o <target> |sed -e s/\\[WARNING\\][[:space:]]//g |grep -v "Finished at"
install:
mvn -o scala:compile |sed -e 's/\[INFO\] //g' |sed -e 's/\[WARNING\] //g' |grep -v "Finished at" |grep -v "Total time"
mvn -o compile |sed -e 's/\[INFO\] //g' |sed -e 's/\[WARNING\] //g' |grep -v "Finished at" |grep -v "Total time"

View file

@ -120,6 +120,11 @@
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>se.foldleft</groupId>
<artifactId>cassidy</artifactId>
<version>0.1</version>
</dependency>
<!-- For Jersey -->
<dependency>

View file

@ -15,7 +15,11 @@ 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. Should point to the root of the Akka distribution.") }
val HOME = {
val home = System.getenv("AKKA_HOME")
if (home == null) throw new IllegalStateException("No 'AKKA_HOME' environment variable set. You have to set 'AKKA_HOME' to the root of the Akka distribution.")
else home
}
val CLASSES = HOME + "/kernel/target/classes" // FIXME remove for dist
val LIB = HOME + "/lib"
val CONFIG = HOME + "/config"

View file

@ -24,7 +24,9 @@ import kernel.util.Logging
*/
object Kernel extends Logging {
@volatile private var hasBooted = false
Boot.HOME
val config = setupConfig
val BOOT_CLASSES = config.getList("akka.boot")
@ -117,8 +119,7 @@ object Kernel extends Logging {
private[akka] def startCassandra = if (config.getBool("akka.storage.cassandra.service", true)) {
System.setProperty("cassandra", "")
System.setProperty("storage-config", akka.Boot.CONFIG + "/")
println("------------------------- " + akka.Boot.CONFIG + "/")
CassandraStorage.start
CassandraStorage.start
}
private[akka] def startJersey = {

View file

@ -54,7 +54,6 @@ object Actor {
private[this] val remoteFlagLock = new ReadWriteLock
private[this] val transactionalFlagLock = new ReadWriteLock
private var hotswap: Option[PartialFunction[Any, Unit]] = None
private var config: Option[AnyRef] = None
@volatile protected[this] var isTransactional = false

View file

@ -138,6 +138,8 @@ object Serializer {
def out[T](t : T)(implicit bin : Writes[T]): Array[Byte] = toByteArray[T](t)
def in[T](array : Array[Byte], clazz: Option[Class[T]])(implicit bin : Reads[T]): T = fromByteArray[T](array)
def in[T](array : Array[Byte])(implicit bin : Reads[T]): T = fromByteArray[T](array)
}
}

View file

@ -30,6 +30,7 @@ object CassandraStorage extends Logging {
val MAP_COLUMN_FAMILY = "map"
val VECTOR_COLUMN_FAMILY = "vector"
val REF_COLUMN_FAMILY = "ref:item"
val IS_ASCENDING = true
val RUN_THRIFT_SERVICE = kernel.Kernel.config.getBool("akka.storage.cassandra.thrift-server.service", false)
@ -49,7 +50,7 @@ object CassandraStorage extends Logging {
case unknown => throw new UnsupportedOperationException("Unknown storage serialization protocol [" + unknown + "]")
}
}
// TODO: is this server thread-safe or needed to be wrapped up in an actor?
private[this] val server = classOf[CassandraServer].newInstance.asInstanceOf[CassandraServer]

BIN
lib/cassidy-0.1.jar Executable file

Binary file not shown.