No resources injected for 2nd @SagaEventHandler on Saga (No Spring)

I’m programmatically creating the following SagaManager:

GenericSagaFactory sagaFactory = new GenericSagaFactory();
List<Object> injectedResources = newArrayList(eventBus, commandGateway);
injectedResources.addAll(resources);
SimpleResourceInjector resourceInjector = new SimpleResourceInjector(injectedResources);
sagaFactory.setResourceInjector(resourceInjector);

sagaManager = new AsyncAnnotatedSagaManager(sagaTypes);
sagaManager.setSagaRepository(mongoSagaRepository);
// TODO: Are we breaking the default parameter resolvers for @MetaData and @Timestamp this way?
sagaManager.setSagaFactory(sagaFactory);
eventBus.subscribe(sagaManager);
sagaManager.start();

I have a SomethingSaga defined as follows:

public class SomethingSaga extends AbstractAnnotatedSaga {
    private String userId;

    private transient IdentityService identityService;
    private transient CommandGateway gateway;

    @StartSaga
    @SagaEventHandler(associationProperty = "userId")
    public void handle(final SomethingHappenedEvent evt) {
        // (1) Gateway is automatically injected
        gateway.send(...); // This command will apply(SomethingCreatedEvent)
    }

@SagaEventHandler(associationProperty = "userId")
public void handle(final SomethingCreatedEvent evt) {

Hi,

did you set the ResourceInjector in your mongoSagaRepository as well?

Gianluca

I added the ResourceInjector to the mongoSagaRepository and it worked.

Thanks!