Using Java Persistance Stateless vs. Stateful

I am new to JPA and I cannot understand the use and difference between stateless and state.

Any experiences?

Regards, Haythem

+3
source share
4 answers

"Stateful" and "Stateless" are attributes of the beans session.

A bean session (in short) provides a way to call methods on an application server. bean is an instance of the java class. Typically, a bean is destroyed after the remote method completes (and returns a result). These bean are stateless.

( ) bean, "" . beans "stateful" ( ).

+3

Stateless Stateful EJB Session Bean, JPA.

Nota bene: JPA EJB, EJB. , .

: SO, Beans.

+7

Stateful Stateless - EJB ( Java EE Beans), - JPA. A Stateful bean , . Stateless beans , , , , .

JPA - , stateful beans ( , JDBC ).

0

I think part of the confusion is that the Java Persistence API is part of the EJB3 specification and sometimes seems interchangeable with EJB. I did not understand this until I launched the Pro EJB 3: Java Persistence API . Take a look at http://en.wikipedia.org/wiki/Enterprise_JavaBean , which seems to be a good overview on this.

0
source

Source: https://habr.com/ru/post/1789442/


All Articles