• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HF mock exam question..

 
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might be right Vish, I hadn't thought about that situation.
thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic