• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

HF Mock exam doubts

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Won't you please? Please won't you be my neighbor? - Fred Rogers. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic