package fr.titionfire.ffsaf.ws;

import jakarta.enterprise.inject.Produces;
import jakarta.inject.Named;
import jakarta.inject.Singleton;

import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

@Singleton
public class ExecutorProducer {

    @Produces
    @Named("notify-executor")
    public Executor produceNotifyExecutor() {
        // Créez un pool de threads avec une taille fixe (par exemple, 10 threads)
        return Executors.newFixedThreadPool(10);
    }
}
