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 in Web tier

 
Leyong
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Guys:
Could you have any explanation for following
transaction questions in Web tier?
True or false:
1. Sevlets or JSPs can use JNDI to lookup a UserTransaction
and use it.
2. Sevlets or JSPs can use JTA.
( how to do it?
In CMT beans , we can use setRollbackOnly and
getRollbackOnly() methods of thr EJBContext to interact
with the curent transaction. )
3. Servlets can start transactions in any of its methods.
I cannot find any clues about these questions in EJB 2.0 spec
and Servlet 2.3 spec.

I guess true for 1 and 2. How about Q.3?
Thanks!
 
Leyong
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question from JavaCoding.net Mock Exam
QUESTION :
You have been assigned the task of porting an Perl/CGI based
transactional application to Java.
What set of technologies should you use?
POSSIBLE ANSWERS:
* Applets
* JSP/Servlets
* EJBs
* JSP/Servlets + EJBs (CORRECT)
* JSP/Servlets + JavaBeans
SOLUTION:
If transactionality is involved, EJB is the way to go.
I think the second answer is also correct.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic