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

Transaction questions

 
Edward Chen
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.
 
Sudhir V
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this link for the first question
http://www.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
 
Micheal Lau
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic