}
public void addKSessionBean(AfterBeanDiscovery abd,
KieCDIEntry entry) {
ReleaseId releaseId = entry.getkGAV();
KieContainerImpl kieContainer = classpathKContainer; // default to classpath, but allow it to be overriden
if ( releaseId != null ) {
kieContainer = (KieContainerImpl) gavs.get(releaseId);
if ( kieContainer == null ) {
log.error( "Unable to create KSession({}), could not retrieve KieContainer for ReleaseId {}",
entry.getKieTypeName(),
releaseId.toString() );
return;
}
}
KieProject kProject = kieContainer.getKieProject();
String kSessionName = entry.getKieTypeName();
KieSessionModel kSessionModel = kProject.getKieSessionModel( kSessionName );
if ( kSessionModel == null ) {
log.error( "Annotation @KSession({}) found, but no KieSessioneModel exist.\nEither the required kproject.xml does not exist, was corrupted, or mising the KieBase entry",