tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject [4/6] tomee git commit: reducing our dependency on corba and rmi and ensuring we have jaxb there - this last change can need some adjustment to endorse or not jaxb
Date Wed, 03 May 2017 16:25:44 GMT
http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpRmiIiopTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpRmiIiopTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpRmiIiopTests.java
index a626ebe..96fe1c4 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpRmiIiopTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpRmiIiopTests.java
@@ -16,13 +16,12 @@
  */
 package org.apache.openejb.test.entity.cmp;
 
+import org.apache.openejb.test.object.ObjectGraph;
+
 import javax.ejb.EJBHome;
 import javax.ejb.EJBMetaData;
 import javax.ejb.EJBObject;
 import javax.ejb.Handle;
-
-import org.apache.openejb.test.object.ObjectGraph;
-
 import java.rmi.RemoteException;
 
 public class CmpRmiIiopTests extends CmpTestClient {
@@ -37,7 +36,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/RMI-over-IIOP/EJBHome");
-        ejbHome = (RmiIiopCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, RmiIiopCmpHome.class);
+        ejbHome = (RmiIiopCmpHome) obj;
         ejbObject = ejbHome.create("RMI-IIOP TestBean");
     }
 
@@ -518,10 +517,10 @@ public class CmpRmiIiopTests extends CmpTestClient {
     public void test35_returnEJBHome() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome expected = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome expected = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", expected);
 
-            final EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBHome(expected), EncCmpHome.class);
+            final EncCmpHome actual = (EncCmpHome) ejbObject.returnEJBHome(expected);
             assertNotNull("The EJBHome returned is null", actual);
 
         } catch (final Exception e) {
@@ -531,7 +530,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
 
     public void test36_returnEJBHome2() {
         try {
-            final EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBHome(), EncCmpHome.class);
+            final EncCmpHome actual = (EncCmpHome) ejbObject.returnEJBHome();
             assertNotNull("The EJBHome returned is null", actual);
 
         } catch (final Exception e) {
@@ -542,13 +541,13 @@ public class CmpRmiIiopTests extends CmpTestClient {
     public void test37_returnNestedEJBHome() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome expected = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome expected = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", expected);
 
             final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
             assertNotNull("The ObjectGraph is null", graph);
 
-            final EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpHome.class);
+            final EncCmpHome actual = (EncCmpHome) graph.getObject();
             assertNotNull("The EJBHome returned is null", actual);
         } catch (final Exception e) {
             fail("Received Exception " + e.getClass() + " : " + e.getMessage());
@@ -560,7 +559,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
             final ObjectGraph graph = ejbObject.returnNestedEJBHome();
             assertNotNull("The ObjectGraph is null", graph);
 
-            final EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpHome.class);
+            final EncCmpHome actual = (EncCmpHome) graph.getObject();
             assertNotNull("The EJBHome returned is null", actual);
         } catch (final Exception e) {
             fail("Received Exception " + e.getClass() + " : " + e.getMessage());
@@ -573,7 +572,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
             final EncCmpHome[] expected = new EncCmpHome[3];
             for (int i = 0; i < expected.length; i++) {
                 final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-                expected[i] = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+                expected[i] = (EncCmpHome) obj;
                 assertNotNull("The EJBHome returned from JNDI is null", expected[i]);
             }
 
@@ -594,13 +593,13 @@ public class CmpRmiIiopTests extends CmpTestClient {
     public void test40_returnEJBObject() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EncCmpObject expected = home.create("test_40 CmpBean");
             assertNotNull("The EJBObject created is null", expected);
 
-            final EncCmpObject actual = (EncCmpObject) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBObject(expected), EncCmpObject.class);
+            final EncCmpObject actual = (EncCmpObject) ejbObject.returnEJBObject(expected);
             assertNotNull("The EJBObject returned is null", actual);
 
             assertTrue("The EJBObejcts are not identical", expected.isIdentical(actual));
@@ -611,7 +610,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
 
     public void test41_returnEJBObject2() {
         try {
-            final EncCmpObject actual = (EncCmpObject) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBObject(), EncCmpObject.class);
+            final EncCmpObject actual = (EncCmpObject) ejbObject.returnEJBObject();
             assertNotNull("The EJBObject returned is null", actual);
 
         } catch (final Exception e) {
@@ -622,7 +621,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
     public void test42_returnNestedEJBObject() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EncCmpObject expected = home.create("test_42 CmpBean");
@@ -631,7 +630,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
             final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
             assertNotNull("The ObjectGraph is null", graph);
 
-            final EncCmpObject actual = (EncCmpObject) javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpObject.class);
+            final EncCmpObject actual = (EncCmpObject) graph.getObject();
             assertNotNull("The EJBObject returned is null", actual);
 
             assertTrue("The EJBObejcts are not identical", expected.isIdentical(actual));
@@ -645,7 +644,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
             final ObjectGraph graph = ejbObject.returnNestedEJBObject();
             assertNotNull("The ObjectGraph is null", graph);
 
-            final EncCmpObject actual = (EncCmpObject) javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpObject.class);
+            final EncCmpObject actual = (EncCmpObject) graph.getObject();
             assertNotNull("The EJBHome returned is null", actual);
         } catch (final Exception e) {
             fail("Received Exception " + e.getClass() + " : " + e.getMessage());
@@ -655,7 +654,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
     public void test44_returnEJBObjectArray() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EncCmpObject[] expected = new EncCmpObject[3];
@@ -684,7 +683,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
     public void test45_returnEJBMetaData() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EJBMetaData expected = home.getEJBMetaData();
@@ -713,7 +712,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
     public void test47_returnNestedEJBMetaData() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EJBMetaData expected = home.getEJBMetaData();
@@ -749,7 +748,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
         try {
 
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EJBMetaData[] expected = new EJBMetaData[3];
@@ -780,7 +779,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
     public void test50_returnHandle() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EncCmpObject object = home.create("test_50 CmpBean");
@@ -817,7 +816,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
     public void test52_returnNestedHandle() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EncCmpObject object = home.create("test_52 CmpBean");
@@ -860,7 +859,7 @@ public class CmpRmiIiopTests extends CmpTestClient {
     public void test54_returnHandleArray() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EncCmpObject object = home.create("test_54 CmpBean");

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpTestClient.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpTestClient.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpTestClient.java
index 996ce5f..cca8c30 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpTestClient.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/CmpTestClient.java
@@ -16,15 +16,13 @@
  */
 package org.apache.openejb.test.entity.cmp;
 
-import java.util.Properties;
+import org.apache.openejb.test.TestManager;
 
 import javax.ejb.EJBMetaData;
 import javax.ejb.Handle;
 import javax.ejb.HomeHandle;
-import javax.naming.Context;
 import javax.naming.InitialContext;
-
-import org.apache.openejb.test.TestManager;
+import java.util.Properties;
 
 public abstract class CmpTestClient extends org.apache.openejb.test.NamedTestCase {
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbHomeTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbHomeTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbHomeTests.java
index 5c7d4c2..de7fc21 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbHomeTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbHomeTests.java
@@ -19,7 +19,6 @@ package org.apache.openejb.test.entity.cmp;
 
 import javax.ejb.EJBMetaData;
 import javax.ejb.ObjectNotFoundException;
-import javax.rmi.PortableRemoteObject;
 
 /**
  * [3] Should be run as the third test suite of the ComplexCmpTestClients
@@ -33,7 +32,7 @@ public class ComplexEjbHomeTests extends ComplexCmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/ComplexCmpHome");
-        ejbHome = (ComplexCmpHome) PortableRemoteObject.narrow(obj, ComplexCmpHome.class);
+        ejbHome = (ComplexCmpHome) obj;
         ejbObject = ejbHome.createObject("Second Bean");
         ejbPrimaryKey = ejbObject.getPrimaryKey();
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbMetaDataTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbMetaDataTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbMetaDataTests.java
index bcc4f25..960ce99 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbMetaDataTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbMetaDataTests.java
@@ -18,7 +18,6 @@
 package org.apache.openejb.test.entity.cmp;
 
 import javax.ejb.EJBHome;
-import javax.rmi.PortableRemoteObject;
 
 /**
  * [8] Should be run as the eigth test suite of the ComplexCmpTestClients
@@ -32,7 +31,7 @@ public class ComplexEjbMetaDataTests extends ComplexCmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/ComplexCmpHome");
-        ejbHome = (ComplexCmpHome) PortableRemoteObject.narrow(obj, ComplexCmpHome.class);
+        ejbHome = (ComplexCmpHome) obj;
         ejbMetaData = ejbHome.getEJBMetaData();
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbObjectTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbObjectTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbObjectTests.java
index cac200d..03dca97 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbObjectTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexEjbObjectTests.java
@@ -19,7 +19,6 @@ package org.apache.openejb.test.entity.cmp;
 
 import javax.ejb.EJBHome;
 import javax.ejb.ObjectNotFoundException;
-import javax.rmi.PortableRemoteObject;
 
 /**
  * [4] Should be run as the fourth test suite of the ComplexCmpTestClients
@@ -33,7 +32,7 @@ public class ComplexEjbObjectTests extends ComplexCmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/ComplexCmpHome");
-        ejbHome = (ComplexCmpHome) PortableRemoteObject.narrow(obj, ComplexCmpHome.class);
+        ejbHome = (ComplexCmpHome) obj;
         ejbObject = ejbHome.createObject("Third Bean");
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHandleTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHandleTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHandleTests.java
index 3213768..9237c71 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHandleTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHandleTests.java
@@ -18,7 +18,6 @@
 package org.apache.openejb.test.entity.cmp;
 
 import javax.ejb.EJBObject;
-import javax.rmi.PortableRemoteObject;
 
 /**
  * [7] Should be run as the seventh test suite of the ComplexCmpTestClients
@@ -32,7 +31,7 @@ public class ComplexHandleTests extends ComplexCmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/ComplexCmpHome");
-        ejbHome = (ComplexCmpHome) PortableRemoteObject.narrow(obj, ComplexCmpHome.class);
+        ejbHome = (ComplexCmpHome) obj;
         ejbObject = ejbHome.createObject("Fifth Bean");
         ejbHandle = ejbObject.getHandle();
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHomeHandleTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHomeHandleTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHomeHandleTests.java
index ddfcba9..fad1464 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHomeHandleTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHomeHandleTests.java
@@ -18,7 +18,6 @@
 package org.apache.openejb.test.entity.cmp;
 
 import javax.ejb.EJBHome;
-import javax.rmi.PortableRemoteObject;
 
 /**
  * [6] Should be run as the sixth test suite of the ComplexCmpTestClients
@@ -32,7 +31,7 @@ public class ComplexHomeHandleTests extends ComplexCmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/ComplexCmpHome");
-        ejbHome = (ComplexCmpHome) PortableRemoteObject.narrow(obj, ComplexCmpHome.class);
+        ejbHome = (ComplexCmpHome) obj;
         ejbHomeHandle = ejbHome.getHomeHandle();
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHomeIntfcTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHomeIntfcTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHomeIntfcTests.java
index a85b6a5..e91da83 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHomeIntfcTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexHomeIntfcTests.java
@@ -17,7 +17,6 @@
  */
 package org.apache.openejb.test.entity.cmp;
 
-import javax.rmi.PortableRemoteObject;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
@@ -35,7 +34,7 @@ public class ComplexHomeIntfcTests extends ComplexCmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/ComplexCmpHome");
-        ejbHome = (ComplexCmpHome) PortableRemoteObject.narrow(obj, ComplexCmpHome.class);
+        ejbHome = (ComplexCmpHome) obj;
     }
 
     //===============================
@@ -89,7 +88,7 @@ public class ComplexHomeIntfcTests extends ComplexCmpTestClient {
             assertNotNull("The Collection is null", objects);
             assertEquals("The Collection is not the right size.", keys.size(), objects.size());
             for (final Object object : objects) {
-                ejbObject = (ComplexCmpObject) PortableRemoteObject.narrow(object, ComplexCmpObject.class);
+                ejbObject = (ComplexCmpObject) object;
 
                 // This could be problematic, it assumes the order of the collection.
                 final ComplexCmpBeanPk foundKey = (ComplexCmpBeanPk) ejbObject.getPrimaryKey();

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexRemoteIntfcTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexRemoteIntfcTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexRemoteIntfcTests.java
index 1aa38d6..46b2fb9 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexRemoteIntfcTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexRemoteIntfcTests.java
@@ -17,8 +17,6 @@
  */
 package org.apache.openejb.test.entity.cmp;
 
-import javax.rmi.PortableRemoteObject;
-
 /**
  * [5] Should be run as the fifth test suite of the ComplexCmpTestClients
  */
@@ -31,7 +29,7 @@ public class ComplexRemoteIntfcTests extends ComplexCmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/ComplexCmpHome");
-        ejbHome = (ComplexCmpHome) PortableRemoteObject.narrow(obj, ComplexCmpHome.class);
+        ejbHome = (ComplexCmpHome) obj;
         ejbObject = ejbHome.createObject("Forth Bean");
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbHomeTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbHomeTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbHomeTests.java
index 008d651..6f2e568 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbHomeTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbHomeTests.java
@@ -17,7 +17,6 @@
  */
 package org.apache.openejb.test.entity.cmp;
 
-import javax.rmi.PortableRemoteObject;
 import javax.ejb.EJBMetaData;
 import javax.ejb.ObjectNotFoundException;
 
@@ -33,7 +32,7 @@ public class UnknownEjbHomeTests extends UnknownCmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/UnknownCmpHome");
-        ejbHome = (UnknownCmpHome) PortableRemoteObject.narrow(obj, UnknownCmpHome.class);
+        ejbHome = (UnknownCmpHome) obj;
         ejbObject = ejbHome.createObject("Second Bean");
         ejbPrimaryKey = ejbObject.getPrimaryKey();
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbMetaDataTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbMetaDataTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbMetaDataTests.java
index 792ecaf..c7b8610 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbMetaDataTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbMetaDataTests.java
@@ -17,7 +17,6 @@
  */
 package org.apache.openejb.test.entity.cmp;
 
-import javax.rmi.PortableRemoteObject;
 import javax.ejb.EJBHome;
 
 /**
@@ -32,7 +31,7 @@ public class UnknownEjbMetaDataTests extends UnknownCmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/UnknownCmpHome");
-        ejbHome = (UnknownCmpHome) PortableRemoteObject.narrow(obj, UnknownCmpHome.class);
+        ejbHome = (UnknownCmpHome) obj;
         ejbMetaData = ejbHome.getEJBMetaData();
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbObjectTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbObjectTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbObjectTests.java
index 379732e..d7d8f5b 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbObjectTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownEjbObjectTests.java
@@ -17,7 +17,6 @@
  */
 package org.apache.openejb.test.entity.cmp;
 
-import javax.rmi.PortableRemoteObject;
 import javax.ejb.EJBHome;
 import javax.ejb.ObjectNotFoundException;
 
@@ -33,7 +32,7 @@ public class UnknownEjbObjectTests extends UnknownCmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/UnknownCmpHome");
-        ejbHome = (UnknownCmpHome) PortableRemoteObject.narrow(obj, UnknownCmpHome.class);
+        ejbHome = (UnknownCmpHome) obj;
         ejbObject = ejbHome.createObject("Third Bean");
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHandleTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHandleTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHandleTests.java
index 8210c79..589dac0 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHandleTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHandleTests.java
@@ -17,7 +17,6 @@
  */
 package org.apache.openejb.test.entity.cmp;
 
-import javax.rmi.PortableRemoteObject;
 import javax.ejb.EJBObject;
 
 /**
@@ -32,7 +31,7 @@ public class UnknownHandleTests extends UnknownCmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/UnknownCmpHome");
-        ejbHome = (UnknownCmpHome) PortableRemoteObject.narrow(obj, UnknownCmpHome.class);
+        ejbHome = (UnknownCmpHome) obj;
         ejbObject = ejbHome.createObject("Fifth Bean");
         ejbHandle = ejbObject.getHandle();
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHomeHandleTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHomeHandleTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHomeHandleTests.java
index adfcae8..027851f 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHomeHandleTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHomeHandleTests.java
@@ -17,7 +17,6 @@
  */
 package org.apache.openejb.test.entity.cmp;
 
-import javax.rmi.PortableRemoteObject;
 import javax.ejb.EJBHome;
 
 /**
@@ -32,7 +31,7 @@ public class UnknownHomeHandleTests extends UnknownCmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/UnknownCmpHome");
-        ejbHome = (UnknownCmpHome) PortableRemoteObject.narrow(obj, UnknownCmpHome.class);
+        ejbHome = (UnknownCmpHome) obj;
         ejbHomeHandle = ejbHome.getHomeHandle();
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHomeIntfcTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHomeIntfcTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHomeIntfcTests.java
index 29a2d0f..c22ae60 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHomeIntfcTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownHomeIntfcTests.java
@@ -17,7 +17,6 @@
  */
 package org.apache.openejb.test.entity.cmp;
 
-import javax.rmi.PortableRemoteObject;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
@@ -35,7 +34,7 @@ public class UnknownHomeIntfcTests extends UnknownCmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/UnknownCmpHome");
-        ejbHome = (UnknownCmpHome) PortableRemoteObject.narrow(obj, UnknownCmpHome.class);
+        ejbHome = (UnknownCmpHome) obj;
     }
 
     //===============================
@@ -89,7 +88,7 @@ public class UnknownHomeIntfcTests extends UnknownCmpTestClient {
             assertNotNull("The Collection is null", objects);
             assertEquals("The Collection is not the right size.", keys.size(), objects.size());
             for (final Object object : objects) {
-                ejbObject = (UnknownCmpObject) PortableRemoteObject.narrow(object, UnknownCmpObject.class);
+                ejbObject = (UnknownCmpObject) object;
 
                 // This could be problematic, it assumes the order of the collection.
                 final Object foundKey = ejbObject.getPrimaryKey();

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownRemoteIntfcTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownRemoteIntfcTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownRemoteIntfcTests.java
index a89670a..ca7ce80 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownRemoteIntfcTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/UnknownRemoteIntfcTests.java
@@ -17,8 +17,6 @@
  */
 package org.apache.openejb.test.entity.cmp;
 
-import javax.rmi.PortableRemoteObject;
-
 /**
  * [5] Should be run as the fifth test suite of the UnknownCmpTestClients
  */
@@ -31,7 +29,7 @@ public class UnknownRemoteIntfcTests extends UnknownCmpTestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/UnknownCmpHome");
-        ejbHome = (UnknownCmpHome) PortableRemoteObject.narrow(obj, UnknownCmpHome.class);
+        ejbHome = (UnknownCmpHome) obj;
         ejbObject = ejbHome.createObject("Forth Bean");
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2AllowedOperationsTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2AllowedOperationsTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2AllowedOperationsTests.java
index 125473c..2507795 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2AllowedOperationsTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2AllowedOperationsTests.java
@@ -16,9 +16,9 @@
  */
 package org.apache.openejb.test.entity.cmp2;
 
-import org.apache.openejb.test.object.OperationsPolicy;
 import org.apache.openejb.test.entity.cmp.BasicCmpHome;
 import org.apache.openejb.test.entity.cmp.BasicCmpObject;
+import org.apache.openejb.test.object.OperationsPolicy;
 
 /**
  * [9] Should be run as the nineth test suite of the BasicCmpTestClients
@@ -142,7 +142,7 @@ public class Cmp2AllowedOperationsTests extends BasicCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/allowed_operations/EntityHome");
-        ejbHome = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, BasicCmpHome.class);
+        ejbHome = (BasicCmpHome) obj;
         ejbObject = ejbHome.createObject("Fourth Bean");
         ejbHandle = ejbObject.getHandle();
         /* These tests will only work if the specified

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbHomeTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbHomeTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbHomeTests.java
index 9b48070..a523bd1 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbHomeTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbHomeTests.java
@@ -16,11 +16,11 @@
  */
 package org.apache.openejb.test.entity.cmp2;
 
+import org.apache.openejb.test.entity.cmp.BasicCmpHome;
+
 import javax.ejb.EJBMetaData;
 import javax.ejb.ObjectNotFoundException;
 
-import org.apache.openejb.test.entity.cmp.BasicCmpHome;
-
 /**
  * [3] Should be run as the third test suite of the BasicCmpTestClients
  */
@@ -33,7 +33,7 @@ public class Cmp2EjbHomeTests extends BasicCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/BasicCmpHome");
-        ejbHome = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, BasicCmpHome.class);
+        ejbHome = (BasicCmpHome) obj;
         ejbObject = ejbHome.createObject("Second Bean");
         ejbPrimaryKey = ejbObject.getPrimaryKey();
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbMetaDataTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbMetaDataTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbMetaDataTests.java
index aa93a03..71db16a 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbMetaDataTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbMetaDataTests.java
@@ -16,11 +16,11 @@
  */
 package org.apache.openejb.test.entity.cmp2;
 
-import javax.ejb.EJBHome;
-
 import org.apache.openejb.test.entity.cmp.BasicCmpHome;
 import org.apache.openejb.test.entity.cmp.BasicCmpObject;
 
+import javax.ejb.EJBHome;
+
 /**
  * [8] Should be run as the eigth test suite of the BasicCmpTestClients
  */
@@ -33,7 +33,7 @@ public class Cmp2EjbMetaDataTests extends BasicCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/BasicCmpHome");
-        ejbHome = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, BasicCmpHome.class);
+        ejbHome = (BasicCmpHome) obj;
         ejbMetaData = ejbHome.getEJBMetaData();
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbObjectTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbObjectTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbObjectTests.java
index d4b549d..06d679d 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbObjectTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2EjbObjectTests.java
@@ -16,11 +16,11 @@
  */
 package org.apache.openejb.test.entity.cmp2;
 
+import org.apache.openejb.test.entity.cmp.BasicCmpHome;
+
 import javax.ejb.EJBHome;
 import javax.ejb.ObjectNotFoundException;
 
-import org.apache.openejb.test.entity.cmp.BasicCmpHome;
-
 /**
  * [4] Should be run as the fourth test suite of the BasicCmpTestClients
  */
@@ -33,7 +33,7 @@ public class Cmp2EjbObjectTests extends BasicCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/BasicCmpHome");
-        ejbHome = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, BasicCmpHome.class);
+        ejbHome = (BasicCmpHome) obj;
         ejbObject = ejbHome.createObject("Third Bean");
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HandleTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HandleTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HandleTests.java
index 018e01c..7839a1c 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HandleTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HandleTests.java
@@ -16,15 +16,15 @@
  */
 package org.apache.openejb.test.entity.cmp2;
 
-import java.rmi.MarshalledObject;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.ObjectInputStream;
+import org.apache.openejb.test.entity.cmp.BasicCmpHome;
+
 import javax.ejb.EJBObject;
 import javax.ejb.Handle;
-
-import org.apache.openejb.test.entity.cmp.BasicCmpHome;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.rmi.MarshalledObject;
 
 /**
  * [7] Should be run as the seventh test suite of the BasicCmpTestClients
@@ -38,7 +38,7 @@ public class Cmp2HandleTests extends BasicCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/BasicCmpHome");
-        ejbHome = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, BasicCmpHome.class);
+        ejbHome = (BasicCmpHome) obj;
         ejbObject = ejbHome.createObject("Fifth Bean");
         ejbHandle = ejbObject.getHandle();
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HomeHandleTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HomeHandleTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HomeHandleTests.java
index 44d9bc0..3130e36 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HomeHandleTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HomeHandleTests.java
@@ -16,15 +16,15 @@
  */
 package org.apache.openejb.test.entity.cmp2;
 
-import java.rmi.MarshalledObject;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.ObjectInputStream;
+import org.apache.openejb.test.entity.cmp.BasicCmpHome;
+
 import javax.ejb.EJBHome;
 import javax.ejb.HomeHandle;
-
-import org.apache.openejb.test.entity.cmp.BasicCmpHome;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.rmi.MarshalledObject;
 
 /**
  * [6] Should be run as the sixth test suite of the BasicCmpTestClients
@@ -38,7 +38,7 @@ public class Cmp2HomeHandleTests extends BasicCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/BasicCmpHome");
-        ejbHome = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, BasicCmpHome.class);
+        ejbHome = (BasicCmpHome) obj;
         ejbHomeHandle = ejbHome.getHomeHandle();
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HomeIntfcTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HomeIntfcTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HomeIntfcTests.java
index 1414d74..60b517e 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HomeIntfcTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2HomeIntfcTests.java
@@ -32,7 +32,7 @@ public class Cmp2HomeIntfcTests extends BasicCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/BasicCmpHome");
-        ejbHome = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, BasicCmpHome.class);
+        ejbHome = (BasicCmpHome) obj;
     }
 
     //===============================
@@ -65,7 +65,7 @@ public class Cmp2HomeIntfcTests extends BasicCmp2TestClient {
         assertEquals("The Collection is not the right size.", keys.length, objects.size());
         final Object[] objs = objects.toArray();
         for (int i = 0; i < objs.length; i++) {
-            ejbObject = (BasicCmpObject) javax.rmi.PortableRemoteObject.narrow(objs[i], BasicCmpObject.class);
+            ejbObject = (BasicCmpObject) objs[i];
             // This could be problematic, it assumes the order of the collection.
             assertEquals("The primary keys are not equal.", keys[i], ejbObject.getPrimaryKey());
         }

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2JndiEncTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2JndiEncTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2JndiEncTests.java
index 392d240..420e87e 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2JndiEncTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2JndiEncTests.java
@@ -35,7 +35,7 @@ public class Cmp2JndiEncTests extends Cmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/EncBean");
-        ejbHome = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+        ejbHome = (EncCmpHome) obj;
         ejbObject = ejbHome.create("Enc Bean");
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2JndiTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2JndiTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2JndiTests.java
index 0df631e..2685900 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2JndiTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2JndiTests.java
@@ -31,7 +31,7 @@ public class Cmp2JndiTests extends BasicCmp2TestClient {
     public void test01_Jndi_lookupHome() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/BasicCmpHome");
-            ejbHome = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, BasicCmpHome.class);
+            ejbHome = (BasicCmpHome) obj;
             assertNotNull("The EJBHome is null", ejbHome);
         } catch (final Exception e) {
             fail("Received Exception " + e.getClass() + " : " + e.getMessage());

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2RemoteIntfcTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2RemoteIntfcTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2RemoteIntfcTests.java
index 1ea33f2..f8c90fc 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2RemoteIntfcTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2RemoteIntfcTests.java
@@ -31,7 +31,7 @@ public class Cmp2RemoteIntfcTests extends BasicCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/BasicCmpHome");
-        ejbHome = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, BasicCmpHome.class);
+        ejbHome = (BasicCmpHome) obj;
         ejbObject = ejbHome.createObject("Forth Bean");
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2RmiIiopTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2RmiIiopTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2RmiIiopTests.java
index ca7dbe1..dbac68c 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2RmiIiopTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2RmiIiopTests.java
@@ -16,17 +16,16 @@
  */
 package org.apache.openejb.test.entity.cmp2;
 
+import org.apache.openejb.test.entity.cmp.EncCmpHome;
+import org.apache.openejb.test.entity.cmp.EncCmpObject;
+import org.apache.openejb.test.entity.cmp.RmiIiopCmpHome;
+import org.apache.openejb.test.entity.cmp.RmiIiopCmpObject;
+import org.apache.openejb.test.object.ObjectGraph;
+
 import javax.ejb.EJBHome;
 import javax.ejb.EJBMetaData;
 import javax.ejb.EJBObject;
 import javax.ejb.Handle;
-
-import org.apache.openejb.test.object.ObjectGraph;
-import org.apache.openejb.test.entity.cmp.RmiIiopCmpHome;
-import org.apache.openejb.test.entity.cmp.RmiIiopCmpObject;
-import org.apache.openejb.test.entity.cmp.EncCmpHome;
-import org.apache.openejb.test.entity.cmp.EncCmpObject;
-
 import java.rmi.RemoteException;
 
 public class Cmp2RmiIiopTests extends Cmp2TestClient {
@@ -41,7 +40,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp/RMI-over-IIOP/EJBHome");
-        ejbHome = (RmiIiopCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, RmiIiopCmpHome.class);
+        ejbHome = (RmiIiopCmpHome) obj;
         ejbObject = ejbHome.create("RMI-IIOP TestBean");
     }
 
@@ -522,10 +521,10 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
     public void test35_returnEJBHome() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome expected = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome expected = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", expected);
 
-            final EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBHome(expected), EncCmpHome.class);
+            final EncCmpHome actual = (EncCmpHome) ejbObject.returnEJBHome(expected);
             assertNotNull("The EJBHome returned is null", actual);
 
         } catch (final Exception e) {
@@ -535,7 +534,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
 
     public void test36_returnEJBHome2() {
         try {
-            final EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBHome(), EncCmpHome.class);
+            final EncCmpHome actual = (EncCmpHome) ejbObject.returnEJBHome();
             assertNotNull("The EJBHome returned is null", actual);
 
         } catch (final Exception e) {
@@ -546,13 +545,13 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
     public void test37_returnNestedEJBHome() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome expected = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome expected = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", expected);
 
             final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
             assertNotNull("The ObjectGraph is null", graph);
 
-            final EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpHome.class);
+            final EncCmpHome actual = (EncCmpHome) graph.getObject();
             assertNotNull("The EJBHome returned is null", actual);
         } catch (final Exception e) {
             fail("Received Exception " + e.getClass() + " : " + e.getMessage());
@@ -564,7 +563,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
             final ObjectGraph graph = ejbObject.returnNestedEJBHome();
             assertNotNull("The ObjectGraph is null", graph);
 
-            final EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpHome.class);
+            final EncCmpHome actual = (EncCmpHome) graph.getObject();
             assertNotNull("The EJBHome returned is null", actual);
         } catch (final Exception e) {
             fail("Received Exception " + e.getClass() + " : " + e.getMessage());
@@ -577,7 +576,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
             final EncCmpHome[] expected = new EncCmpHome[3];
             for (int i = 0; i < expected.length; i++) {
                 final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-                expected[i] = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+                expected[i] = (EncCmpHome) obj;
                 assertNotNull("The EJBHome returned from JNDI is null", expected[i]);
             }
 
@@ -598,13 +597,13 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
     public void test40_returnEJBObject() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EncCmpObject expected = home.create("test_40 CmpBean");
             assertNotNull("The EJBObject created is null", expected);
 
-            final EncCmpObject actual = (EncCmpObject) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBObject(expected), EncCmpObject.class);
+            final EncCmpObject actual = (EncCmpObject) ejbObject.returnEJBObject(expected);
             assertNotNull("The EJBObject returned is null", actual);
 
             assertTrue("The EJBObejcts are not identical", expected.isIdentical(actual));
@@ -615,7 +614,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
 
     public void test41_returnEJBObject2() {
         try {
-            final EncCmpObject actual = (EncCmpObject) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBObject(), EncCmpObject.class);
+            final EncCmpObject actual = (EncCmpObject) ejbObject.returnEJBObject();
             assertNotNull("The EJBObject returned is null", actual);
 
         } catch (final Exception e) {
@@ -626,7 +625,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
     public void test42_returnNestedEJBObject() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EncCmpObject expected = home.create("test_42 CmpBean");
@@ -635,7 +634,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
             final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
             assertNotNull("The ObjectGraph is null", graph);
 
-            final EncCmpObject actual = (EncCmpObject) javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpObject.class);
+            final EncCmpObject actual = (EncCmpObject) graph.getObject();
             assertNotNull("The EJBObject returned is null", actual);
 
             assertTrue("The EJBObejcts are not identical", expected.isIdentical(actual));
@@ -649,7 +648,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
             final ObjectGraph graph = ejbObject.returnNestedEJBObject();
             assertNotNull("The ObjectGraph is null", graph);
 
-            final EncCmpObject actual = (EncCmpObject) javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpObject.class);
+            final EncCmpObject actual = (EncCmpObject) graph.getObject();
             assertNotNull("The EJBHome returned is null", actual);
         } catch (final Exception e) {
             fail("Received Exception " + e.getClass() + " : " + e.getMessage());
@@ -659,7 +658,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
     public void Xtest44_returnEJBObjectArray() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EncCmpObject[] expected = new EncCmpObject[3];
@@ -688,7 +687,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
     public void test45_returnEJBMetaData() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EJBMetaData expected = home.getEJBMetaData();
@@ -717,7 +716,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
     public void test47_returnNestedEJBMetaData() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EJBMetaData expected = home.getEJBMetaData();
@@ -753,7 +752,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
         try {
 
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EJBMetaData[] expected = new EJBMetaData[3];
@@ -784,7 +783,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
     public void test50_returnHandle() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EncCmpObject object = home.create("test_50 CmpBean");
@@ -821,7 +820,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
     public void test52_returnNestedHandle() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EncCmpObject object = home.create("test_52 CmpBean");
@@ -864,7 +863,7 @@ public class Cmp2RmiIiopTests extends Cmp2TestClient {
     public void test54_returnHandleArray() {
         try {
             final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
-            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
+            final EncCmpHome home = (EncCmpHome) obj;
             assertNotNull("The EJBHome returned from JNDI is null", home);
 
             final EncCmpObject object = home.create("test_54 CmpBean");

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestClient.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestClient.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestClient.java
index 82139a9..c24ced7 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestClient.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestClient.java
@@ -16,14 +16,13 @@
  */
 package org.apache.openejb.test.entity.cmp2;
 
-import java.util.Properties;
+import org.apache.openejb.test.TestManager;
+
 import javax.ejb.EJBMetaData;
 import javax.ejb.Handle;
 import javax.ejb.HomeHandle;
-import javax.naming.Context;
 import javax.naming.InitialContext;
-
-import org.apache.openejb.test.TestManager;
+import java.util.Properties;
 
 public abstract class Cmp2TestClient extends org.apache.openejb.test.NamedTestCase {
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestSuite.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestSuite.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestSuite.java
index 07a9f42..c02ce8a 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestSuite.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestSuite.java
@@ -17,7 +17,6 @@
 package org.apache.openejb.test.entity.cmp2;
 
 import org.apache.openejb.test.TestManager;
-import org.apache.openejb.test.entity.cmr.CmrTestSuite;
 
 import javax.naming.InitialContext;
 import java.util.Properties;

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbHomeTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbHomeTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbHomeTests.java
index 450067d..9e323dc 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbHomeTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbHomeTests.java
@@ -17,8 +17,8 @@
  */
 package org.apache.openejb.test.entity.cmp2;
 
-import org.apache.openejb.test.entity.cmp.ComplexCmpHome;
 import org.apache.openejb.test.entity.cmp.ComplexCmpBeanPk;
+import org.apache.openejb.test.entity.cmp.ComplexCmpHome;
 
 import javax.ejb.EJBMetaData;
 import javax.ejb.ObjectNotFoundException;
@@ -35,7 +35,7 @@ public class Complex2EjbHomeTests extends ComplexCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/ComplexCmpHome");
-        ejbHome = (ComplexCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, ComplexCmpHome.class);
+        ejbHome = (ComplexCmpHome) obj;
         ejbObject = ejbHome.createObject("Second Bean");
         ejbPrimaryKey = ejbObject.getPrimaryKey();
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbMetaDataTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbMetaDataTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbMetaDataTests.java
index e466ea5..35087f3 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbMetaDataTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbMetaDataTests.java
@@ -17,9 +17,9 @@
  */
 package org.apache.openejb.test.entity.cmp2;
 
+import org.apache.openejb.test.entity.cmp.ComplexCmpBeanPk;
 import org.apache.openejb.test.entity.cmp.ComplexCmpHome;
 import org.apache.openejb.test.entity.cmp.ComplexCmpObject;
-import org.apache.openejb.test.entity.cmp.ComplexCmpBeanPk;
 
 import javax.ejb.EJBHome;
 
@@ -35,7 +35,7 @@ public class Complex2EjbMetaDataTests extends ComplexCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/ComplexCmpHome");
-        ejbHome = (ComplexCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, ComplexCmpHome.class);
+        ejbHome = (ComplexCmpHome) obj;
         ejbMetaData = ejbHome.getEJBMetaData();
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbObjectTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbObjectTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbObjectTests.java
index f21b47b..8523da9 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbObjectTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2EjbObjectTests.java
@@ -17,8 +17,8 @@
  */
 package org.apache.openejb.test.entity.cmp2;
 
-import org.apache.openejb.test.entity.cmp.ComplexCmpHome;
 import org.apache.openejb.test.entity.cmp.ComplexCmpBeanPk;
+import org.apache.openejb.test.entity.cmp.ComplexCmpHome;
 
 import javax.ejb.EJBHome;
 import javax.ejb.ObjectNotFoundException;
@@ -35,7 +35,7 @@ public class Complex2EjbObjectTests extends ComplexCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/ComplexCmpHome");
-        ejbHome = (ComplexCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, ComplexCmpHome.class);
+        ejbHome = (ComplexCmpHome) obj;
         ejbObject = ejbHome.createObject("Third Bean");
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HandleTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HandleTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HandleTests.java
index 738870d..9c79b34 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HandleTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HandleTests.java
@@ -21,11 +21,11 @@ import org.apache.openejb.test.entity.cmp.ComplexCmpHome;
 
 import javax.ejb.EJBObject;
 import javax.ejb.Handle;
-import java.rmi.MarshalledObject;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutputStream;
 import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.rmi.MarshalledObject;
 
 /**
  * [7] Should be run as the seventh test suite of the BasicCmpTestClients
@@ -38,7 +38,7 @@ public class Complex2HandleTests extends ComplexCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/ComplexCmpHome");
-        ejbHome = (ComplexCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, ComplexCmpHome.class);
+        ejbHome = (ComplexCmpHome) obj;
         ejbObject = ejbHome.createObject("Fifth Bean");
         ejbHandle = ejbObject.getHandle();
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HomeHandleTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HomeHandleTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HomeHandleTests.java
index 35339c6..649c013 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HomeHandleTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HomeHandleTests.java
@@ -21,11 +21,11 @@ import org.apache.openejb.test.entity.cmp.ComplexCmpHome;
 
 import javax.ejb.EJBHome;
 import javax.ejb.HomeHandle;
-import java.rmi.MarshalledObject;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutputStream;
 import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.rmi.MarshalledObject;
 
 /**
  * [6] Should be run as the sixth test suite of the BasicCmpTestClients
@@ -39,7 +39,7 @@ public class Complex2HomeHandleTests extends ComplexCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/ComplexCmpHome");
-        ejbHome = (ComplexCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, ComplexCmpHome.class);
+        ejbHome = (ComplexCmpHome) obj;
         ejbHomeHandle = ejbHome.getHomeHandle();
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HomeIntfcTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HomeIntfcTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HomeIntfcTests.java
index 92391c8..26889da 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HomeIntfcTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2HomeIntfcTests.java
@@ -22,7 +22,6 @@ import org.apache.openejb.test.entity.cmp.ComplexCmpBeanPk;
 import org.apache.openejb.test.entity.cmp.ComplexCmpHome;
 import org.apache.openejb.test.entity.cmp.ComplexCmpObject;
 
-import javax.rmi.PortableRemoteObject;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
@@ -39,7 +38,7 @@ public class Complex2HomeIntfcTests extends ComplexCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/ComplexCmpHome");
-        ejbHome = (ComplexCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, ComplexCmpHome.class);
+        ejbHome = (ComplexCmpHome) obj;
     }
 
     //===============================
@@ -84,7 +83,7 @@ public class Complex2HomeIntfcTests extends ComplexCmp2TestClient {
             assertNotNull("The Collection is null", objects);
             assertEquals("The Collection is not the right size.", keys.size(), objects.size());
             for (final Object object : objects) {
-                ejbObject = (ComplexCmpObject) PortableRemoteObject.narrow(object, ComplexCmpObject.class);
+                ejbObject = (ComplexCmpObject) object;
 
                 // This could be problematic, it assumes the order of the collection.
                 final ComplexCmpBeanPk foundKey = (ComplexCmpBeanPk) ejbObject.getPrimaryKey();

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2RemoteIntfcTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2RemoteIntfcTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2RemoteIntfcTests.java
index 35d4fbf..4a24495 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2RemoteIntfcTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Complex2RemoteIntfcTests.java
@@ -31,7 +31,7 @@ public class Complex2RemoteIntfcTests extends ComplexCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/ComplexCmpHome");
-        ejbHome = (ComplexCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, ComplexCmpHome.class);
+        ejbHome = (ComplexCmpHome) obj;
         ejbObject = ejbHome.createObject("Forth Bean");
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/EjbqlLocalTest.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/EjbqlLocalTest.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/EjbqlLocalTest.java
index fcae452..39a82b6 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/EjbqlLocalTest.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/EjbqlLocalTest.java
@@ -22,7 +22,6 @@ import org.apache.openejb.test.entity.ejbql.QueryDataLocal;
 import org.apache.openejb.test.entity.ejbql.QueryDataRemote;
 import org.apache.openejb.test.entity.ejbql.QueryHome;
 
-import javax.rmi.PortableRemoteObject;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -40,9 +39,9 @@ public class EjbqlLocalTest extends Cmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         Object obj = initialContext.lookup("client/tests/entity/ejbql/Query");
-        queryHome = (QueryHome) PortableRemoteObject.narrow(obj, QueryHome.class);
+        queryHome = (QueryHome) obj;
         obj = initialContext.lookup("client/tests/entity/ejbql/QueryData");
-        final QueryDataHome queryDataHome = (QueryDataHome) PortableRemoteObject.narrow(obj, QueryDataHome.class);
+        final QueryDataHome queryDataHome = (QueryDataHome) obj;
 
         queryDataHome.create(0);
         queryDataHome.create(1);

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbHomeTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbHomeTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbHomeTests.java
index 1764437..4ae0f6f 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbHomeTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbHomeTests.java
@@ -34,7 +34,7 @@ public class Unknown2EjbHomeTests extends UnknownCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/UnknownCmpHome");
-        ejbHome = (UnknownCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, UnknownCmpHome.class);
+        ejbHome = (UnknownCmpHome) obj;
         ejbObject = ejbHome.createObject("Second Bean");
         ejbPrimaryKey = ejbObject.getPrimaryKey();
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbMetaDataTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbMetaDataTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbMetaDataTests.java
index a08ebf0..0c0c2e5 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbMetaDataTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbMetaDataTests.java
@@ -34,7 +34,7 @@ public class Unknown2EjbMetaDataTests extends UnknownCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/UnknownCmpHome");
-        ejbHome = (UnknownCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, UnknownCmpHome.class);
+        ejbHome = (UnknownCmpHome) obj;
         ejbMetaData = ejbHome.getEJBMetaData();
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbObjectTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbObjectTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbObjectTests.java
index 917d658..8a069d0 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbObjectTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2EjbObjectTests.java
@@ -34,7 +34,7 @@ public class Unknown2EjbObjectTests extends UnknownCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/UnknownCmpHome");
-        ejbHome = (UnknownCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, UnknownCmpHome.class);
+        ejbHome = (UnknownCmpHome) obj;
         ejbObject = ejbHome.createObject("Third Bean");
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HandleTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HandleTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HandleTests.java
index 8093e71..c101556 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HandleTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HandleTests.java
@@ -21,11 +21,11 @@ import org.apache.openejb.test.entity.cmp.UnknownCmpHome;
 
 import javax.ejb.EJBObject;
 import javax.ejb.Handle;
-import java.rmi.MarshalledObject;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutputStream;
 import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.rmi.MarshalledObject;
 
 /**
  * [7] Should be run as the seventh test suite of the BasicCmpTestClients
@@ -38,7 +38,7 @@ public class Unknown2HandleTests extends UnknownCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/UnknownCmpHome");
-        ejbHome = (UnknownCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, UnknownCmpHome.class);
+        ejbHome = (UnknownCmpHome) obj;
         ejbObject = ejbHome.createObject("Fifth Bean");
         ejbHandle = ejbObject.getHandle();
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HomeHandleTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HomeHandleTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HomeHandleTests.java
index c1a4e24..c6035dc 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HomeHandleTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HomeHandleTests.java
@@ -21,11 +21,11 @@ import org.apache.openejb.test.entity.cmp.UnknownCmpHome;
 
 import javax.ejb.EJBHome;
 import javax.ejb.HomeHandle;
-import java.rmi.MarshalledObject;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutputStream;
 import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.rmi.MarshalledObject;
 
 /**
  * [6] Should be run as the sixth test suite of the BasicCmpTestClients
@@ -39,7 +39,7 @@ public class Unknown2HomeHandleTests extends UnknownCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/UnknownCmpHome");
-        ejbHome = (UnknownCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, UnknownCmpHome.class);
+        ejbHome = (UnknownCmpHome) obj;
         ejbHomeHandle = ejbHome.getHomeHandle();
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HomeIntfcTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HomeIntfcTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HomeIntfcTests.java
index b540637..114c0d7 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HomeIntfcTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2HomeIntfcTests.java
@@ -20,11 +20,10 @@ package org.apache.openejb.test.entity.cmp2;
 import org.apache.openejb.test.entity.cmp.UnknownCmpHome;
 import org.apache.openejb.test.entity.cmp.UnknownCmpObject;
 
-import javax.rmi.PortableRemoteObject;
-import java.util.Set;
-import java.util.HashSet;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
 
 /**
  * [2] Should be run as the second test suite of the BasicCmpTestClients
@@ -37,7 +36,7 @@ public class Unknown2HomeIntfcTests extends UnknownCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/UnknownCmpHome");
-        ejbHome = (UnknownCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, UnknownCmpHome.class);
+        ejbHome = (UnknownCmpHome) obj;
     }
 
     //===============================
@@ -82,7 +81,7 @@ public class Unknown2HomeIntfcTests extends UnknownCmp2TestClient {
             assertNotNull("The Collection is null", objects);
             assertEquals("The Collection is not the right size.", keys.size(), objects.size());
             for (final Object object : objects) {
-                ejbObject = (UnknownCmpObject) PortableRemoteObject.narrow(object, UnknownCmpObject.class);
+                ejbObject = (UnknownCmpObject) object;
 
                 // This could be problematic, it assumes the order of the collection.
                 final Object foundKey = ejbObject.getPrimaryKey();

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2RemoteIntfcTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2RemoteIntfcTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2RemoteIntfcTests.java
index 2c386b7..b55eaa9 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2RemoteIntfcTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Unknown2RemoteIntfcTests.java
@@ -31,7 +31,7 @@ public class Unknown2RemoteIntfcTests extends UnknownCmp2TestClient {
     protected void setUp() throws Exception {
         super.setUp();
         final Object obj = initialContext.lookup("client/tests/entity/cmp2/UnknownCmpHome");
-        ejbHome = (UnknownCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, UnknownCmpHome.class);
+        ejbHome = (UnknownCmpHome) obj;
         ejbObject = ejbHome.createObject("Forth Bean");
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmr/AbstractCMRTest.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmr/AbstractCMRTest.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmr/AbstractCMRTest.java
index df0f4dc..7a1afd2 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmr/AbstractCMRTest.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmr/AbstractCMRTest.java
@@ -17,24 +17,23 @@
 package org.apache.openejb.test.entity.cmr;
 
 
-import javax.transaction.SystemException;
+import org.apache.openejb.test.TestManager;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
 import javax.transaction.HeuristicMixedException;
 import javax.transaction.HeuristicRollbackException;
 import javax.transaction.RollbackException;
 import javax.transaction.Status;
+import javax.transaction.SystemException;
 import javax.transaction.TransactionManager;
-import javax.sql.DataSource;
-import javax.naming.InitialContext;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import java.util.Properties;
-import java.sql.SQLException;
 import java.sql.Connection;
-import java.sql.Statement;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
-
-import org.apache.openejb.test.TestManager;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Properties;
 
 /**
  * @version $Revision$ $Date$

http://git-wip-us.apache.org/repos/asf/tomee/blob/09ace086/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmr/CmrMappingTests.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmr/CmrMappingTests.java b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmr/CmrMappingTests.java
index 67a4823..ff861b3 100644
--- a/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmr/CmrMappingTests.java
+++ b/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmr/CmrMappingTests.java
@@ -17,7 +17,6 @@
  */
 package org.apache.openejb.test.entity.cmr;
 
-import org.junit.Assert;
 import junit.framework.AssertionFailedError;
 import org.apache.openejb.test.TestFailureException;
 import org.apache.openejb.test.entity.cmr.cmrmapping.ManyOwningSideLocal;
@@ -26,6 +25,7 @@ import org.apache.openejb.test.entity.cmr.cmrmapping.OneInverseSideLocal;
 import org.apache.openejb.test.entity.cmr.cmrmapping.OneInverseSideLocalHome;
 import org.apache.openejb.test.entity.cmr.cmrmapping.OneOwningSideLocal;
 import org.apache.openejb.test.entity.cmr.cmrmapping.OneOwningSideLocalHome;
+import org.junit.Assert;
 
 import javax.ejb.TransactionRolledbackLocalException;
 import javax.transaction.HeuristicMixedException;


Mime
View raw message