aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes HF mock exam question.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "HF mock exam question.." Watch "HF mock exam question.." New topic
Author

HF mock exam question..

Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
Which statements are true for stateless session bean instances?
a. Any instance can be used for any client
b. conversational state must be retained across methods
c. conversational state must be retained across transactions
d. they can be passivated.
e. they do not support transactions.
according to the book, the Answer is A. I agree, but:
b, c: there's no conversational state in stateless session beans.
d: stateless session beans are not passivated
e: I was tempted to select this option, because since stateless beans don't hold conversation, how is the transaction managed?
How are you supposed to keep track of a transaction if every remote call is treated as a new one, and not attached to the previous one?


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1064
Andres,
I do not know if I have understood ur question correctly. I am not able to see a relation between transactionality and the converstational state of a client.
Transactions are maintained by the Container.
If I call a method foo1() on the stateless session bean and if this method updates table t1 and calls another method foo2(), which updates another table t2 and calls another method foo3(). If the method foo3() throws an exception for some reason, all the tables are rolled back. Aren't they?
(if the transaction attribute is Required).
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
You might be right Vish, I hadn't thought about that situation.
thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HF mock exam question..