• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Petstore understanding WebClientControllerImpl??

 
andy armstrong
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It says " All the methods that access the EJB are synchronized so that concurrent requests do not happen to the stateful session bean. "
but doesn't the application server handle the
syncrhonization issues and thus taking it out
of the developer and designers hands?
 
Shawn Xie
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think "the application server handle the
syncrhonization issues and thus taking it out
of the developer and designers hands" only apply to entity beans. Developers only need to specify transaction attributes either through CMT and BMT and let the app server take care of how a same entity beans are accessed by mulitiple users at the same time.
Stateful session beans do not support concurrent acess. Although at first sight, it seems concurrent access to a stateful session bean is impossible because each stateful session bean just serves one client. Remember, however, the client here has broader meaning than a person and it can be a program and this program can be multi-threaded program. The possibility of concurrent acess to a stateful sesion bean is therefore exist and we need some kind of mechanism to prevent it from happening.
 
Shawn Xie
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correction to my previous reply:
Entity beans only allow CMT.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic