Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
None
Description
Affects JBossAS 7.1.0.Alpha2-SNAPSHOT (with HEAD == 5058aab).
Currently it is not possible to specify e.g. eviction-executor attribute on <cache-container> element since it needs a scheduled executor to be defined in Threads susbystem like this
<scheduled-thread-pool name="infinispan-eviction">
<max-threads count="1" per-cpu="0"/>
<thread-factory name="infinispan-factory"/>
</scheduled-thread-pool>
When I define this and start EDG (based on the JBossAS above), I get the following error:
12:46:05,265 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.infinispan.default: org.jboss.msc.service.StartException in service jboss.infinispan.default: Failed to start service at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1780) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_21] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_21] at java.lang.Thread.run(Thread.java:619) [:1.6.0_21] Caused by: org.jboss.msc.inject.InjectionException: Injecting the wrong type (expected interface java.util.concurrent.ScheduledExecutorService, got class org.jboss.as.threads.ManagedScheduledExecutorService) at org.jboss.msc.inject.CastingInjector.inject(CastingInjector.java:53) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at org.jboss.msc.service.ServiceControllerImpl.doInject(ServiceControllerImpl.java:1562) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at org.jboss.msc.service.ServiceControllerImpl.access$1900(ServiceControllerImpl.java:49) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.performInjections(ServiceControllerImpl.java:1793) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1754) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] ... 3 more Caused by: java.lang.ClassCastException at java.lang.Class.cast(Class.java:2990) [:1.6.0_21] at org.jboss.msc.inject.CastingInjector.inject(CastingInjector.java:51) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] ... 7 more 12:46:05,779 INFO [org.jboss.as.controller] (Controller Boot Thread) Service status report Services which failed to start: service jboss.infinispan.default: org.jboss.msc.service.StartException in service jboss.infinispan.default: Failed to start service
The problem is that CacheContainerAdd.java is trying to add a Scheduled Executor dependency which is supposed to be of type ScheduledExecutorService.class. However, the Threads subsystem has recently changed (https://github.com/jbossas/jboss-as/commit/c803d7a4964554fdbe691f969f9766c8f7390d21#threads/src/main/java/org/jboss/as/threads/ScheduledThreadPoolAdd.java) and it creates a service builder of type ServiceBuilder<ManagedScheduledExecutorService> (see jboss-as/threads/src/main/java/org/jboss/as/threads/ScheduledThreadPoolAdd.java)
So I think it might be enough just to change the CacheContainerAdd.java to ask for ManagerScheduledExecutorService.class.
Attachments
Issue Links
- is blocked by
-
AS7-2545 ManagedScheduledExecutorService doesn't implement ScheduledExecutorService
- Resolved