I wrote an application that is using beans for creating and storing books(titles,authors etc) to the database. The basic functions for adding and deleting books are implemented in a local stateless bean.
My problem is that I don’t quite get how this would work in a concurrent way. If two users would like to get a handle on the managing bean at the same time would this work by default? And if so how exactly does it deal with concurrent requests?
Thanks
Note: Only creation and deletion should be supported.No editing! So I suppose that there are no conflicts there in terms of writes and reads!
There can only be one calling thread per EJB instance at a given time. EJBs are (most of the time) pooled by the container: if two clients call the same method (or different methods on the same EJB type) they will be given different instances by the container or one will have to wait until one instance is ready to handle its call.