FileDocCategorySizeDatePackage
ArjunaTestCase.javaAPI DocJBoss 4.2.12468Fri Jul 13 20:53:28 BST 2007org.jboss.ejb3.test.arjuna.unit

ArjunaTestCase

public class ArjunaTestCase extends org.jboss.test.JBossTestCase
author
William DeCoste

Fields Summary
private static final Logger
log
Constructors Summary
public ArjunaTestCase(String name)


     
   
      super(name);
   
Methods Summary
public static junit.framework.Testsuite()

      return getDeploySetup(ArjunaTestCase.class, "arjuna-test.jar");
   
public voidtestStatefulTx()

     
      StatefulTx stateful = (StatefulTx)getInitialContext().lookup("StatefulTx");
      assertNotNull(stateful);
      
      boolean arjunaTransacted = stateful.isArjunaTransactedRequired();
      assertTrue(arjunaTransacted);
      arjunaTransacted = stateful.isArjunaTransactedRequiresNew();
      assertTrue(arjunaTransacted);
      
      Entity entity = new Entity();
      entity.setName("test-entity");
      entity.setId(1234L);
      
      arjunaTransacted = stateful.clear(entity);
      assertTrue(arjunaTransacted);
      
      arjunaTransacted = stateful.persist(entity);
      assertTrue(arjunaTransacted);
      
      stateful.clear(entity);