Merge branch 'master' of git@github.com:jboner/akka
This commit is contained in:
commit
02ee7eca69
6 changed files with 10 additions and 7 deletions
|
|
@ -75,10 +75,13 @@ trait CamelContextLifecycle extends Logging {
|
|||
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) {
|
||||
this.context = context
|
||||
this.context.setStreamCaching(true)
|
||||
this.template = context.createProducerTemplate
|
||||
_initialized = true
|
||||
log.info("Camel context initialized")
|
||||
|
|
|
|||
|
|
@ -35,9 +35,6 @@ trait CamelService extends Bootable with Logging {
|
|||
if (!initialized) init
|
||||
if (!started) start
|
||||
|
||||
// Camel should cache input streams
|
||||
context.setStreamCaching(true)
|
||||
|
||||
// start actor that exposes consumer actors via Camel endpoints
|
||||
consumerPublisher.start
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,10 @@ class CamelContextLifecycleTest extends JUnitSuite with CamelContextLifecycle {
|
|||
@Test def shouldManageCustomCamelContext {
|
||||
assert(context === 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(!template.asInstanceOf[DefaultProducerTemplate].isStarted)
|
||||
start
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -140,7 +140,7 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
|
|||
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_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 jackson = "org.codehaus.jackson" % "jackson-mapper-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) {
|
||||
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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue