This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about workflow

 
Anjali Sharma
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have code that deals with workflow of the system and you want the lightest weight EJB, which EJB should you use?
A.Entity
B.Stateful session bean
C.Stateless session bean
D.Servlet

I think the answer should be B, but the book says that correct answer is C. Can the workflow be implemented through stateless session bean? I guess stateless is used when the bean's state has no data for a specific client.
 
Parag Doshi
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the emphasis is on the most lightweight, then yes, stateless session beans is the right answer. And you can have stateless workflow (the customer state is normally passed in as a parameter to the methods).

Parag
 
Paulo Asterio Nunes
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeap,

Parag is right , I took many questions like that and ever focuses on "lightest weight" !

Regards,

Paulo Nunes
MCP OCP IBM285 SCJP 1.4 SCWCD 1.4 SCBCD 1.3
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic