Win a copy of AWS Security this week in the Cloud/Virtualization 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

Transaction questions

 
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, anybody can help me this questions? Thanks.
Edward
---------------------------
1. Entity bean can not use BMT?
2. if onMessage() return beforecommiting a transaction, what kind of exceptions it will throw?
3. To ensure bean portability, which transaction attributes should be used on the business methods in the compononent interface of an entity bean using CMP?
A. NotSupported
B. Required
C. Supports
D. RequiresNew
E. Mandatory
F. Never
The answer is B. D. E
what is meaning of "bean portability"? I don't know why "Mandatory" is correct. Mandatory is very dangerous.
 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this link for the first question
https://coderanch.com/t/158595/java-EJB-SCBCD/certification/BMT-Must-not-used-Entity
 
Sudhir V
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Portability" ensures that a bean developed for one container can be migrated to another if another brand offers more performance, features, or savings. Portability also means that the bean developer's skills can be leveraged across several EJB container brands, providing organizations and developers with better opportunities.In addition to portability, the simplicity of the EJB programming model makes EJB valuable. Because the container takes care of managing complex tasks like security, "transactions", persistence, concurrency and resource management the bean developer is free to focus attention on business rules and a very simple programming model.
I think the reason why options A C F are incorrect because they run in "Unspecified Transaction Context". So if the business method relies on a transaction attribute then it better be one of the other three coz we know how the container is going to behave.
 
Sudhir V
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"if onMessage() return beforecommiting a transaction, what kind of exceptions it will throw?"
This is the answer I found for this question
http://www.revisingscbcd.co.uk/transactions/transactionspg5.jsp
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as onMessage() has no "client", so there will be no checked exception will be thrown,.. so i think the only choice is EJBException
 
The longest recorded flight time of a chicken is 13 seconds. But that was done without this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic