java ee - how is state of instance variables of a stateless bean preserved for next invocation in EJB? -
I am reading and what he says here for Stateless Bean. I'm confused with what I mean by the marked statement in bold below.
A stateless session does not maintain an interactive position with the Bean client. When a client invokes the methods of a stateless bean, the instance variable of the bean may have a specific situation for that client, but only when the method expires for the period of invocation, then create a client-specific state Should not be kept. Customers, however, can change the status of the instance variables in the pooled stateless beans, and this condition is kept in the next volume of the stateless bean pooled. During the method orientation, all instances of a stateless bean are equivalent, which allows EJB container to allocate an instance to any client. That is, the status of a stateless session bean should apply to all customers. However by this post, There is no related interactive state of a stateless session, bean is an object, but the example state may be this bean Does not allow concurrent access. The contents of the example variable are not guaranteed to be preserved in the method call. All examples of a stateless session bean should be treated by the customer as equal. I think there is a paradox here. Documents claim (by my understanding) that the variable state of the example has been preserved in the next inventions, while in the latter post it has been claimed that the state has not been preserved. please explain PS: I have read this post: but I did not understand the answer Edit << P / P Stateless session beans (SLSBs) are not tied to a customer and there is no guarantee of receiving the same example for each client (some containers can be made and each method will be accompanied by a session of beans Destroy, this is an implementation-specific decision, but the examples are mango And I do not mention the cluster environment). In other words, although stateless beans can have example variables, these fields are not specific to a customer, so do not trust them between remote calls Slss are usually made in multiples and placed in a pool. Therefore, for example EJB When a customer When a customer is done with an SLSB, the example is usually returned to the pool, not destroyed . What does this mean that the only unique EJB object created on the container startup could have imagined on the heap for the duration of the uptime of the container. It repeats that the bear: The container was put in the service first when EJB was put and the same SLSB that were pooled, is kept alive through the uptime of the container There is no guarantee that the client requesting
UserDataService , many examples will be created and submitted
UserDataService , a container is a deposit One of the examples is going to serve any when two customers request the same EJB services, two different examples will be served < / Li>
UserDataService will receive there is no guarantee that the customer ( 2) will receive an example of
UserDataService on that two different requests for that EJB, what does it mean with a conversational state ? You are not guaranteed to talk to the same example of EJB on many invitations This does not mean that the middle request has been destroyed by EJB, just in the process of cycling, you are not sure How your client will be related to
Comments
Post a Comment