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

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--org.objectweb.jonas.jtests.util.JTestCase
                    |
                    +--org.objectweb.jonas.jtests.clients.session.A_ClientView
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
F_ClientViewNoTxSL, F_ClientViewSF, 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) But here are testcases that can be run via a non remote suite.

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  TargetSLHome getHome()
           
 void testBusinessMethod1()
          This test verify we can create, access to the bean via its remote interface and remove it It verifies we cannot access to the bean after remove
 void testBusinessMethod2()
          Same test than testBusinessMethod1 but two calls to businessmethod
 void testBusinessMethod3()
          test 3 Remote Business Methods
 void testCreateRemove()
          This test verify we can create and remove a session bean
 void testGetEJBMetaData()
          test that EJBHome.getEJBMetaData() test we can obtain an handle for a session bean
 void testGetHomeHandle()
          test that EJBHome.getHomeHandle() test we can obtain a handle for a session bean's home interface
 void testGetPrimaryKey()
          test EJBObject.getPrimary Key This test verify that a Remote Exception must be catched
 void testHomeLookup()
          Lookup a Home Object This test verify that we can look up a Home Object via the root context
 void testIsIdenticalOnSameBean()
          test EJBObject.isIdentical on the same bean
 void testRemoveByPK()
          test that EJBHome.remove(pk) should raise RemoteException (API) or RemoveException (spec EJB 2.0 6.3.2)
 void testRemoveHandle()
          test that EJBHome.removeHandle() test we can remove a session via its handle it verifies the bean cannot be accessed after remove and java.rmi.NoSuchObjectException is raised
 
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

getHome

public abstract TargetSLHome getHome()
                              throws java.lang.Exception
Returns:
TargetSLHome, that can be either SF or SL bean.

testHomeLookup

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

testCreateRemove

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

testBusinessMethod1

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

testBusinessMethod2

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

testBusinessMethod3

public void testBusinessMethod3()
                         throws java.lang.Exception
test 3 Remote Business Methods

testIsIdenticalOnSameBean

public void testIsIdenticalOnSameBean()
                               throws java.lang.Exception
test EJBObject.isIdentical on the same bean

testGetPrimaryKey

public void testGetPrimaryKey()
                       throws java.lang.Exception
test EJBObject.getPrimary Key This test verify that a Remote Exception must be catched

testRemoveByPK

public void testRemoveByPK()
                    throws java.lang.Exception
test that EJBHome.remove(pk) should raise RemoteException (API) or RemoveException (spec EJB 2.0 6.3.2)

testGetEJBMetaData

public void testGetEJBMetaData()
                        throws java.lang.Exception
test that EJBHome.getEJBMetaData() test we can obtain an handle for a session bean

testGetHomeHandle

public void testGetHomeHandle()
                       throws java.lang.Exception
test that EJBHome.getHomeHandle() test we can obtain a handle for a session bean's home interface

testRemoveHandle

public void testRemoveHandle()
                      throws java.lang.Exception
test that EJBHome.removeHandle() test we can remove a session via its handle it verifies the bean cannot be accessed after remove and java.rmi.NoSuchObjectException is raised