Correct usage of Stateful Beans with Servlets

后端 未结 5 758
走了就别回头了
走了就别回头了 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:48

    Until you provide some code and the stacktrace, I'd suggest that you consider using a connection pool. If by "unknown database" you mean a database whose parameters are supplied by the end user, and hence no preconfigured connection pool is possible, you can still use the connection pool concept, rather than opening a new connection each time.

    Also, theck this thread.

提交回复
热议问题