This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
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
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).
Joined: Nov 27, 2001
You might be right Vish, I hadn't thought about that situation. thanks