FileDocCategorySizeDatePackage
StatefulTxBean.javaAPI DocJBoss 4.2.13385Fri Jul 13 20:53:28 BST 2007org.jboss.ejb3.test.arjuna

StatefulTxBean

public class StatefulTxBean extends Object implements StatefulTx
author
William DeCoste

Fields Summary
private static final Logger
log
private TransactionManager
tm
private EntityManager
manager
Constructors Summary
Methods Summary
public booleanclear(org.jboss.ejb3.test.arjuna.Entity entity)

     entity = manager.find(Entity.class, entity.getId());
     if (entity != null)
        manager.remove(entity);
     
     return getReturn();
   
protected booleangetReturn()

      if (tm.getTransaction() == null)
         return false;
      
      if (!tm.getClass().toString().contains("arjuna"))
         return false;
      
      if (!tm.getTransaction().getClass().toString().contains("arjuna"))
         return false;
      
      return true;
   
public booleanisArjunaTransactedRequired()

      return getReturn();
   
public booleanisArjunaTransactedRequiresNew()

      return getReturn();
   
public booleanpersist(org.jboss.ejb3.test.arjuna.Entity entity)

      manager.persist(entity);
      
      return getReturn();