Minor change, overriding destroyInstance instead of destroy

This commit is contained in:
Johan Rask 2010-07-06 13:07:25 +02:00
parent 3e7980a466
commit 003a44ee83

View file

@ -85,15 +85,12 @@ class ActiveObjectFactoryBean extends AbstractFactoryBean[AnyRef] with Logging w
setProperties(create(argumentList))
}
/**
/**
* Stop the active object if it is a singleton.
*/
override def destroy = {
if(scope.equals(VAL_SCOPE_SINGLETON)) {
ActiveObject.stop(getObject)
}
super.destroy
}
override def destroyInstance(instance:AnyRef) {
ActiveObject.stop(instance)
}
private def setProperties(ref:AnyRef) : AnyRef = {
if(hasSetDependecies) {