IntelliJ code inspection JEE wrong: ManagedExecutorService

Answered

IntelliJ Code inspection marks the following code as incorrect:

 

@Singleton

public class BlaBla{

@Resource
private ManagedExecutorService threadPool;

@Resource
private ManagedScheduledExecutorService scheduledExecutorService;

...
}

But according to the Documentation at https://docs.oracle.com/javaee/7/api/javax/enterprise/concurrent/ManagedExecutorService.html

the ManagedExecutorService can be injected with @Resource into an application component and the EJB with the @Singleton
annotation is an application component according to EE.2.3. JEE7 specification.

In fact the application container injects both the ManagedExecutorService and ManagedScheduledExecutorService into our EJB.

The IntelliJ code inspection should not report this as wrong.

 

0
3 comments
Avatar
Permanently deleted user

Thank you, yes, I agree and have voted there.

0
Avatar
Permanently deleted user

I also voted. Still an issue in 2017.3

0

Please sign in to leave a comment.