I have a JAX-RS webservice with a resource for generating testdata. During tests I found out, that the injected EJB is not reinitialized and still contains data from the la
You have the meaning of @Stateless
backwards.
This does not mean like so:
Hey container, here's an arbitrary class, please make it a stateless bean.
This actually means like so:
Hey container, here's a stateless class, you can safely use it as a stateless bean.
You have a stateful class. You should mark it as a @Stateful
bean. Otherwise, get rid of all the state (unmanaged instance variables) so you can safely use it as a @Stateless
bean.