Added support for springs @PostConstruct and @PreDestroy
This commit is contained in:
parent
9b3aed1e29
commit
528500c366
4 changed files with 68 additions and 9 deletions
|
|
@ -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") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue