This content has been marked as final. Show 4 replies
It could be the same instance or a different instance. You should never need to know if they are the same instance because your stateless EJB should not keep state.
yeah it is the concept but even the method calls are in the same block of code?
Yes, every call that you make from a stateless EJB client (even on the same reference) could get serviced by different instances.
The heart of the question is that it doesn't matter if it is the same instance or different ones. As r035198x (jebus, what a name to type) already so succinctly stated, stateless beans should not keep any state. so it doesn't matter if it is a new instance for every call or the same instance. There is nothing you are going to miss when the container chooses to service you instance #2 in stead of instance #1 like in the last EJB method invoked.1 person found this helpful
I would focus my questioning on the parts of the EJB spec that ARE important to know, like transaction management and propagation.