Bug 1147638

Summary: Unnecessary WARN [ExecutorServiceFactory] No CDI BeanManager found in JNDI
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jiri Svitak <jsvitak>
Component: jBPM CoreAssignee: Alessandro Lazarotti <alazarot>
Status: CLOSED EOL QA Contact: Marek Baluch <mbaluch>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: mbaluch
Target Milestone: ER2   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:02:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Svitak 2014-09-29 16:02:33 UTC
Each executor service thread produces this warning. I am not aware of the fact that the ExecutorService somehow depends on CDI, so I think this message should be disabled. Can you explain the purpose of this message?

My env:
BPMS 6.1.0.DR3
H2 db

Comment 1 Maciej Swiderski 2014-09-29 17:17:31 UTC
it is to allow use of CDI bean in executor commands. Not always it's possible to look up bean manager in JNDI from background thread thus executor attempts to look it up on start and add it to the contextual data so it can be found in case JNDI look up fails.

https://github.com/droolsjbpm/jbpm/blob/master/jbpm-services/jbpm-executor/src/main/java/org/jbpm/executor/cdi/CDIUtils.java#L35

we can hid the warning message or make it info as it's not critical unless you want to use CDI bean from within commands. In standalone environment of course it does not apply 

Wdyt?

Comment 2 Jiri Svitak 2014-09-30 08:23:57 UTC
Thanks Maciej. I thought this message is just unnecessary leftover. Now it makes sense.

Unfortunately I do not know what would be the best solution. Probably it could be good idea to rephrase the warning. For example

WARN: CDI beans cannot be used in executor commands, because no CDI manager has been found.

This would be more clear for me. What do you think?

Comment 3 Maciej Swiderski 2014-09-30 09:59:43 UTC
good idea to update the message, will apply the change.

Comment 4 Maciej Swiderski 2014-09-30 14:01:20 UTC
fixed on master

jbpm
master:
https://github.com/droolsjbpm/jbpm/commit/f149c3ae91f8b682d93bf3226875b17c39bff2c6

Comment 5 Jiri Svitak 2014-11-21 11:02:52 UTC
Verified in BPMS 6.1.0.ER2.

This was a small request for a more meaningful warning message for developers, no automatic test by QE is necessary.