Added support for springs @PostConstruct and @PreDestroy

This commit is contained in:
Johan Rask 2010-07-07 11:12:16 +02:00
parent 9b3aed1e29
commit 528500c366
4 changed files with 68 additions and 9 deletions

View file

@ -72,8 +72,12 @@ class ActiveObjectFactoryBeanTest extends Spec with ShouldMatchers {
val pojoInf = ctx.getBean("pojoInf").asInstanceOf[PojoInf];
println("pojoInf = " + pojoInf.getString)
Thread.sleep(200)
assert(pojoInf.isPostConstructInvoked)
assert(pojoInf.getString == "akka rocks")
assert(pojoInf.gotApplicationContext)
ctx.close
assert(pojoInf.isPreDestroyInvoked)
}
it("should stop the created active object when scope is singleton and the context is closed") {