能否同时将两个请求映射到单个无状态 EJB 实例
Can two request be mapped to a single stateless EJB instance concurrently
能否将两个请求同时映射到单个无状态 EJB 实例?
或者容器必须将请求映射到不同的实例或序列化请求?
This means, for example, that [...] the
container may interleave requests from multiple transactions to the same instance.
这听起来像是允许并发..
对有状态和无状态会话 bean 的请求必须由容器序列化。
这来自 EJB 3.1 specification 的第 4.3.14 节:
The container serializes calls to each stateful and stateless session bean instance. Most containers will
support many instances of a session bean executing concurrently; however, each instance sees only a
serialized sequence of method calls. Therefore, a stateful or stateless session bean does not have to be
coded as reentrant.
能否将两个请求同时映射到单个无状态 EJB 实例?
或者容器必须将请求映射到不同的实例或序列化请求?
This means, for example, that [...] the container may interleave requests from multiple transactions to the same instance.
这听起来像是允许并发..
对有状态和无状态会话 bean 的请求必须由容器序列化。
这来自 EJB 3.1 specification 的第 4.3.14 节:
The container serializes calls to each stateful and stateless session bean instance. Most containers will support many instances of a session bean executing concurrently; however, each instance sees only a serialized sequence of method calls. Therefore, a stateful or stateless session bean does not have to be coded as reentrant.