Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HF Mock exam doubts

 
Deep Chand
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[A] Q5 (page 639):

The answer says: All calls to a MDB instance must be serialized.
What does 'serialized' mean? Shouldn't it be synchronized?

[B] Q 49 [page 673]

What are true about transactions in EJB 2.0?
One of the correct answers given are:

Entity beans with BMT demarcation must use the getStatus method instead of the getRollbackOnly method.

Isn't this wrong? I thought Entity Beans have to be CMT and that's why we skip mentioning the transaction-type attribute in the DD for entity beans.

Please reply

Thanks
Deep
 
Keerthi P
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does 'serialized' mean? Shouldn't it be synchronized?

Its the opposite of 'concurrent'.
In this context, it means that a MDB instance cannot service the calls concurrently. The container sequences the (onMessage()) method call one after the other.
 
Keerthi P
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the correct answers given are:

Entity beans with BMT demarcation must use the getStatus method instead of the getRollbackOnly method.

Isn't this wrong?


Agree. Did you check the book errata.
 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Deep

I have reproduced this from EJB specs.

15.4.6 Serializing Message-Driven Bean Methods
The container serializes calls to each message-driven bean instance. Most containers will support many instances of a message-driven bean executing concurrently; however, each instance sees only a serialized
sequence of method calls. Therefore, a message-driven bean does not have to be coded as reentrant. The container must serialize all the container-invoked callbacks (e.g., ejbRemove, ejbTimeout methods), and it must serialize these callbacks with the message listener method calls.

Thanks

-- Ravi
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic