My application is assumed to increment a property in a stateful EJB,
but it does not work. Sum=0 all the time. If I change it to Stateless it works.
As I understood a Stateful EJB is created one per a client, but in my case it is like one per a request.

Remote interface
import javax.ejb.Remote;

public interface AddInterface {
int getSum();

Stateful EJB
import javax.ejb.Stateful;

public class SumBean implements AddInterface {
private int summa;

public int getSum() {
return summa++;

JSP client (summa.jsp)
InitialContext ctx = new InitialContext();
AddInterface myBean = (AddInterface)
<form action="summa.jsp">
<input type="submit" value="Send" />