I am trying to use the Spring Framework IoC Container to instantiate the ThreadPoolExecutor.CallerRunsPolicy class. In Java, I would do it like this ...
import java.util.concurrent.RejectedExecutionHandler; import java.util.concurrent.ThreadPoolExecutor; ... RejectedExecutionHandler rejectedExecutionHandler = new ThreadPoolExecutor.CallerRunsPolicy();
But when I try to make an equivalent in Spring, it throws a CannotLoadBeanClassException.
<beans> <bean class="java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy"/> </beans>
In summary: in Spring ApplicationContext XML, how can you call the constructor of a static inner class?
java spring dependency-injection inversion-of-control ioc-container
Drew
source share