Java Persistance Application Stateless vs. Stateful

javajpastatefulstateless

I am new in JPA and I can't understand the use and the difference between stateless and stateful.

Any experiences?

regards,
Haythem

Best Answer

Stateless and Stateful are EJB Session Bean concept, not of JPA.

Nota bene: JPA is part of EJB specification, but can be used separately and outside of an EJB container. This is what usually causes the confusion.

Edited: A useful SO thread, Why Use Stateful Session Beans.