Merge branch 'master' of git@github.com:jboner/akka

This commit is contained in:
Jonas Bonér 2010-05-16 20:15:51 +02:00
commit 02ee7eca69
6 changed files with 10 additions and 7 deletions

View file

@ -75,10 +75,13 @@ trait CamelContextLifecycle extends Logging {
def init: Unit = init(new DefaultCamelContext) def init: Unit = init(new DefaultCamelContext)
/** /**
* Initializes this lifecycle object with the given CamelContext. * Initializes this lifecycle object with the given CamelContext. For the passed
* CamelContext stream-caching is enabled. If applications want to disable stream-
* caching they can do so after this method returned and prior to calling start.
*/ */
def init(context: CamelContext) { def init(context: CamelContext) {
this.context = context this.context = context
this.context.setStreamCaching(true)
this.template = context.createProducerTemplate this.template = context.createProducerTemplate
_initialized = true _initialized = true
log.info("Camel context initialized") log.info("Camel context initialized")

View file

@ -35,9 +35,6 @@ trait CamelService extends Bootable with Logging {
if (!initialized) init if (!initialized) init
if (!started) start if (!started) start
// Camel should cache input streams
context.setStreamCaching(true)
// start actor that exposes consumer actors via Camel endpoints // start actor that exposes consumer actors via Camel endpoints
consumerPublisher.start consumerPublisher.start

View file

@ -8,7 +8,10 @@ class CamelContextLifecycleTest extends JUnitSuite with CamelContextLifecycle {
@Test def shouldManageCustomCamelContext { @Test def shouldManageCustomCamelContext {
assert(context === null) assert(context === null)
assert(template === null) assert(template === null)
init(new TestCamelContext) val ctx = new TestCamelContext
assert(ctx.isStreamCaching === false)
init(ctx)
assert(context.isStreamCaching === true)
assert(!context.asInstanceOf[TestCamelContext].isStarted) assert(!context.asInstanceOf[TestCamelContext].isStarted)
assert(!template.asInstanceOf[DefaultProducerTemplate].isStarted) assert(!template.asInstanceOf[DefaultProducerTemplate].isStarted)
start start

View file

@ -140,7 +140,7 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
val commons_io = "commons-io" % "commons-io" % "1.4" % "compile" val commons_io = "commons-io" % "commons-io" % "1.4" % "compile"
val dispatch_json = "net.databinder" % "dispatch-json_2.8.0.Beta1" % "0.6.6" % "compile" val dispatch_json = "net.databinder" % "dispatch-json_2.8.0.Beta1" % "0.6.6" % "compile"
val dispatch_http = "net.databinder" % "dispatch-http_2.8.0.Beta1" % "0.6.6" % "compile" val dispatch_http = "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 sjson = "sjson.json" % "sjson" % "0.5-2.8.Beta1" % "compile"
val sbinary = "sbinary" % "sbinary" % "2.8.0.Beta1-2.8.0.Beta1-0.3.1-SNAPSHOT" % "compile" val sbinary = "sbinary" % "sbinary" % "2.8.0.Beta1-2.8.0.Beta1-0.3.1-SNAPSHOT" % "compile"
val jackson = "org.codehaus.jackson" % "jackson-mapper-asl" % "1.2.1" % "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" val jackson_core = "org.codehaus.jackson" % "jackson-core-asl" % "1.2.1" % "compile"
@ -199,7 +199,7 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
} }
class AkkaRedisProject(info: ProjectInfo) extends AkkaDefaultProject(info, distPath) { class AkkaRedisProject(info: ProjectInfo) extends AkkaDefaultProject(info, distPath) {
val redis = "com.redis" % "redisclient" % "2.8.0.Beta1-1.3-SNAPSHOT" % "compile" val redis = "com.redis" % "redisclient" % "2.8.0.Beta1-1.3" % "compile"
override def testOptions = TestFilter((name: String) => name.endsWith("Test")) :: Nil override def testOptions = TestFilter((name: String) => name.endsWith("Test")) :: Nil
} }