org.objectweb.jonas.jtests.clients.exception
Class A_Catcher

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--org.objectweb.jonas.jtests.util.JTestCase
                    |
                    +--org.objectweb.jonas.jtests.clients.exception.A_Catcher
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
A_CatcherEntity, A_CatcherSession

public abstract class A_Catcher
extends JTestCase

Exception test cases common for all type of beans (Entity/Session)

Author:
Ph.Coq

Fields inherited from class org.objectweb.jonas.jtests.util.JTestCase
ictx, isInit, jonasName, msgerror, testtorun, utx
 
Constructor Summary
A_Catcher(java.lang.String name)
           
 
Method Summary
abstract  AccountS getAccountS(int i)
          This method depends on the home used to get it.
protected  void setUp()
          common setUp routine, used for every test.
 void testApplicationCallerTx1()
          Test business method throwing an Application exception.
 void testApplicationContTx1()
          Test business method throwing an Application exception.
 void testApplicationContTxRb1()
          Test business method throwing an Application exception.
 void testApplicationNotTx()
          Test business method throwing an Application exception.
 void testApplicationNoTx()
          Test business method throwing an Application exception.
 void testEJBContTx()
          Test business method throwing an EJBException Called inside a containertransaction (RequiresNew).
 void testRemoteCallerTx()
          Test business method throwing a RemoteException.
 void testUncheckedCallerTx()
          Test business method throwing an unchecked exception.
 void testUncheckedContTx()
          Test business method throwing an unchecked exception.
 void testUncheckedNoTx()
          Test business method throwing an unchecked exception.
 
Methods inherited from class org.objectweb.jonas.jtests.util.JTestCase
debug, getDBEnv, random, sleep, tearDown, testEmpty, unloadBeans, useBeans
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

A_Catcher

public A_Catcher(java.lang.String name)
Method Detail

setUp

protected void setUp()
Description copied from class: JTestCase
common setUp routine, used for every test.
Overrides:
setUp in class JTestCase

getAccountS

public abstract AccountS getAccountS(int i)
This method depends on the home used to get it. AccountS is the base interface of Account (common to Session/Entity)

testApplicationNoTx

public void testApplicationNoTx()
                         throws java.lang.Exception
Test business method throwing an Application exception. It must be caught by the client. The business method has NotSupported attribute. Spec 2.0 page 376 (table15)

testApplicationNotTx

public void testApplicationNotTx()
                          throws java.lang.Exception
Test business method throwing an Application exception. It must be caught by the client. The business method has NotSupported attribute. Test that the transaction has not been marked rollback. Spec 2.0 page 376 (table15)

testApplicationContTx1

public void testApplicationContTx1()
                            throws java.lang.Exception
Test business method throwing an Application exception. It must be caught by the client. A transaction is started in the container. (RequiresNew) Bean does NOT call setRollbackOnly Test that the AppException has been caught. Spec 2.0 page 376 (table15)

testApplicationContTxRb1

public void testApplicationContTxRb1()
                              throws java.lang.Exception
Test business method throwing an Application exception. It must be caught by the client. A transaction is started in the container. (RequiresNew) Bean calls setRollbackOnly Test that the AppException has been caught. Spec 2.0 page 376 (table15)

testApplicationCallerTx1

public void testApplicationCallerTx1()
                              throws java.lang.Exception
Test business method throwing an Application exception. It must be caught by the client. Methods runs in the context of the caller's transaction The business method has Mandatory attribute. Test that the transaction has not been marked rollback. Spec 2.0 page 375 (table15)

testUncheckedCallerTx

public void testUncheckedCallerTx()
                           throws java.lang.Exception
Test business method throwing an unchecked exception. Methods runs in the context of the caller's transaction TransactionRolledbackException must be caught by the client. The business method has Mandatory attribute. See EJB2.0 specs page 375 (table 15)

testUncheckedContTx

public void testUncheckedContTx()
                         throws java.lang.Exception
Test business method throwing an unchecked exception. Called inside a containertransaction. The client must receive RemoteException See EJB2.0 specs page 376 (table 15)

testUncheckedNoTx

public void testUncheckedNoTx()
                       throws java.lang.Exception
Test business method throwing an unchecked exception. Method runs with an unspecified transaction context (NotSupported) The client must receive RemoteException See EJB2.0 specs page 376 (table 15)

testEJBContTx

public void testEJBContTx()
                   throws java.lang.Exception
Test business method throwing an EJBException Called inside a containertransaction (RequiresNew). The client must receive RemoteException See EJB2.0 specs page 376 (table 15)

testRemoteCallerTx

public void testRemoteCallerTx()
                        throws java.lang.Exception
Test business method throwing a RemoteException. Methods runs in the context of the caller's transaction The bean method is TxMandatory The client must receive TransactionRolledbackException See EJB2.0 specs page 375 (table 15)