Skip to content

Commit

Permalink
Merge pull request #79 from scottkurz/fix-78
Browse files Browse the repository at this point in the history
Fixes issue #78
  • Loading branch information
scottkurz authored May 14, 2022
2 parents de5a9a8 + 3d68111 commit 7fc8494
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 7fc8494

Please sign in to comment.