• Post Reply Bookmark Topic Watch Topic
  • New Topic

Basic Stateless session bean question  RSS feed

 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I spawn 10 threads(clients) and invoke methods on the same stateless session bean instance . The time interval between client method invocations is say a lot lesser than the time taken for the methods to complete.
Will I get an exception from the stateless session bean / will it queue all the requests and proceed without exceptions. If it queues the requests, i dont see any point using same SSB reference because it will bring down the performance.
Right now am lookign @ an application that has UI delegates which cache the SSB reference of the session facade.Now the application is obviously multithreaded. I wonder how this application works w/o throwing exceptions :-) if SSBs are not re-entrant.
 
Siva Jagadeesan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Karthik:
You are missing a very important point. THE CLIENT ALWAYS INRTERACTS WITH THE EjbObject NOT THE SESSION BEAN. It is upto the AppServer how it is polling the Stateless SessionBean. The Stateless Session Bean does not have any State so all the Bean instances in the pool are equal. That is why they are better then the Stateful Session Bean in performance
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!