Correct usage of Stateful Beans with Servlets

后端 未结 5 756
走了就别回头了
走了就别回头了 2020-11-30 05:06

We currently have a Stateful bean that is injected into a Servlet. The problem is that sometimes we get a Caused by: javax.ejb.ConcurrentAccessException: SessionBean i

5条回答
  •  遥遥无期
    2020-11-30 05:47

    you should never syncronize servlet or ejb access since this cause requests queue and if you have N concurrently users the last one will wait for a long time and often get a timeout response!!! Syncronize method is not intended for this reason!!!

提交回复
热议问题