org.apache.openejb.test.stateful
Class StatefulPojoEjbLocalObjectTests

java.lang.Object
  extended by junit.framework.Assert
      extended by org.apache.openejb.test.NumberedTestCase
          extended by org.apache.openejb.test.NamedTestCase
              extended by org.apache.openejb.test.TestClient
                  extended by org.apache.openejb.test.stateful.StatefulTestClient
                      extended by org.apache.openejb.test.stateful.BasicStatefulLocalTestClient
                          extended by org.apache.openejb.test.stateful.StatefulPojoEjbLocalObjectTests
All Implemented Interfaces:
junit.framework.Test

public class StatefulPojoEjbLocalObjectTests
extends BasicStatefulLocalTestClient

Author:
David Blevins, Richard Monson-Haefel, Manu George

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.openejb.test.NumberedTestCase
NumberedTestCase.NamedTest, NumberedTestCase.TestSetup, NumberedTestCase.TestTearDown
 
Field Summary
 
Fields inherited from class org.apache.openejb.test.stateful.BasicStatefulLocalTestClient
ejbLocalHome, ejbLocalObject
 
Fields inherited from class org.apache.openejb.test.TestClient
ejbHandle, ejbHomeHandle, ejbMetaData, ejbPrimaryKey, initialContext
 
Fields inherited from class org.apache.openejb.test.NamedTestCase
testName
 
Fields inherited from class org.apache.openejb.test.NumberedTestCase
standardPrefix
 
Constructor Summary
StatefulPojoEjbLocalObjectTests()
           
 
Method Summary
protected  void setUp()
          Sets up the fixture, for example, open a network connection.
protected  void tearDown()
           
 void test01_isIdentical()
           
 void test02_getEjbLocalHome()
           
 void test03_getPrimaryKey()
          3.6.5 Session object identity Session objects are intended to be private resources used only by the client that created them.
 void test04_remove()
           
 
Methods inherited from class org.apache.openejb.test.TestClient
cast, processFieldInjections, processSetterInjections
 
Methods inherited from class org.apache.openejb.test.NamedTestCase
name
 
Methods inherited from class org.apache.openejb.test.NumberedTestCase
countTestCases, createTest, createTestName, removePrefix, removePrefix, run, run, runTestMethod, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatefulPojoEjbLocalObjectTests

public StatefulPojoEjbLocalObjectTests()
Method Detail

setUp

protected void setUp()
              throws Exception
Description copied from class: StatefulTestClient
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

Overrides:
setUp in class StatefulTestClient
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class NumberedTestCase
Throws:
Exception

test01_isIdentical

public void test01_isIdentical()

test02_getEjbLocalHome

public void test02_getEjbLocalHome()

test03_getPrimaryKey

public void test03_getPrimaryKey()
3.6.5 Session object identity Session objects are intended to be private resources used only by the client that created them. For this reason, session objects, from the client's perspective, appear anonymous. In contrast to entity objects, which expose their identity as a primary key, session objects hide their identity. As a result, the EJBLocalObject.getPrimaryKey() method results in a javax.ejb.EJBException, and EJBLocalHome.remove(Object primaryKey) method results in a javax.ejb.RemoveException. If the EJBMetaData.getPrimaryKeyClass() method is invoked on a EJBMetaData object for a Session bean, the method throws the java.lang.RuntimeException.


test04_remove

public void test04_remove()


Copyright © 1999-2013 The Apache OpenEJB development community. All Rights Reserved.