If my understanding is correct, the container does not make concurrent calls to an SLSB. Calls are serialized or a new SLSB instance is created. My questions are:
Is it safe to access the SLSB from a singletion which has ConcurrencyManagement.BEAN, where concurrent calls can happen?
And if it is safe, is it also safe to use an entitymanager instance inside the SLSB, because entitymanager is not thread safe and if the SLSB instance is shared between different threads, the entitymanager is also shared between the threads.
Thanks in advance!
Yes for both questions, it's safe. One session bean, stateless or stateful could be used by only one thread at a time.
From EJB 3.1 specification:
http://download.oracle.com/otndocs/jcp/ejb-3.1-pfd-oth-JSpec/
In case 2 concurrent calls come from your singleton, these will be served by 2 different instances of SLSB.