What are the benefits in having a bunch of pooled "stateless instances" instead of one "stateless singleton bean" in Java-EE?
Singleton Java-EE:
@ApplicationScoped
public class MySingletonDAO {
// no global properties are shared
..
}
or an alternative stateless singleton bean:
@Singleton
@ConcurrencyManagement(ConcurrencyManagementType.BEAN)
public class MySingletonDAO {
// no global properties are shared
..
}
Stateless Java-EE:
@Stateless
public class MyStatelessDAO {
..
}
I cannot see any benefit in using a @Stateless
-bean instead of a "stateless singleton"-bean. Are there any?