0
votes

I'm new in JPA and EJB. I've read such phrase:

Singleton session beans can use container-managed or bean-managed concurrency. The default is container-managed, which corresponds to a write lock on all business methods. All business method invocations are serialized so that only one client can access the bean at any given time.

Can someone simply explain me what does it mean: All business method invocations are serialized.

1

1 Answers

2
votes

The default lock type in case of container-managed concurrency on the business methods of a singleton session bean is LockType.WRITE which means that when a client of the SSB invokes one of the methods, the SSB will be locked to other clients. That is, no one else can invoke any business methods on the SSB until it finishes serving the actual client. Therefore, clients can only be served one after the other, in a serialized fashion.

Further reading: Java EE tutorial