BeanManager beanManager) {
if ( classpathKContainer == null ) {
init();
}
KieServices ks = KieServices.Factory.get();
// Find all uses of KieBaseModel and KieSessionModel and add to Set index
if ( !pit.getInjectionTarget().getInjectionPoints().isEmpty() ) {
for ( InjectionPoint ip : pit.getInjectionTarget().getInjectionPoints() ) {
boolean kBaseExists = false;
boolean kSessionExists = false;
boolean kContainerExists = false;
KBase kBase = null;
KSession kSession = null;
if ( ip.getType() instanceof Class && ( KieSession.class.isAssignableFrom( (Class ) ip.getType() ) || StatelessKieSession.class.isAssignableFrom( (Class ) ip.getType() ) ) ) {
kSession = ip.getAnnotated().getAnnotation( KSession.class );
kSessionExists = true;
} else if ( ip.getType() instanceof Class && KieBase.class.isAssignableFrom( (Class ) ip.getType() ) ) {
kBaseExists = true;
kBase = ip.getAnnotated().getAnnotation( KBase.class );
} else if ( ip.getType() instanceof Class && KieContainer.class.isAssignableFrom( (Class ) ip.getType() ) ) {
kContainerExists = true;
}
if ( !kSessionExists && !kBaseExists && !kContainerExists) {
continue;
}
KReleaseId kReleaseId = ip.getAnnotated().getAnnotation( KReleaseId.class );
ReleaseId releaseId = null;
if ( kReleaseId != null ) {
releaseId = ks.newReleaseId(kReleaseId.groupId(),
kReleaseId.artifactId(),
kReleaseId.version());
gavs.put(releaseId,
null );
}