Bug in JSR 239 Concurrency impl?
suikast42 Apr 2, 2014 5:16 AMI'm playing with the Concurrency API aka JSR 239 with wildfly 8.0.0.Final
For that I'm injecting a excecutor service with
@Resource
private ManagedExecutorService executorService;
But if I'll excecute the method executorService.isTerminated() then wildfly thorws the exception shown below:
at io.undertow.websockets.jsr.annotated.BoundMethod.invoke(BoundMethod.java:58) [undertow-websockets-jsr-1.0.0.Final.jar:1.0.0.Final] at io.undertow.websockets.jsr.annotated.AnnotatedEndpoint$AnnotatedEndpointFrameHandler$5.run(AnnotatedEndpoint.java:299) [undertow-websockets-jsr-1.0.0.Final.jar:1.0.0.Final] at io.undertow.websockets.jsr.ServerWebSocketContainer$1.run(ServerWebSocketContainer.java:230) [undertow-websockets-jsr-1.0.0.Final.jar:1.0.0.Final] at io.undertow.websockets.jsr.OrderedExecutor$ExecutorTask.run(OrderedExecutor.java:49) [undertow-websockets-jsr-1.0.0.Final.jar:1.0.0.Final] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25] at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25] Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_25] at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_25] at io.undertow.websockets.jsr.annotated.BoundMethod.invoke(BoundMethod.java:54) [undertow-websockets-jsr-1.0.0.Final.jar:1.0.0.Final] ... 6 more Caused by: java.lang.IllegalStateException: Lifecycle operation not supported at org.glassfish.enterprise.concurrent.AbstractManagedExecutorServiceAdapter.isTerminated(AbstractManagedExecutorServiceAdapter.java:73) [javax.enterprise.concurrent-1.0.jar:] at com.siemag.base.web.frontend.controller.WMSManagementController.refresh(WMSManagementController.java:176) [classes:] at com.siemag.base.web.frontend.controller.WMSManagementController$PLCSocketDataClientEndpoint.onMessage(WMSManagementController.java:64) [classes:] ... 11 more
As I can see there are two implentations
1. org.glassfish.enterprise.concurrent.AbstractManagedExecutorServiceAdapter
2. org.glassfish.enterprise.concurrent.AbstractManagedExecutorService
The @Resource Lookup gives me always an instance of the apapter class. Why?? What am I doing wrong?