org.objectweb.jonas.jtests.clients.local
Class A_ClientView

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--org.objectweb.jonas.jtests.util.JTestCase
                    |
                    +--org.objectweb.jonas.jtests.clients.local.A_ClientView
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
F_ClientViewSL

public abstract class A_ClientView
extends JTestCase

This Class defines Test cases that can be run either SF or SL bean. These tests are related to the "Client View of a Session Bean" A session bean that supports both Local & Remote interface is used (TargetSL oe TargetSF in beans/local) Here are testcases taht must be run remotly

Author:
Ph Coq, Ph Durieux
See Also:
specification Chapter 6.

Fields inherited from class org.objectweb.jonas.jtests.util.JTestCase
ictx, isInit, jonasName, msgerror, testtorun, utx
 
Constructor Summary
A_ClientView(java.lang.String name)
           
 
Method Summary
abstract  TargetSLLocalHome getLocalHome()
           
 void testEjbLocalRef()
          EJBLocal Reference This test verify that we can look up a LocalHome Object via the java:comp/env subcontext
 void testEjbRef()
          EJB Reference This test verify that we can look up a Home Object of a bean in the same ejbjar file via the java:comp/env subcontext using an ejb-reference contains an ejb-link.
 void testEjbRefWithJonasEjbRef()
          EJB Reference This test verify that we can look up a Home Object of a bean (in the same ejbjar file) via the java:comp/env subcontext using an ejb-reference with a jonas-ejb-reference.
 void testLocalBusinessMethod1()
          This test verify we can create a Local session , access to the bean via its local interface and remove it It verifies we cannot access to the bean after remove
 void testLocalBusinessMethod2()
          Same test than testLocalBusinessMethod1 but two calls to businessmethod
 void testLocalBusinessMethod3()
          test 3 Local Business Methods
 void testLocalCreateRemove()
          This test verify we can create a Local session bean and remove it
 void testLocalGetPrimaryKey()
          test EJBLocalObject.getPrimary Key This test verify that an EJB Exception must be catched
 void testLocalIsIdenticalOnSameBean()
          test EJBLocalObject.isIdentical on the same bean
 void testLocalLookup()
          Lookup a LocalHome Object This test verify that we can look up a LocalHome Object via the root context
 void testLocalRemoveByPK()
          test that EJBLocalHome.remove(pk) should raise EJBException (API) or RemoveException (spec EJB 2.0 6.3.2)
 
Methods inherited from class org.objectweb.jonas.jtests.util.JTestCase
debug, getDBEnv, random, setUp, 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_ClientView

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

getLocalHome

public abstract TargetSLLocalHome getLocalHome()
                                        throws java.lang.Exception
Returns:
TargetSLLocalHome

testLocalLookup

public void testLocalLookup()
                     throws java.lang.Exception
Lookup a LocalHome Object This test verify that we can look up a LocalHome Object via the root context

testEjbRef

public void testEjbRef()
                throws java.lang.Exception
EJB Reference This test verify that we can look up a Home Object of a bean in the same ejbjar file via the java:comp/env subcontext using an ejb-reference contains an ejb-link.

testEjbRefWithJonasEjbRef

public void testEjbRefWithJonasEjbRef()
                               throws java.lang.Exception
EJB Reference This test verify that we can look up a Home Object of a bean (in the same ejbjar file) via the java:comp/env subcontext using an ejb-reference with a jonas-ejb-reference.

testEjbLocalRef

public void testEjbLocalRef()
                     throws java.lang.Exception
EJBLocal Reference This test verify that we can look up a LocalHome Object via the java:comp/env subcontext

testLocalCreateRemove

public void testLocalCreateRemove()
                           throws java.lang.Exception
This test verify we can create a Local session bean and remove it

testLocalBusinessMethod1

public void testLocalBusinessMethod1()
                              throws java.lang.Exception
This test verify we can create a Local session , access to the bean via its local interface and remove it It verifies we cannot access to the bean after remove

testLocalBusinessMethod2

public void testLocalBusinessMethod2()
                              throws java.lang.Exception
Same test than testLocalBusinessMethod1 but two calls to businessmethod

testLocalBusinessMethod3

public void testLocalBusinessMethod3()
                              throws java.lang.Exception
test 3 Local Business Methods

testLocalIsIdenticalOnSameBean

public void testLocalIsIdenticalOnSameBean()
                                    throws java.lang.Exception
test EJBLocalObject.isIdentical on the same bean

testLocalGetPrimaryKey

public void testLocalGetPrimaryKey()
                            throws java.lang.Exception
test EJBLocalObject.getPrimary Key This test verify that an EJB Exception must be catched

testLocalRemoveByPK

public void testLocalRemoveByPK()
                         throws java.lang.Exception
test that EJBLocalHome.remove(pk) should raise EJBException (API) or RemoveException (spec EJB 2.0 6.3.2)