if ( beanDefinition.getBeanClassName() != null && beanDefinition.getBeanClassName().equalsIgnoreCase(KSessionFactoryBean.class.getName())){
String kBaseName = getPropertyValue(beanDefinition, "kBaseName");
if ( kBase.getName().equalsIgnoreCase(kBaseName)) {
String name = getPropertyValue(beanDefinition, "name");
String type = getPropertyValue(beanDefinition, "type");
KieSessionModelImpl kSession = new KieSessionModelImpl(kBase, name);
kSession.setType(!type.isEmpty() ? KieSessionModel.KieSessionType.valueOf(type.toUpperCase()) : KieSessionModel.KieSessionType.STATEFUL);
Map<String, KieSessionModel> rawKieSessionModels = kBase.getRawKieSessionModels();
rawKieSessionModels.put(kSession.getName(), kSession);
beanDefinition.getPropertyValues().addPropertyValue(new PropertyValue("releaseId", releaseId));
kSession.setDefault( "true".equals( getPropertyValue(beanDefinition, "def") ) );
String clockType = getPropertyValue(beanDefinition, "clockType");
if ( !clockType.isEmpty() ) {
kSession.setClockType( ClockTypeOption.get(clockType) );
}
String scope = getPropertyValue(beanDefinition, "scope");
if ( !scope.isEmpty() ) {
kSession.setScope( scope.trim() );
}
}
}
}
}