FileDocCategorySizeDatePackage
PMTransactionManagerImpl.javaAPI DocGlassfish v2 API4770Fri May 04 22:32:58 BST 2007com.sun.ejb.containers

PMTransactionManagerImpl

public class PMTransactionManagerImpl extends Object implements TransactionManager, Serializable
A "wrapper" implementation of javax.transaction.TransactionManager used by the container to communicate with the PersistenceManager. The PM can only call getTransaction and getStatus methods. This object is available at the JNDI name "java:pm/TransactionManager".

Fields Summary
private transient TransactionManager
transactionManager
Constructors Summary
PMTransactionManagerImpl()
Create a transaction manager instance


              
     
Methods Summary
public voidbegin()


        throw new IllegalStateException("Operation not allowed");
    
public voidcommit()


        throw new IllegalStateException("Operation not allowed");
    
public intgetStatus()
Obtain the status of the transaction associated with the current thread.

return
The transaction status. If no transaction is associated with the current thread, this method returns the Status.NoTransaction value.

	if ( transactionManager == null )
	    transactionManager = Switch.getSwitch().getTransactionManager();
	return transactionManager.getStatus();
    
public javax.transaction.TransactiongetTransaction()
Get the transaction object that represents the transaction context of the calling thread

	if ( transactionManager == null )
	    transactionManager = Switch.getSwitch().getTransactionManager();
	Transaction tx = transactionManager.getTransaction();
	if ( tx == null )
	    return null;
	else
	    return new PMTransactionImpl(tx);
    
public voidresume(javax.transaction.Transaction suspended)


        throw new IllegalStateException("Operation not allowed");
    
public voidrollback()


        throw new IllegalStateException("Operation not allowed");
    
public voidsetRollbackOnly()


        throw new IllegalStateException("Operation not allowed");
    
public voidsetTransactionTimeout(int seconds)


        throw new IllegalStateException("Operation not allowed");
    
public javax.transaction.Transactionsuspend()

        throw new IllegalStateException("Operation not allowed");