I have a stateful session bean
but when a client calling method deposit, the value of balance is initializing by 0 every time a client makes a request
that is it is not storing the state so what do i do ?
please help me
posted 6 years ago
Stateful session bean will maintain the conversational state as long as the remote reference to it OR its state is stored using EJB Handle.
1. Keep a reference to the stateful session bean between requests in HTTP Session.
2. Serialize the handle to the bean, and then pass this serialized handle to the client in a cookie or persist it in the database. You can also store the handle in session using a key and pass the key as a cookie.