You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2007/01/05 01:30:37 UTC
svn commit: r492834 - in /incubator/openejb/trunk/openejb3/itests:
openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/
openejb-itests-beans/src/main/resources/META-INF/
openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/
Author: dblevins
Date: Thu Jan 4 16:30:36 2007
New Revision: 492834
URL: http://svn.apache.org/viewvc?view=rev&rev=492834
Log:
OPENEJB-185: iTest: StatefulBeanJndiEncTests
Added:
incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/ContextLookupStatefulPojoBean.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulPojoContextLookupTests.java
Modified:
incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/resources/META-INF/ejb-jar.xml
incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/resources/META-INF/openejb-jar.xml
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/ContextLookupStatefulPojoBean.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/ContextLookupStatefulPojoBean.java?view=auto&rev=492834
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/ContextLookupStatefulPojoBean.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/ContextLookupStatefulPojoBean.java Thu Jan 4 16:30:36 2007
@@ -0,0 +1,283 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateful;
+
+import org.apache.openejb.test.TestFailureException;
+import org.apache.openejb.test.stateless.BasicStatelessHome;
+import org.apache.openejb.test.stateless.BasicStatelessObject;
+import org.apache.openejb.test.entity.bmp.BasicBmpHome;
+import org.apache.openejb.test.entity.bmp.BasicBmpObject;
+
+import javax.ejb.SessionSynchronization;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.sql.DataSource;
+import javax.naming.InitialContext;
+import javax.persistence.EntityManagerFactory;
+
+import junit.framework.Assert;
+import junit.framework.AssertionFailedError;
+
+import java.rmi.RemoteException;
+
+/**
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ */
+public class ContextLookupStatefulPojoBean {
+
+ private SessionContext ejbContext;
+
+ public void lookupEntityBean() throws TestFailureException {
+ try {
+ try {
+ BasicBmpHome home = (BasicBmpHome) ejbContext.lookup("stateful/beanReferences/bmp_entity");
+ Assert.assertNotNull("The EJBHome looked up is null", home);
+
+ BasicBmpObject object = home.createObject("Enc Bean");
+ Assert.assertNotNull("The EJBObject is null", object);
+ } catch (Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void lookupStatefulBean() throws TestFailureException {
+ try {
+ try {
+ BasicStatefulHome home = (BasicStatefulHome) ejbContext.lookup("stateful/beanReferences/stateful");
+ Assert.assertNotNull("The EJBHome looked up is null", home);
+
+ BasicStatefulObject object = home.createObject("Enc Bean");
+ Assert.assertNotNull("The EJBObject is null", object);
+ } catch (Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void lookupStatelessBean() throws TestFailureException {
+ try {
+ try {
+ BasicStatelessHome home = (BasicStatelessHome) ejbContext.lookup("stateful/beanReferences/stateless");
+ Assert.assertNotNull("The EJBHome looked up is null", home);
+
+ BasicStatelessObject object = home.createObject();
+ Assert.assertNotNull("The EJBObject is null", object);
+ } catch (Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void lookupStringEntry() throws TestFailureException {
+ try {
+ try {
+ String expected = new String("1");
+ String actual = (String) ejbContext.lookup("stateful/references/String");
+
+ Assert.assertNotNull("The String looked up is null", actual);
+ Assert.assertEquals(expected, actual);
+
+ } catch (Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void lookupDoubleEntry() throws TestFailureException {
+ try {
+ try {
+ Double expected = new Double(1.0D);
+ Double actual = (Double) ejbContext.lookup("stateful/references/Double");
+
+ Assert.assertNotNull("The Double looked up is null", actual);
+ Assert.assertEquals(expected, actual);
+
+ } catch (Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void lookupLongEntry() throws TestFailureException {
+ try {
+ try {
+ Long expected = new Long(1L);
+ Long actual = (Long) ejbContext.lookup("stateful/references/Long");
+
+ Assert.assertNotNull("The Long looked up is null", actual);
+ Assert.assertEquals(expected, actual);
+
+ } catch (Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void lookupFloatEntry() throws TestFailureException {
+ try {
+ try {
+ Float expected = new Float(1.0F);
+ Float actual = (Float) ejbContext.lookup("stateful/references/Float");
+
+ Assert.assertNotNull("The Float looked up is null", actual);
+ Assert.assertEquals(expected, actual);
+
+ } catch (Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void lookupIntegerEntry() throws TestFailureException {
+ try {
+ try {
+ Integer expected = new Integer(1);
+ Integer actual = (Integer) ejbContext.lookup("stateful/references/Integer");
+
+ Assert.assertNotNull("The Integer looked up is null", actual);
+ Assert.assertEquals(expected, actual);
+
+ } catch (Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void lookupShortEntry() throws TestFailureException {
+ try {
+ try {
+ Short expected = new Short((short) 1);
+ Short actual = (Short) ejbContext.lookup("stateful/references/Short");
+
+ Assert.assertNotNull("The Short looked up is null", actual);
+ Assert.assertEquals(expected, actual);
+
+ } catch (Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void lookupBooleanEntry() throws TestFailureException {
+ try {
+ try {
+ Boolean expected = new Boolean(true);
+ Boolean actual = (Boolean) ejbContext.lookup("stateful/references/Boolean");
+
+ Assert.assertNotNull("The Boolean looked up is null", actual);
+ Assert.assertEquals(expected, actual);
+
+ } catch (Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void lookupByteEntry() throws TestFailureException {
+ try {
+ try {
+ Byte expected = new Byte((byte) 1);
+ Byte actual = (Byte) ejbContext.lookup("stateful/references/Byte");
+
+ Assert.assertNotNull("The Byte looked up is null", actual);
+ Assert.assertEquals(expected, actual);
+
+ } catch (Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void lookupCharacterEntry() throws TestFailureException {
+ try {
+ try {
+ Character expected = new Character('D');
+ Character actual = (Character) ejbContext.lookup("stateful/references/Character");
+
+ Assert.assertNotNull("The Character looked up is null", actual);
+ Assert.assertEquals(expected, actual);
+
+ } catch (Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void lookupResource() throws TestFailureException {
+ try {
+ try {
+ Object obj = ejbContext.lookup("datasource");
+ Assert.assertNotNull("The DataSource is null", obj);
+ Assert.assertTrue("Not an instance of DataSource", obj instanceof DataSource);
+ } catch (Exception e) {
+ Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ } catch (AssertionFailedError afe) {
+ throw new TestFailureException(afe);
+ }
+ }
+
+ public void lookupPersistenceUnit() throws TestFailureException{
+ try{
+ try{
+ InitialContext ctx = new InitialContext();
+ Assert.assertNotNull("The InitialContext is null", ctx);
+ EntityManagerFactory emf = (EntityManagerFactory)ctx.lookup("java:comp/env/persistence/TestUnit");
+ Assert.assertNotNull("The EntityManagerFactory is null", emf );
+
+ } catch (Exception e){
+ Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ } catch (AssertionFailedError afe){
+ throw new TestFailureException(afe);
+ }
+ }
+
+ /**
+ * Set the associated session context. The container calls this method
+ * after the instance creation.
+ */
+ public void setSessionContext(SessionContext ctx) {
+ ejbContext = ctx;
+ }
+}
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/resources/META-INF/ejb-jar.xml?view=diff&rev=492834&r1=492833&r2=492834
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/resources/META-INF/ejb-jar.xml (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/resources/META-INF/ejb-jar.xml Thu Jan 4 16:30:36 2007
@@ -1138,6 +1138,106 @@
<!--
########################################################
+ ID: client/tests/stateful/ContextLookupStatefulPojoBean
+ ########################################################
+ -->
+
+ <session>
+ <description>A basic stateful session bean with bean-managed
+ transaction demarcation.
+ </description>
+ <ejb-name>ContextLookupStatefulPojoBean</ejb-name>
+ <home>org.apache.openejb.test.stateful.EncStatefulHome</home>
+ <remote>org.apache.openejb.test.stateful.EncStatefulObject</remote>
+ <ejb-class>org.apache.openejb.test.stateful.ContextLookupStatefulPojoBean</ejb-class>
+ <session-type>Stateful</session-type>
+ <transaction-type>Bean</transaction-type>
+ <env-entry>
+ <env-entry-name>stateful/references/Boolean</env-entry-name>
+ <env-entry-type>java.lang.Boolean</env-entry-type>
+ <env-entry-value>true</env-entry-value>
+ </env-entry>
+ <env-entry>
+ <env-entry-name>stateful/references/String</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>1</env-entry-value>
+ </env-entry>
+ <env-entry>
+ <env-entry-name>stateful/references/Double</env-entry-name>
+ <env-entry-type>java.lang.Double</env-entry-type>
+ <env-entry-value>1</env-entry-value>
+ </env-entry>
+ <env-entry>
+ <env-entry-name>stateful/references/Long</env-entry-name>
+ <env-entry-type>java.lang.Long</env-entry-type>
+ <env-entry-value>1</env-entry-value>
+ </env-entry>
+ <env-entry>
+ <env-entry-name>stateful/references/Float</env-entry-name>
+ <env-entry-type>java.lang.Float</env-entry-type>
+ <env-entry-value>1</env-entry-value>
+ </env-entry>
+ <env-entry>
+ <env-entry-name>stateful/references/Integer</env-entry-name>
+ <env-entry-type>java.lang.Integer</env-entry-type>
+ <env-entry-value>1</env-entry-value>
+ </env-entry>
+ <env-entry>
+ <env-entry-name>stateful/references/Short</env-entry-name>
+ <env-entry-type>java.lang.Short</env-entry-type>
+ <env-entry-value>1</env-entry-value>
+ </env-entry>
+ <env-entry>
+ <env-entry-name>stateful/references/Byte</env-entry-name>
+ <env-entry-type>java.lang.Byte</env-entry-type>
+ <env-entry-value>1</env-entry-value>
+ </env-entry>
+ <env-entry>
+ <env-entry-name>stateful/references/Character</env-entry-name>
+ <env-entry-type>java.lang.Character</env-entry-type>
+ <env-entry-value>D</env-entry-value>
+ </env-entry>
+ <ejb-ref>
+ <ejb-ref-name>stateful/beanReferences/bmp_entity</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <home>org.apache.openejb.test.entity.bmp.BasicBmpHome</home>
+ <remote>org.apache.openejb.test.entity.bmp.BasicBmpObject</remote>
+ <ejb-link>BasicBmpBean</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>stateful/beanReferences/stateful</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>org.apache.openejb.test.stateful.BasicStatefulHome</home>
+ <remote>org.apache.openejb.test.stateful.BasicStatefulObject</remote>
+ <ejb-link>BasicStatefulBean</ejb-link>
+ </ejb-ref>
+ <ejb-ref>
+ <ejb-ref-name>stateful/beanReferences/stateless</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>org.apache.openejb.test.stateless.BasicStatelessHome</home>
+ <remote>org.apache.openejb.test.stateless.BasicStatelessObject</remote>
+ <ejb-link>BasicStatelessBean</ejb-link>
+ </ejb-ref>
+ <security-role-ref>
+ <role-name>TheMan</role-name>
+ <role-link>Executive</role-link>
+ </security-role-ref>
+ <resource-ref>
+ <res-ref-name>datasource</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+ <persistence-unit-ref>
+ <description>
+ Persistence unit for testing the functionality.
+ </description>
+ <persistence-unit-ref-name>persistence/TestUnit</persistence-unit-ref-name>
+ <persistence-unit-name>openjpa-test-unit</persistence-unit-name>
+ </persistence-unit-ref>
+ </session>
+
+ <!--
+ ########################################################
ID: client/tests/stateful/RMI-over-IIOP/EJBHome
########################################################
-->
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/resources/META-INF/openejb-jar.xml
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/resources/META-INF/openejb-jar.xml?view=diff&rev=492834&r1=492833&r2=492834
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/resources/META-INF/openejb-jar.xml (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-beans/src/main/resources/META-INF/openejb-jar.xml Thu Jan 4 16:30:36 2007
@@ -167,6 +167,10 @@
container-id="Default Stateful Container">
<resource-link res-ref-name="datasource" res-id="Default JDBC Database"/>
</ejb-deployment>
+ <ejb-deployment ejb-name="ContextLookupStatefulPojoBean" deployment-id="client/tests/stateful/ContextLookupStatefulPojoBean"
+ container-id="Default Stateful Container">
+ <resource-link res-ref-name="datasource" res-id="Default JDBC Database"/>
+ </ejb-deployment>
<ejb-deployment ejb-name="Stateful RMI-IIOP Bean" deployment-id="client/tests/stateful/RMI-over-IIOP/EJBHome"
container-id="Default Stateful Container"/>
<ejb-deployment ejb-name="BasicStatelessBean" deployment-id="client/tests/stateless/BasicStatelessHome"
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java?view=diff&rev=492834&r1=492833&r2=492834
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java Thu Jan 4 16:30:36 2007
@@ -53,6 +53,7 @@
//suite.addTest(new BMTStatefulAllowedOperationsTests());
suite.addTest(new StatefulJndiEncTests());
suite.addTest(new StatefulContextLookupTests());
+ suite.addTest(new StatefulPojoContextLookupTests());
suite.addTest(new StatefulRmiIiopTests());
/* TO DO
suite.addTest(new StatefulEjbContextTests());
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulPojoContextLookupTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulPojoContextLookupTests.java?view=auto&rev=492834
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulPojoContextLookupTests.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulPojoContextLookupTests.java Thu Jan 4 16:30:36 2007
@@ -0,0 +1,202 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateful;
+
+import org.apache.openejb.test.TestManager;
+import org.apache.openejb.test.TestFailureException;
+
+/**
+ * [4] Should be run as the fourth test suite of the StatefulTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ */
+public class StatefulPojoContextLookupTests extends StatefulTestClient{
+
+ protected EncStatefulHome ejbHome;
+ protected EncStatefulObject ejbObject;
+
+ public StatefulPojoContextLookupTests(){
+ super("JNDI_ENC.");
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ Object obj = initialContext.lookup("client/tests/stateful/ContextLookupStatefulPojoBean");
+ ejbHome = (EncStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, EncStatefulHome.class);
+ ejbObject = ejbHome.create("Enc Bean");
+
+ /*[2] Create database table */
+ TestManager.getDatabase().createEntityTable();
+ }
+
+ /**
+ * Tears down the fixture, for example, close a network connection.
+ * This method is called after a test is executed.
+ */
+ protected void tearDown() throws Exception {
+ try {
+ /*[1] Drop database table */
+ TestManager.getDatabase().dropEntityTable();
+ } catch (Exception e){
+ throw e;
+ } finally {
+ super.tearDown();
+ }
+ }
+
+ public void test01_lookupStringEntry() {
+ try{
+ ejbObject.lookupStringEntry();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test02_lookupDoubleEntry() {
+ try{
+ ejbObject.lookupDoubleEntry();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test03_lookupLongEntry() {
+ try{
+ ejbObject.lookupLongEntry();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test04_lookupFloatEntry() {
+ try{
+ ejbObject.lookupFloatEntry();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test05_lookupIntegerEntry() {
+ try{
+ ejbObject.lookupIntegerEntry();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test06_lookupShortEntry() {
+ try{
+ ejbObject.lookupShortEntry();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test07_lookupBooleanEntry() {
+ try{
+ ejbObject.lookupBooleanEntry();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test08_lookupByteEntry() {
+ try{
+ ejbObject.lookupByteEntry();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test09_lookupCharacterEntry() {
+ try{
+ ejbObject.lookupCharacterEntry();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test10_lookupEntityBean() {
+ try{
+ ejbObject.lookupEntityBean();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test11_lookupStatefulBean() {
+ try{
+ ejbObject.lookupStatefulBean();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test12_lookupStatelessBean() {
+ try{
+ ejbObject.lookupStatelessBean();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test13_lookupResource() {
+ try{
+ ejbObject.lookupResource();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+ public void test14_lookupPersistenceUnit() {
+ try{
+ ejbObject.lookupPersistenceUnit();
+ } catch (TestFailureException e){
+ throw e.error;
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+
+}
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java?view=diff&rev=492834&r1=492833&r2=492834
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java Thu Jan 4 16:30:36 2007
@@ -52,6 +52,7 @@
//suite.addTest(new BMTStatefulAllowedOperationsTests());
suite.addTest(new StatefulJndiEncTests());
suite.addTest(new StatefulContextLookupTests());
+ suite.addTest(new StatefulPojoContextLookupTests());
suite.addTest(new StatefulRmiIiopTests());
/* TO DO
suite.addTest(new StatefulEjbContextTests());