JBoss AS Question:

Download Job Interview Questions and Answers PDF

What if you need to span your transaction across multiple Servlet invocations?

JBoss Interview Question
JBoss Interview Question

Answer:

You can't with a Servlet. A JTA transaction must start and finish within a single invocation (of the service() method). You should consider using a Stateful SB. In a SFSB with a JTA transaction, the association between the bean instance and the transaction is retained across multiple client calls.

Download JBoss Interview Questions And Answers PDF

Previous QuestionNext Question
How can you start a JTA transaction from a Servlet deployed on JBoss?What are the differences between EJB 3.0 and EJB 2.0?