I am somewhat confused by the term distributed transactions.
Case 1: Your application consists of two EJBs running in separate VMs. There is only one database involved so the two phase protocol is not required. If the first EJB starts a transaction and then calls a method in the second EJB which uses transaction attribute Required, then the transaction context must be propagated between the EJBs.
Case 2: Your application consists of several EJBs all running in the same VM. Transactions running in the application might span different databases and/or message servers. This means that a transaction manager and the two phase protocol is needed for commit and rollback operations.
Which of these cases best fits the term "distributed transaction" ? I guess my question is what decides whether a transaction is distributed or not, the application itself being distributed (requiring RMI or something similar) or the fact that the application works with more than one resource manager (requiring use of the two phase protocol ?
I ask because I am not sure how to interpret statements such as this one about the embedded transaction manager in JBoss (from "Java Transaction Processing"): "...the current implementation does not support distributed transactions (although it is JTA compliant)...".