I came across a note where it says obtaining two instances of a stateless bean via dependency injection will always be equal.
I tested it and it is true.
@EJB MySLBeanLocal mySLBean1;
@EJB MySLBeanLocal mySLBean2;
mySLBean1.equals(mySLBean2) always returns true.
But I am not sure what is the reason behind it? Isn't that while invoking stateless bean like that it is always upto the container to return which object from pool?
Any clarification will be really helpful.
I tested it and it is true.
@EJB MySLBeanLocal mySLBean1;
@EJB MySLBeanLocal mySLBean2;
mySLBean1.equals(mySLBean2) always returns true.
But I am not sure what is the reason behind it? Isn't that while invoking stateless bean like that it is always upto the container to return which object from pool?
Any clarification will be really helpful.