I have a stateless EJB:
@Stateless
public class DefaultStatelessService implements StatelessService {
private Object o;
}
where I use provate field o
in few private methods. The question is: after the stateless will finish it's job will its state be cleared?
For example:
- Stateless instance has been taken from pool.
- State of private field
o
has been changed during stateless job. - Stateless instance has been returned to pool.
- Some other operation taken the same stateless instance and want to use it - is object
o
in the same state as before or it has been cleared?