• 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

question 50 HF-EJB, page 673 final exam

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I need some clarification regarding the answer for question 50 of the final exam. I would repeat the question to save you the time from looking into the book.

Q) To ensure bean portability, which transaction attributes should be used on the business methods in the component interface of an entity bean using CMP?

A. Not Supported
B. Required
C. Supports
D. RequiresNew
E. Mandatory
F. Never

I answered (A, B and D) but the correct answer is (B,D and E).

May be I do not understand the actually meaning of portability they are talking about but I would have thought that making business method having mandatory trans attribute would not make it completely portable with anyone else's code that uses my bean as they are forced to call this method from a transactional context.

And why would having a "Not Supported" trans attribute make my bean non-portable. This mean all my getter's methods need to run under a transaction in order to make my bean portable ??

Please advise if i am missing something.

Thank-you,

Regards,
Hiten.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
portable means your business methods should behave simalarly in all containers. When tran attr is "Not Supported", the business method will run in "unspecified context" which means that the behaviour is container dependent.

--Prashant
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic