compiles, tests and dists without Redis + samples
This commit is contained in:
parent
e571161866
commit
fbef975746
14 changed files with 64 additions and 52 deletions
|
|
@ -7,8 +7,6 @@ package se.scalablesolutions.akka.camel
|
|||
import org.apache.camel.{Exchange, Message => CamelMessage}
|
||||
import org.apache.camel.util.ExchangeHelper
|
||||
|
||||
import scala.collection.jcl.{Map => MapWrapper}
|
||||
|
||||
/**
|
||||
* An immutable representation of a Camel message. Actor classes that mix in
|
||||
* se.scalablesolutions.akka.camel.Producer or
|
||||
|
|
@ -224,8 +222,10 @@ class CamelMessageAdapter(val cm: CamelMessage) {
|
|||
*/
|
||||
def toMessage(headers: Map[String, Any]): Message = Message(cm.getBody, cmHeaders(headers, cm))
|
||||
|
||||
import scala.collection.JavaConversions._
|
||||
|
||||
private def cmHeaders(headers: Map[String, Any], cm: CamelMessage) =
|
||||
headers ++ MapWrapper[String, AnyRef](cm.getHeaders).elements
|
||||
headers ++ cm.getHeaders
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ trait Producer { self: Actor =>
|
|||
* @param msg: the message to produce. The message is converted to its canonical
|
||||
* representation via Message.canonicalize.
|
||||
*/
|
||||
protected def produceOneway(msg: Any): Unit =
|
||||
protected def produceOnewaySync(msg: Any): Unit =
|
||||
template.send(endpointUri, createInOnlyExchange.fromRequestMessage(Message.canonicalize(msg)))
|
||||
|
||||
/**
|
||||
|
|
@ -90,7 +90,7 @@ trait Producer { self: Actor =>
|
|||
* representation via Message.canonicalize.
|
||||
* @return either a response Message or a Failure object.
|
||||
*/
|
||||
protected def produce(msg: Any): Any = {
|
||||
protected def produceSync(msg: Any): Any = {
|
||||
val cmsg = Message.canonicalize(msg)
|
||||
val requestProcessor = new Processor() {
|
||||
def process(exchange: Exchange) = exchange.fromRequestMessage(cmsg)
|
||||
|
|
@ -126,9 +126,9 @@ trait Producer { self: Actor =>
|
|||
*/
|
||||
protected def produce: PartialFunction[Any, Unit] = {
|
||||
case msg => {
|
||||
if ( oneway && !async) produceOneway(msg)
|
||||
if ( oneway && !async) produceOnewaySync(msg)
|
||||
else if ( oneway && async) produceOnewayAsync(msg)
|
||||
else if (!oneway && !async) reply(produce(msg))
|
||||
else if (!oneway && !async) reply(produceSync(msg))
|
||||
else /*(!oneway && async)*/ produceAsync(msg)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
package se.scalablesolutions.akka.cluster.jgroups
|
||||
|
||||
import org.jgroups.{JChannel, View => JG_VIEW, Address, Message => JG_MSG, ExtendedMembershipListener, Receiver}
|
||||
import org.jgroups.util.Util
|
||||
|
||||
import se.scalablesolutions.akka.remote.ClusterActor._
|
||||
import se.scalablesolutions.akka.remote.BasicClusterActor
|
||||
|
||||
import org.scala_tools.javautils.Imports._
|
||||
|
||||
/**
|
||||
* Clustering support via JGroups.
|
||||
* @Author Viktor Klang
|
||||
*/
|
||||
class JGroupsClusterActor extends BasicClusterActor {
|
||||
import ClusterActor._
|
||||
import scala.collection.JavaConversions._
|
||||
import se.scalablesolutions.akka.remote.ClusterActor._
|
||||
|
||||
type ADDR_T = Address
|
||||
|
||||
|
|
@ -63,7 +61,7 @@ class JGroupsClusterActor extends BasicClusterActor {
|
|||
super.shutdown
|
||||
log debug ("Shutting down %s", toString)
|
||||
isActive = false
|
||||
channel.foreach(_.shutdown)
|
||||
channel.foreach(Util shutdown _)
|
||||
channel = None
|
||||
}
|
||||
}
|
||||
|
|
@ -82,7 +82,7 @@ class ShoalClusterActor extends BasicClusterActor {
|
|||
if(isActive) {
|
||||
signal match {
|
||||
case ms : MessageSignal => me send Message[ADDR_T](ms.getMemberToken,ms.getMessage)
|
||||
case jns : JoinNotificationSignal => me send View[ADDR_T](Set[ADDR_T]() ++ jns.getCurrentCoreMembers.asScala - serverName)
|
||||
case jns : JoinNotificationSignal => me send View[ADDR_T](Set[ADDR_T]() ++ jns.getCurrentCoreMembers - serverName)
|
||||
case fss : FailureSuspectedSignal => me send Zombie[ADDR_T](fss.getMemberToken)
|
||||
case fns : FailureNotificationSignal => me send Zombie[ADDR_T](fns.getMemberToken)
|
||||
case _ => log.debug("Unhandled signal: [%s]",signal)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import se.scalablesolutions.akka.util.{Bootable, Logging}
|
|||
trait BootableCometActorService extends Bootable with Logging {
|
||||
self : BootableActorLoaderService =>
|
||||
|
||||
import config.Config._
|
||||
import se.scalablesolutions.akka.config.Config._
|
||||
|
||||
val REST_HOSTNAME = config.getString("akka.rest.hostname", "localhost")
|
||||
val REST_URL = "http://" + REST_HOSTNAME
|
||||
|
|
|
|||
|
|
@ -180,9 +180,9 @@ private[stm] class CollisionNode[K, +V](val hash: Int, bucket: List[(K, V)]) ext
|
|||
}
|
||||
}
|
||||
|
||||
def iterator = bucket.elements
|
||||
def iterator = bucket.iterator
|
||||
|
||||
def elements = bucket.elements
|
||||
def elements = bucket.iterator
|
||||
|
||||
override def toString = "CollisionNode(" + bucket.toString + ")"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class RemoteActorSpecActorAsyncSender extends Actor {
|
|||
class ClientInitiatedRemoteActorTest extends JUnitSuite {
|
||||
import Actor.Sender.Self
|
||||
|
||||
akka.config.Config.config
|
||||
se.scalablesolutions.akka.config.Config.config
|
||||
|
||||
val HOSTNAME = "localhost"
|
||||
val PORT1 = 9990
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ object BinaryString{
|
|||
class RemoteSupervisorTest extends JUnitSuite {
|
||||
import Actor.Sender.Self
|
||||
|
||||
akka.config.Config.config
|
||||
se.scalablesolutions.akka.config.Config.config
|
||||
|
||||
new Thread(new Runnable() {
|
||||
def run = {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class ServerInitiatedRemoteActorTest extends JUnitSuite {
|
|||
import ServerInitiatedRemoteActorTest._
|
||||
|
||||
import Actor.Sender.Self
|
||||
akka.config.Config.config
|
||||
se.scalablesolutions.akka.config.Config.config
|
||||
|
||||
private val unit = TimeUnit.MILLISECONDS
|
||||
|
||||
|
|
|
|||
|
|
@ -27,4 +27,9 @@ public class Foo extends se.scalablesolutions.akka.serialization.Serializable.Ja
|
|||
if (true) throw new RuntimeException("expected");
|
||||
return "test";
|
||||
}
|
||||
|
||||
public int $tag() throws java.rmi.RemoteException
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -510,13 +510,18 @@ trait PersistentSortedSet[A]
|
|||
inStorage(elem) match {
|
||||
case Some(f) => f
|
||||
case None =>
|
||||
throw new Predef.NoSuchElementException(elem + " not present")
|
||||
throw new NoSuchElementException(elem + " not present")
|
||||
}
|
||||
}
|
||||
|
||||
implicit def order(x: (A, Float)) = new Ordered[(A, Float)] {
|
||||
def compare(that: (A, Float)) = x._2 compare that._2
|
||||
}
|
||||
|
||||
implicit def ordering = new scala.math.Ordering[(A,Float)] {
|
||||
def compare(x: (A, Float),y : (A,Float)) = x._2 compare y._2
|
||||
}
|
||||
|
||||
|
||||
def zrange(start: Int, end: Int): List[(A, Float)] = {
|
||||
// need to operate on the whole range
|
||||
|
|
|
|||
|
|
@ -1,8 +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>net.lag/groupId>
|
||||
<groupId>net.lag</groupId>
|
||||
<artifactId>configgy</artifactId>
|
||||
<version>configgy-2.8.0.Beta1-1.5-SNAPSHOT</version>
|
||||
<version>2.8.0.Beta1-1.5-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
</project>
|
||||
|
|
@ -2,6 +2,6 @@ project.organization=se.scalablesolutions.akka
|
|||
project.name=akka
|
||||
project.version=0.7-2.8
|
||||
scala.version=2.8.0.Beta1
|
||||
sbt.version=0.7.1
|
||||
sbt.version=0.7.2
|
||||
def.scala.version=2.7.7
|
||||
build.scala.versions=2.8.0.Beta1
|
||||
|
|
|
|||
|
|
@ -60,20 +60,21 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
|||
|
||||
lazy val dist = zipTask(allArtifacts, "dist", distName) dependsOn (`package`) describedAs("Zips up the distribution.")
|
||||
|
||||
def distName = "%s_%s-%s.zip".format(name, defScalaVersion.value, version)
|
||||
def distName = "%s_%s-%s.zip".format(name, buildScalaVersion, version)
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// repositories
|
||||
val embeddedrepo = "embedded repo" at new File(akkaHome, "embedded-repo").toURI.toString
|
||||
val sunjdmk = "sunjdmk" at "http://wp5.e-taxonomy.eu/cdmlib/mavenrepo"
|
||||
val databinder = "DataBinder" at "http://databinder.net/repo"
|
||||
val configgy = "Configgy" at "http://www.lag.net/repo"
|
||||
// val configgy = "Configgy" at "http://www.lag.net/repo"
|
||||
val codehaus = "Codehaus" at "http://repository.codehaus.org"
|
||||
val codehaus_snapshots = "Codehaus Snapshots" at "http://snapshots.repository.codehaus.org"
|
||||
val jboss = "jBoss" at "http://repository.jboss.org/maven2"
|
||||
val guiceyfruit = "GuiceyFruit" at "http://guiceyfruit.googlecode.com/svn/repo/releases/"
|
||||
val google = "google" at "http://google-maven-repository.googlecode.com/svn/repository"
|
||||
val m2 = "m2" at "http://download.java.net/maven/2"
|
||||
val scala_tools_snapshots = "scala-tools snapshots" at "http://scala-tools.org/repo-snapshots"
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// project defintions
|
||||
|
|
@ -98,6 +99,8 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
|||
|
||||
// examples
|
||||
lazy val akka_samples = project("akka-samples", "akka-samples", new AkkaSamplesParentProject(_))
|
||||
|
||||
override def javaCompileOptions = JavaCompileOption("-Xlint:unchecked") :: super.javaCompileOptions.toList
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// create executable jar
|
||||
|
|
@ -110,25 +113,25 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
|||
// create a manifest with all akka jars and dependency jars on classpath
|
||||
override def manifestClassPath = Some(allArtifacts.getFiles
|
||||
.filter(_.getName.endsWith(".jar"))
|
||||
.map("lib_managed/scala_%s/compile/".format(defScalaVersion.value) + _.getName)
|
||||
.map("lib_managed/scala_%s/compile/".format(buildScalaVersion) + _.getName)
|
||||
.mkString(" ") +
|
||||
" dist/akka-util_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-util-java_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-core_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-cluster-shoal_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-cluster-jgroups_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-rest_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-comet_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-camel_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-security_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-amqp_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-patterns_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-persistence-common_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-persistence-redis_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-persistence-mongo_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-persistence-cassandra_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-kernel_%s-%s.jar".format(defScalaVersion.value, version) +
|
||||
" dist/akka-spring_%s-%s.jar".format(defScalaVersion.value, version)
|
||||
" dist/akka-util_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-util-java_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-core_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-cluster-shoal_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-cluster-jgroups_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-rest_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-comet_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-camel_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-security_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-amqp_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-patterns_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-persistence-common_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-persistence-redis_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-persistence-mongo_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-persistence-cassandra_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-kernel_%s-%s.jar".format(buildScalaVersion, version) +
|
||||
" dist/akka-spring_%s-%s.jar".format(buildScalaVersion, version)
|
||||
)
|
||||
|
||||
// ------------------------------------------------------------
|
||||
|
|
@ -164,9 +167,9 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
|||
class AkkaCoreProject(info: ProjectInfo) extends DefaultProject(info) {
|
||||
val netty = "org.jboss.netty" % "netty" % "3.2.0.BETA1" % "compile"
|
||||
val commons_io = "commons-io" % "commons-io" % "1.4" % "compile"
|
||||
val dispatch_json = "net.databinder" % "dispatch-json_2.7.7" % "0.6.4" % "compile"
|
||||
val dispatch_htdisttp = "net.databinder" % "dispatch-http_2.7.7" % "0.6.4" % "compile"
|
||||
val sjson = "sjson.json" % "sjson" % "0.4" % "compile"
|
||||
val dispatch_json = "net.databinder" % "dispatch-json_2.8.0.Beta1" % "0.6.6" % "compile"
|
||||
val dispatch_htdisttp = "net.databinder" % "dispatch-http_2.8.0.Beta1" % "0.6.6" % "compile"
|
||||
val sjson = "sjson.json" % "sjson" % "0.5-SNAPSHOT-2.8.Beta1" % "compile"
|
||||
// val sbinary = "sbinary" % "sbinary" % "0.3" % "compile"
|
||||
val jackson = "org.codehaus.jackson" % "jackson-mapper-asl" % "1.2.1" % "compile"
|
||||
val jackson_core = "org.codehaus.jackson" % "jackson-core-asl" % "1.2.1" % "compile"
|
||||
|
|
@ -235,6 +238,7 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
|||
val annotation = "javax.annotation" % "jsr250-api" % "1.0"
|
||||
val jersey_server = "com.sun.jersey" % "jersey-server" % JERSEY_VERSION % "compile"
|
||||
val jsr311 = "javax.ws.rs" % "jsr311-api" % "1.1" % "compile"
|
||||
val lift_common = "net.liftweb" % "lift-common" % LIFT_VERSION % "compile"
|
||||
val lift_util = "net.liftweb" % "lift-util" % LIFT_VERSION % "compile"
|
||||
// testing
|
||||
val scalatest = "org.scalatest" % "scalatest" % SCALATEST_VERSION % "test"
|
||||
|
|
@ -277,8 +281,8 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
|||
class AkkaPersistenceParentProject(info: ProjectInfo) extends ParentProject(info) {
|
||||
lazy val akka_persistence_common = project("akka-persistence-common", "akka-persistence-common",
|
||||
new AkkaPersistenceCommonProject(_), akka_core)
|
||||
lazy val akka_persistence_redis = project("akka-persistence-redis", "akka-persistence-redis",
|
||||
new AkkaRedisProject(_), akka_persistence_common)
|
||||
//lazy val akka_persistence_redis = project("akka-persistence-redis", "akka-persistence-redis",
|
||||
// new AkkaRedisProject(_), akka_persistence_common)
|
||||
lazy val akka_persistence_mongo = project("akka-persistence-mongo", "akka-persistence-mongo",
|
||||
new AkkaMongoProject(_), akka_persistence_common)
|
||||
lazy val akka_persistence_cassandra = project("akka-persistence-cassandra", "akka-persistence-cassandra",
|
||||
|
|
@ -370,7 +374,7 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
|||
}
|
||||
|
||||
class AkkaSamplesParentProject(info: ProjectInfo) extends ParentProject(info) {
|
||||
lazy val akka_sample_chat = project("akka-sample-chat", "akka-sample-chat",
|
||||
/* lazy val akka_sample_chat = project("akka-sample-chat", "akka-sample-chat",
|
||||
new AkkaSampleChatProject(_), akka_kernel)
|
||||
lazy val akka_sample_lift = project("akka-sample-lift", "akka-sample-lift",
|
||||
new AkkaSampleLiftProject(_), akka_kernel)
|
||||
|
|
@ -381,7 +385,7 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
|||
lazy val akka_sample_camel = project("akka-sample-camel", "akka-sample-camel",
|
||||
new AkkaSampleCamelProject(_), akka_kernel)
|
||||
lazy val akka_sample_security = project("akka-sample-security", "akka-sample-security",
|
||||
new AkkaSampleSecurityProject(_), akka_kernel)
|
||||
new AkkaSampleSecurityProject(_), akka_kernel) */
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------
|
||||
|
|
@ -413,8 +417,8 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
|||
val moduleName = projectPath.substring(
|
||||
projectPath.lastIndexOf(System.getProperty("file.separator")) + 1, projectPath.length)
|
||||
// FIXME need to find out a way to grab these paths from the sbt system
|
||||
val JAR_FILE_NAME = moduleName + "_%s-%s.jar".format(defScalaVersion.value, version)
|
||||
val JAR_FILE_PATH = projectPath + "/target/scala_%s/".format(defScalaVersion.value) + JAR_FILE_NAME
|
||||
val JAR_FILE_NAME = moduleName + "_%s-%s.jar".format(buildScalaVersion, version)
|
||||
val JAR_FILE_PATH = projectPath + "/target/scala_%s/".format(buildScalaVersion) + JAR_FILE_NAME
|
||||
|
||||
val from = Path.fromFile(new java.io.File(JAR_FILE_PATH))
|
||||
val to = Path.fromFile(new java.io.File(toDir + "/" + JAR_FILE_NAME))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue