soListener.onSharedObjectDisconnect(this);
}
// check that linger job has be set
if (lingerJobName == null) {
// start a job to allow the so to linger for just a few ticks
QuartzSchedulingService scheduler = (QuartzSchedulingService) getParent().getContext().getBean(QuartzSchedulingService.BEAN_NAME);
IScheduledJob job = new IScheduledJob() {
public void execute(ISchedulingService service) {
if (so != null && !so.isClosed()) {
so.checkRelease();
}
}
};
lingerJobName = scheduler.addScheduledOnceJob(lingerPeriod, job);
}
// check acquire
if (so.isClosed()) {
log.debug("Removing scope: {}", this);
getParent().removeChildScope(this);