its used in local transaction...
there are two kinds of transaction, namely Local transaction and Global Transaction..
and there are two kinds transaction management in EJB, namely Container Manage Transaction (CMT) and Bean Manage Transaction...
the Local Transaction involve only one resource (in this instance its involve 1 database)
the Global Transaction involve several resources (in this instance its involve 1/more database, JMS, and etc)..
you could inject JTA through UserTransaction in EJB for handle transactions..
subject: How to create a Template for EntityManager in a WebApplication