Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Serializing session bean method  RSS feed

Ray Ye
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In EJB Spec 1.1, it states,
"A container serializes calls to each session instance. Most containers will support many instances of a session executing concurrently; however, each instance sees only a serialized sequence of method calls. Therefore, a session bean does not have to be coded as reentrant"
"Clients are not allowed to make concurrent calls to a session object. If a client-invoked business method is in progress on an instance when another client-invoked call, from the same or different client, arrives at the same instance, the container must throw java.rmi.RemoteException to the second client."...

I am confused here. Now that the container will serialize the calls to a session bean instance, why it throws RemoteException to a second client trying to invoke the method of the same instance executing a method? Should not it just serialize the second call?


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!