As per my understanding, stateless EJB thread safety comes from the fact that
concurrent requests to the same SLSB will be served by different intances of that particular bean, each one with it own instance variables.
For example if a stateless ejb has a instance variable, such as an int counter, each pooled EJB will be using a different counter variable.
Does the same apply also with injected variables as in the following example:
@Stateless
public class User implements UserHomeLocal, UserHomeRemote
{
@PersistenceContext(name="J2EE")
private EntityManager manager;
}
More generally: is there any case in wich pooled beans can share instance variables as a result of dependency injection?