RuntimeEnvironmentFactoryBean allows to set any implementation of RegisterableItemsFactory so I would go for creating one that is a spring bean and can take any other beans to be returned as work item handlers or event listeners. That way you will have all these components being still under spring management.
Used custom WorkItemHandlerProducer with RegisterableItemsFactory and everything worked as expected!
can you give me a code example of doing this?
I have the same problem...