Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is the stateful bean the better choice than stateless because of the possibility of utilizing the SessionSynchronization interface?

0
Posted

Is the stateful bean the better choice than stateless because of the possibility of utilizing the SessionSynchronization interface?

0

The answer is no, it is not possible to claim that the one kind is better than the other. They are just different and it depends on the application design which of them is more suitable. SessionSynchronization interface is useless for stateless sessions because the instances are not associated with the session – they are stateless. That means that different methods in the same session (through the same EJBObject) could be (and most probable are) invoked on different instances so they must not keep any information between method calls.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123