Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

HF Mock exam doubts

 
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
 
Ranch Hand
Posts: 211
  • 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: 211
  • 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.
 
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
 
You firghten me terribly. I would like to go home now. Here, take this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic