| This interface is a representative for the javax.transaction.TransactionManager object. It only
contains the COMPONENT_URL for use when application code wants to acess javax.transaction.TransactionManager
Note that the average complexity business level application should use javax.transaction.UserTransaction for simple
transaction management (begin, commit, rollback, getStatus ) functionality. The javax.transaction.TransactionManager is too low level
and should only be used for system level purposes (i.e. suspending or resuming transactions). This is why
this object is not available in some parts of the system, particularly clients. For example simple java application,
which runs in separate JVM and is a client to JBoss application server will not have access to the TransactionManager object
(it will, however, have access to UserTransaction object). Given all of this, in order to remain platform independent and
portable, TransactionManager object should only be used in middle tiers of the system and not at the client.
To access JTA's TransactionManager object in platform independent way :
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.transaction.TransactionManager;
...............................
...............................
Context lContext = new javax.naming.InitialContext();
TransactionManager lTransactionManager = (TransactionManager)lContext.lookup(com.metaboss.enterprise.transaction.TransactionManager.COMPONENT_URL);
|