org.apache.openejb.test.singleton
Class SingletonPojoEjbLocalObjectTests

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.singleton.SingletonTestClient
                      extended by org.apache.openejb.test.singleton.BasicSingletonLocalTestClient
                          extended by org.apache.openejb.test.singleton.SingletonPojoEjbLocalObjectTests
All Implemented Interfaces:
junit.framework.Test

public class SingletonPojoEjbLocalObjectTests
extends BasicSingletonLocalTestClient

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.singleton.BasicSingletonLocalTestClient
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
SingletonPojoEjbLocalObjectTests()
           
 
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.singleton.BasicSingletonLocalTestClient
cast
 
Methods inherited from class org.apache.openejb.test.TestClient
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

SingletonPojoEjbLocalObjectTests

public SingletonPojoEjbLocalObjectTests()
Method Detail

setUp

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

Overrides:
setUp in class SingletonTestClient
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.