Java Persistance Application Stateless vs. Stateful

Haythem picture Haythem · Feb 2, 2011 · Viewed 11.6k times · Source

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

Any experiences?

regards, Haythem

Answer

Adeel Ansari picture Adeel Ansari · Feb 2, 2011

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.