}
public void afterPropertiesSet() throws Exception {
if ( "singleton".equalsIgnoreCase(scope) ) {
KieObjectsResolver kieObjectsResolver = new KieObjectsResolver();
kSession = kieObjectsResolver.resolveKSession(name, releaseId);
if (kSession instanceof StatelessKieSession) {
helper = new StatelessKSessionFactoryBeanHelper(this, (StatelessKieSession) kSession);
} else if (kSession instanceof KieSession) {
helper = new StatefulKSessionFactoryBeanHelper(this, (KieSession) kSession);
}