Skip to content

Commit

Permalink
Fixes issue WASdev#78
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Kurz <[email protected]>
  • Loading branch information
scottkurz committed May 14, 2022
1 parent de5a9a8 commit 3d68111
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013 International Business Machines Corp.
* Copyright 2013,2022 International Business Machines Corp.
*
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. Licensed under the Apache License,
Expand Down Expand Up @@ -42,18 +42,18 @@ void beforeBeanDiscovery(@Observes BeforeBeanDiscovery bbd, BeanManager bm) {
logger.log(Level.FINE, "BatchCDIInjectionExtension.beforeBeanDiscovery() added annotated type: " + BatchProducerBean.class.getName());
}

private static Boolean foundJobOp = false;
private Boolean foundJobOp = false;

public <A> void processBean(final @Observes ProcessBean<A> processBeanEvent) {
if (!foundJobOp) {
if (processBeanEvent.getBean().getTypes().contains(JobOperator.class)) {
if (processBeanEvent.getBean().getBeanClass().equals(JobOpProducerBean.class)) {
logger.log(Level.FINE, "BatchCDIInjectionExtension.processBean() detecting our own JobOpProducerBean");
} else {
logger.log(Level.FINE, "BatchCDIInjectionExtension.processBean() Found JobOperator of class: " + processBeanEvent.getBean().getBeanClass());
foundJobOp = true;
}
}
if (processBeanEvent.getBean().getTypes().contains(JobOperator.class)) {
if (processBeanEvent.getBean().getBeanClass().equals(JobOpProducerBean.class)) {
logger.log(Level.FINE, "BatchCDIInjectionExtension.processBean() detecting our own JobOpProducerBean");
} else {
logger.log(Level.FINE, "BatchCDIInjectionExtension.processBean() Found JobOperator of class: " + processBeanEvent.getBean().getBeanClass());
foundJobOp = true;
}
}
}
}

Expand Down

0 comments on commit 3d68111

Please sign in to comment.