Delete EJB bean state in client

I am currently studying EJB, and as I understand it, when a client receives a session with a bean state, the server stores it in memory (or passivates it) until the client removes the bean. Pretty simple, but nowhere have I seen examples of how a client can really remove a bean. How do you do this, other than closing the client application? Or do I just need to implement the reset method in all my beans states if I want to start?

+4
source share
1 answer

If you have a business method that "terminates" the stream, annotate it with @Remove. Otherwise, we will provide the reset () method using the @Remove annotation.

+4
source

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


All Articles