tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgallim...@apache.org
Subject [1/5] tomee git commit: TOMEE-2234 add remote test
Date Wed, 12 Dec 2018 22:33:26 GMT
Repository: tomee
Updated Branches:
  refs/heads/master 7e372d8ce -> 66ce200e4


TOMEE-2234 add remote test


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/5fa2b74d
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/5fa2b74d
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/5fa2b74d

Branch: refs/heads/master
Commit: 5fa2b74de94757a3202b79c8b31fefd17e1185d2
Parents: 004ad51
Author: Jonathan Gallimore <jon@jrg.me.uk>
Authored: Tue Dec 11 14:49:24 2018 +0000
Committer: Jonathan Gallimore <jon@jrg.me.uk>
Committed: Tue Dec 11 14:49:24 2018 +0000

----------------------------------------------------------------------
 .../arquillian/tests/bmp/local/BigFinder.java   | 22 +++++
 .../tests/bmp/local/BigFinderBean.java          | 57 +++++++++++
 .../tests/bmp/local/BigFinderHome.java          | 25 +++++
 .../arquillian/tests/bmp/local/BigFinderPK.java | 24 +++++
 .../tests/bmp/local/BmpLocalEntityTest.java     | 62 ++++++++++++
 .../tests/bmp/local/FinderServlet.java          | 33 +++++++
 .../arquillian/tests/bmp/local/FinderTest.java  | 25 +++++
 .../tests/bmp/local/FinderTestBean.java         | 86 +++++++++++++++++
 .../tests/bmp/local/FinderTestHome.java         | 25 +++++
 .../arquillian/tests/bmp/local/IntegerPK.java   | 99 ++++++++++++++++++++
 .../tests/bmp/local/LittleFinder.java           | 22 +++++
 .../tests/bmp/local/LittleFinderBean.java       | 55 +++++++++++
 .../tests/bmp/local/LittleFinderHome.java       | 25 +++++
 .../tests/bmp/local/LittleFinderPK.java         | 25 +++++
 .../arquillian/tests/bmp/local/StringPK.java    | 71 ++++++++++++++
 .../arquillian/tests/bmp/remote/BigFinder.java  | 22 +++++
 .../tests/bmp/remote/BigFinderBean.java         | 57 +++++++++++
 .../tests/bmp/remote/BigFinderHome.java         | 25 +++++
 .../tests/bmp/remote/BigFinderPK.java           | 24 +++++
 .../tests/bmp/remote/BmpRemoteEntityTest.java   | 62 ++++++++++++
 .../tests/bmp/remote/FinderServlet.java         | 33 +++++++
 .../arquillian/tests/bmp/remote/FinderTest.java | 24 +++++
 .../tests/bmp/remote/FinderTestBean.java        | 82 ++++++++++++++++
 .../tests/bmp/remote/FinderTestHome.java        | 25 +++++
 .../arquillian/tests/bmp/remote/IntegerPK.java  | 99 ++++++++++++++++++++
 .../tests/bmp/remote/LittleFinder.java          | 22 +++++
 .../tests/bmp/remote/LittleFinderBean.java      | 55 +++++++++++
 .../tests/bmp/remote/LittleFinderHome.java      | 25 +++++
 .../tests/bmp/remote/LittleFinderPK.java        | 25 +++++
 .../arquillian/tests/bmp/remote/StringPK.java   | 71 ++++++++++++++
 .../arquillian/tests/bmp/local/ejb-jar.xml      | 65 +++++++++++++
 .../openejb/arquillian/tests/bmp/local/web.xml  | 42 +++++++++
 .../arquillian/tests/bmp/remote/ejb-jar.xml     | 65 +++++++++++++
 .../openejb/arquillian/tests/bmp/remote/web.xml | 42 +++++++++
 34 files changed, 1521 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinder.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinder.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinder.java
new file mode 100644
index 0000000..207749f
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinder.java
@@ -0,0 +1,22 @@
+/*
+ * 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.arquillian.tests.bmp.local;
+
+import javax.ejb.EJBLocalObject;
+
+public interface BigFinder extends EJBLocalObject {
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinderBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinderBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinderBean.java
new file mode 100644
index 0000000..53a6670
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinderBean.java
@@ -0,0 +1,57 @@
+/*
+ * 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.arquillian.tests.bmp.local;
+
+import javax.ejb.EntityBean;
+import javax.ejb.EntityContext;
+import javax.ejb.RemoveException;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Collection;
+
+public class BigFinderBean implements EntityBean {
+
+    public void ejbActivate() throws RemoteException {
+    }
+
+    public void ejbPassivate() throws RemoteException {
+    }
+
+    public void setEntityContext(final EntityContext context) throws RemoteException {
+    }
+
+    public void unsetEntityContext() throws RemoteException {
+    }
+
+    public void ejbLoad() throws RemoteException {
+    }
+
+    public void ejbRemove() throws RemoveException, RemoteException {
+    }
+
+    public void ejbStore() throws RemoteException {
+    }
+
+    public Collection<BigFinderPK> ejbFindN(final int count) {
+        final ArrayList<BigFinderPK> pks = new ArrayList();
+        for (int i = 0; i < count; ++i) {
+            pks.add(new BigFinderPK(i));
+        }
+        return pks;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinderHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinderHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinderHome.java
new file mode 100644
index 0000000..dc75c88
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinderHome.java
@@ -0,0 +1,25 @@
+/*
+ * 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.arquillian.tests.bmp.local;
+
+import javax.ejb.EJBLocalHome;
+import java.rmi.RemoteException;
+import java.util.Collection;
+
+public interface BigFinderHome extends EJBLocalHome {
+    Collection<BigFinder> findN(int count) throws RemoteException;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinderPK.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinderPK.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinderPK.java
new file mode 100644
index 0000000..3e2b7cd
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinderPK.java
@@ -0,0 +1,24 @@
+/*
+ * 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.arquillian.tests.bmp.local;
+
+public class BigFinderPK extends IntegerPK {
+
+    public BigFinderPK(final int iKey) {
+        super(iKey);
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BmpLocalEntityTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BmpLocalEntityTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BmpLocalEntityTest.java
new file mode 100644
index 0000000..2812aea
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BmpLocalEntityTest.java
@@ -0,0 +1,62 @@
+/*
+ * 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.arquillian.tests.bmp.local;
+
+import org.apache.ziplock.IO;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.ClassLoaderAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.net.URL;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@RunWith(Arquillian.class)
+public class BmpLocalEntityTest {
+
+    @ArquillianResource
+    private URL url;
+
+    @Deployment(testable = false)
+    public static WebArchive createDeployment() {
+        WebArchive archive = ShrinkWrap.create(WebArchive.class, BmpLocalEntityTest.class.getSimpleName() + ".war")
+                .addClasses(BigFinder.class, BigFinderBean.class, BigFinderHome.class, BigFinderPK.class,
+                        FinderServlet.class, FinderTest.class, FinderTestBean.class, FinderTestHome.class, IntegerPK.class,
+                        LittleFinder.class, LittleFinderBean.class, LittleFinderHome.class, LittleFinderPK.class, StringPK.class)
+                .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/bmp/local/ejb-jar.xml"), "ejb-jar.xml")
+                .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/bmp/local/web.xml"), "web.xml");
+
+        System.out.println(archive.toString(true));
+        return archive;
+    }
+
+    @Test
+    @RunAsClient
+    public void checkBmp() throws Exception {
+        final String output = IO.slurp(new URL(url.toExternalForm()));
+        System.out.println(output);
+        Assert.assertTrue(output.contains("Test succeeded"));
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderServlet.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderServlet.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderServlet.java
new file mode 100644
index 0000000..f6540e5
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderServlet.java
@@ -0,0 +1,33 @@
+package org.apache.openejb.arquillian.tests.bmp.local;
+
+import javax.naming.InitialContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+public class FinderServlet extends HttpServlet {
+
+    @Override
+    protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
+        final FinderTestHome testHome;
+        InitialContext ctx = null;
+        try {
+            ctx = new InitialContext();
+            testHome = (FinderTestHome) ctx.lookup("java:comp/env/ejb/FinderTest");
+            resp.getWriter().println(testHome.create().runTest());
+            resp.getWriter().flush();
+        } catch (final Exception e) {
+            throw new ServletException(e);
+        } finally {
+            try {
+                if (ctx != null) {
+                    ctx.close();
+                }
+            } catch (final Exception e) {
+                throw new ServletException(e);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderTest.java
new file mode 100644
index 0000000..e47d86b
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderTest.java
@@ -0,0 +1,25 @@
+/*
+ * 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.arquillian.tests.bmp.local;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.EJBLocalObject;
+
+public interface FinderTest extends EJBLocalObject {
+    String runTest() throws Exception, RemoteException;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderTestBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderTestBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderTestBean.java
new file mode 100644
index 0000000..8e78fac
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderTestBean.java
@@ -0,0 +1,86 @@
+/*
+ * 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.arquillian.tests.bmp.local;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBException;
+import javax.ejb.EJBObject;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import java.rmi.RemoteException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Properties;
+
+public class FinderTestBean implements SessionBean {
+
+    public void setSessionContext(final SessionContext context) throws RemoteException {
+    }
+
+    public void ejbRemove() throws RemoteException {
+    }
+
+    public void ejbActivate() throws RemoteException {
+    }
+
+    public void ejbPassivate() throws RemoteException {
+    }
+
+    public void ejbCreate() throws CreateException {
+    }
+
+    public String runTest()
+            throws Exception {
+        final BigFinderHome bigFinderHome = (BigFinderHome) lookup("BigFinderHome");
+        final LittleFinderHome littleFinderHome = (LittleFinderHome) lookup("LittleFinderHome");
+        for (int i = 1; i < 300; ++i) {
+            bigFinderHome.findN(i);
+
+            final Collection littleList = littleFinderHome.findAll();
+            for (final Object obj : littleList) {
+                final StringBuilder msg = new StringBuilder();
+                if (!(obj instanceof LittleFinder)) {
+                    msg.append("Failed with " + i + " records. LittleFinder Remote is actually " + obj.getClass().getName() + " Implemented interfaces " + Arrays.toString(obj.getClass().getInterfaces()));
+                    if (obj instanceof EJBObject) {
+                        final Object pk = ((EJBObject) obj).getPrimaryKey();
+                        msg.append(" Primary key value is " + pk);
+                    }
+
+                    throw new EJBException(msg.toString());
+                }
+            }
+        }
+
+        return "Test succeeded";
+    }
+
+    public static Object lookup(final String s) throws NamingException {
+        final Properties p = new Properties();
+        p.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.core.LocalInitialContextFactory");
+        final InitialContext ctx = new InitialContext(p);
+        try {
+            return ctx.lookup("java:comp/env/ejb/" + s);
+        } finally {
+            ctx.close();
+        }
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderTestHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderTestHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderTestHome.java
new file mode 100644
index 0000000..36712b2
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/FinderTestHome.java
@@ -0,0 +1,25 @@
+/*
+ * 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.arquillian.tests.bmp.local;
+
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.EJBLocalHome;
+
+public interface FinderTestHome extends EJBLocalHome {
+    FinderTest create() throws CreateException, RemoteException;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/IntegerPK.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/IntegerPK.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/IntegerPK.java
new file mode 100644
index 0000000..1a7b9e4
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/IntegerPK.java
@@ -0,0 +1,99 @@
+/*
+ * 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.arquillian.tests.bmp.local;
+
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.sql.Types;
+
+/**
+ * The base class for a primary key for an integer type.
+ */
+public class IntegerPK extends Number {
+    private static final long serialVersionUID = 351946466791640696L;
+    private int m_value;
+
+    public IntegerPK(final int value) {
+        m_value = value;
+    }
+
+    public int getValue() {
+        return m_value;
+    }
+
+    public Object clone() {
+        try {
+            return super.clone();
+        } catch (final CloneNotSupportedException exc) {
+            throw new RuntimeException("Cannot clone", exc);
+        }
+    }
+
+    public boolean equals(final Object o) {
+        if (o == null)
+            return false;
+        return m_value == ((IntegerPK) o).m_value;
+    }
+
+    public int compareTo(final Object o) {
+        return (int) (m_value - ((IntegerPK) o).m_value);
+    }
+
+    public int hashCode() {
+        return m_value;
+    }
+
+    public String toString() {
+        return String.valueOf(m_value);
+    }
+
+    // Number interface
+    public byte byteValue() {
+        return (byte) m_value;
+    }
+
+    public short shortValue() {
+        return (short) m_value;
+    }
+
+    public int intValue() {
+        return m_value;
+    }
+
+    public long longValue() {
+        return m_value;
+    }
+
+    public float floatValue() {
+        return m_value;
+    }
+
+    public double doubleValue() {
+        return m_value;
+    }
+
+    /**
+     * For ParmType interface
+     */
+    public void add(final int i, final PreparedStatement stat) throws SQLException {
+        stat.setInt(i, m_value);
+    }
+
+    public int getType() {
+        return Types.INTEGER;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinder.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinder.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinder.java
new file mode 100644
index 0000000..7a62e62
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinder.java
@@ -0,0 +1,22 @@
+/*
+ * 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.arquillian.tests.bmp.local;
+
+import javax.ejb.EJBLocalObject;
+
+public interface LittleFinder extends EJBLocalObject {
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinderBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinderBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinderBean.java
new file mode 100644
index 0000000..7e46e28
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinderBean.java
@@ -0,0 +1,55 @@
+/*
+ * 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.arquillian.tests.bmp.local;
+
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Collection;
+import javax.ejb.EntityBean;
+import javax.ejb.EntityContext;
+
+public class LittleFinderBean implements EntityBean {
+    private static final long serialVersionUID = -1719910497840449494L;
+
+    public void ejbActivate() throws RemoteException {
+    }
+
+    public void ejbPassivate() throws RemoteException {
+    }
+
+    public void setEntityContext(final EntityContext context) throws RemoteException {
+    }
+
+    public void unsetEntityContext() throws RemoteException {
+    }
+
+    public void ejbLoad() throws RemoteException {
+    }
+
+    public void ejbStore() throws RemoteException {
+    }
+
+    public void ejbRemove() throws RemoteException {
+    }
+
+    public Collection<LittleFinderPK> ejbFindAll() throws Exception {
+        final ArrayList<LittleFinderPK> pks = new ArrayList();
+        pks.add(new LittleFinderPK("1A"));
+        return pks;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinderHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinderHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinderHome.java
new file mode 100644
index 0000000..c5d980a
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinderHome.java
@@ -0,0 +1,25 @@
+/*
+ * 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.arquillian.tests.bmp.local;
+
+import javax.ejb.EJBLocalHome;
+import java.rmi.RemoteException;
+import java.util.Collection;
+
+public interface LittleFinderHome extends EJBLocalHome {
+    Collection<LittleFinder> findAll() throws Exception, RemoteException;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinderPK.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinderPK.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinderPK.java
new file mode 100644
index 0000000..b334d29
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinderPK.java
@@ -0,0 +1,25 @@
+/*
+ * 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.arquillian.tests.bmp.local;
+
+public class LittleFinderPK extends StringPK {
+    private static final long serialVersionUID = 5782590322327281948L;
+
+    public LittleFinderPK(final String s) {
+        super(s);
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/StringPK.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/StringPK.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/StringPK.java
new file mode 100644
index 0000000..44ed801
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/StringPK.java
@@ -0,0 +1,71 @@
+/*
+ * 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.arquillian.tests.bmp.local;
+
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.sql.Types;
+
+/**
+ * A primary key in a Database table with a String representation (varchar).
+ */
+public class StringPK implements Serializable {
+    private static final long serialVersionUID = -6429314795121119701L;
+    private String m_value;
+
+    public StringPK(final String s) {
+        m_value = s;
+    }
+
+    public String getValue() {
+        return m_value;
+    }
+
+    public boolean equals(final Object o) {
+        if (o instanceof StringPK) {
+            final StringPK s = (StringPK) o;
+            if (m_value == null)
+                return s.m_value == null;
+            return m_value.equals(s.m_value);
+        } else {
+            return false;
+        }
+    }
+
+    public int compareTo(final Object o) {
+        return ("" + m_value).compareTo(((StringPK) o).m_value);
+    }
+
+    public int hashCode() {
+        return ("" + m_value).hashCode();
+    }
+
+    public String toString() {
+        if (m_value == null)
+            return "NULL";
+        return '\'' + m_value + '\'';
+    }
+
+    public void add(final int i, final PreparedStatement stat) throws SQLException {
+        stat.setString(i, m_value);
+    }
+
+    public int getType() {
+        return Types.VARCHAR;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinder.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinder.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinder.java
new file mode 100644
index 0000000..5d12837
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinder.java
@@ -0,0 +1,22 @@
+/*
+ * 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.arquillian.tests.bmp.remote;
+
+import javax.ejb.EJBObject;
+
+public interface BigFinder extends EJBObject {
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinderBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinderBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinderBean.java
new file mode 100644
index 0000000..44de739
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinderBean.java
@@ -0,0 +1,57 @@
+/*
+ * 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.arquillian.tests.bmp.remote;
+
+import javax.ejb.EntityBean;
+import javax.ejb.EntityContext;
+import javax.ejb.RemoveException;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Collection;
+
+public class BigFinderBean implements EntityBean {
+
+    public void ejbActivate() throws RemoteException {
+    }
+
+    public void ejbPassivate() throws RemoteException {
+    }
+
+    public void setEntityContext(final EntityContext context) throws RemoteException {
+    }
+
+    public void unsetEntityContext() throws RemoteException {
+    }
+
+    public void ejbLoad() throws RemoteException {
+    }
+
+    public void ejbRemove() throws RemoveException, RemoteException {
+    }
+
+    public void ejbStore() throws RemoteException {
+    }
+
+    public Collection<BigFinderPK> ejbFindN(final int count) {
+        final ArrayList<BigFinderPK> pks = new ArrayList();
+        for (int i = 0; i < count; ++i) {
+            pks.add(new BigFinderPK(i));
+        }
+        return pks;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinderHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinderHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinderHome.java
new file mode 100644
index 0000000..65bd691
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinderHome.java
@@ -0,0 +1,25 @@
+/*
+ * 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.arquillian.tests.bmp.remote;
+
+import javax.ejb.EJBHome;
+import java.rmi.RemoteException;
+import java.util.Collection;
+
+public interface BigFinderHome extends EJBHome {
+    Collection<BigFinder> findN(int count) throws RemoteException;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinderPK.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinderPK.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinderPK.java
new file mode 100644
index 0000000..b8b0cd9
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinderPK.java
@@ -0,0 +1,24 @@
+/*
+ * 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.arquillian.tests.bmp.remote;
+
+public class BigFinderPK extends IntegerPK {
+
+    public BigFinderPK(final int iKey) {
+        super(iKey);
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BmpRemoteEntityTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BmpRemoteEntityTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BmpRemoteEntityTest.java
new file mode 100644
index 0000000..3580a2b
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BmpRemoteEntityTest.java
@@ -0,0 +1,62 @@
+/*
+ * 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.arquillian.tests.bmp.remote;
+
+import org.apache.ziplock.IO;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.ClassLoaderAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.net.URL;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@RunWith(Arquillian.class)
+public class BmpRemoteEntityTest {
+
+    @ArquillianResource
+    private URL url;
+
+    @Deployment(testable = false)
+    public static WebArchive createDeployment() {
+        WebArchive archive = ShrinkWrap.create(WebArchive.class, BmpRemoteEntityTest.class.getSimpleName() + ".war")
+                .addClasses(BigFinder.class, BigFinderBean.class, BigFinderHome.class, BigFinderPK.class,
+                        FinderServlet.class, FinderTest.class, FinderTestBean.class, FinderTestHome.class, IntegerPK.class,
+                        LittleFinder.class, LittleFinderBean.class, LittleFinderHome.class, LittleFinderPK.class, StringPK.class)
+                .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/bmp/remote/ejb-jar.xml"), "ejb-jar.xml")
+                .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/bmp/remote/web.xml"), "web.xml");
+
+        System.out.println(archive.toString(true));
+        return archive;
+    }
+
+    @Test
+    @RunAsClient
+    public void checkBmp() throws Exception {
+        final String output = IO.slurp(new URL(url.toExternalForm()));
+        System.out.println(output);
+        Assert.assertTrue(output.contains("Test succeeded"));
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderServlet.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderServlet.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderServlet.java
new file mode 100644
index 0000000..159a18f
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderServlet.java
@@ -0,0 +1,33 @@
+package org.apache.openejb.arquillian.tests.bmp.remote;
+
+import javax.naming.InitialContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+public class FinderServlet extends HttpServlet {
+
+    @Override
+    protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
+        final FinderTestHome testHome;
+        InitialContext ctx = null;
+        try {
+            ctx = new InitialContext();
+            testHome = (FinderTestHome) ctx.lookup("java:comp/env/ejb/FinderTest");
+            resp.getWriter().println(testHome.create().runTest());
+            resp.getWriter().flush();
+        } catch (final Exception e) {
+            throw new ServletException(e);
+        } finally {
+            try {
+                if (ctx != null) {
+                    ctx.close();
+                }
+            } catch (final Exception e) {
+                throw new ServletException(e);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderTest.java
new file mode 100644
index 0000000..d1579e8
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderTest.java
@@ -0,0 +1,24 @@
+/*
+ * 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.arquillian.tests.bmp.remote;
+
+import javax.ejb.EJBObject;
+import java.rmi.RemoteException;
+
+public interface FinderTest extends EJBObject {
+    String runTest() throws Exception, RemoteException;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderTestBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderTestBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderTestBean.java
new file mode 100644
index 0000000..b8ea232
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderTestBean.java
@@ -0,0 +1,82 @@
+/*
+ * 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.arquillian.tests.bmp.remote;
+
+import javax.ejb.*;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import java.rmi.RemoteException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Properties;
+
+public class FinderTestBean implements SessionBean {
+
+    public void setSessionContext(final SessionContext context) throws RemoteException {
+    }
+
+    public void ejbRemove() throws RemoteException {
+    }
+
+    public void ejbActivate() throws RemoteException {
+    }
+
+    public void ejbPassivate() throws RemoteException {
+    }
+
+    public void ejbCreate() throws CreateException {
+    }
+
+    public String runTest()
+            throws Exception {
+        final BigFinderHome bigFinderHome = (BigFinderHome) lookup("BigFinderHome");
+        final LittleFinderHome littleFinderHome = (LittleFinderHome) lookup("LittleFinderHome");
+        for (int i = 1; i < 300; ++i) {
+            bigFinderHome.findN(i);
+
+            final Collection littleList = littleFinderHome.findAll();
+            for (final Object obj : littleList) {
+                final StringBuilder msg = new StringBuilder();
+                if (!(obj instanceof LittleFinder)) {
+                    msg.append("Failed with " + i + " records. LittleFinder Remote is actually " + obj.getClass().getName() + " Implemented interfaces " + Arrays.toString(obj.getClass().getInterfaces()));
+                    if (obj instanceof EJBObject) {
+                        final Object pk = ((EJBObject) obj).getPrimaryKey();
+                        msg.append(" Primary key value is " + pk);
+                    }
+
+                    throw new EJBException(msg.toString());
+                }
+            }
+        }
+
+        return "Test succeeded";
+    }
+
+    public static Object lookup(final String s) throws NamingException {
+        final Properties p = new Properties();
+        p.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.core.LocalInitialContextFactory");
+        final InitialContext ctx = new InitialContext(p);
+        try {
+            return ctx.lookup("java:comp/env/ejb/" + s);
+        } finally {
+            ctx.close();
+        }
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderTestHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderTestHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderTestHome.java
new file mode 100644
index 0000000..91bb982
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderTestHome.java
@@ -0,0 +1,25 @@
+/*
+ * 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.arquillian.tests.bmp.remote;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+import java.rmi.RemoteException;
+
+public interface FinderTestHome extends EJBHome {
+    FinderTest create() throws CreateException, RemoteException;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/IntegerPK.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/IntegerPK.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/IntegerPK.java
new file mode 100644
index 0000000..99523ca
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/IntegerPK.java
@@ -0,0 +1,99 @@
+/*
+ * 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.arquillian.tests.bmp.remote;
+
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.sql.Types;
+
+/**
+ * The base class for a primary key for an integer type.
+ */
+public class IntegerPK extends Number {
+    private static final long serialVersionUID = 351946466791640696L;
+    private int m_value;
+
+    public IntegerPK(final int value) {
+        m_value = value;
+    }
+
+    public int getValue() {
+        return m_value;
+    }
+
+    public Object clone() {
+        try {
+            return super.clone();
+        } catch (final CloneNotSupportedException exc) {
+            throw new RuntimeException("Cannot clone", exc);
+        }
+    }
+
+    public boolean equals(final Object o) {
+        if (o == null)
+            return false;
+        return m_value == ((IntegerPK) o).m_value;
+    }
+
+    public int compareTo(final Object o) {
+        return (int) (m_value - ((IntegerPK) o).m_value);
+    }
+
+    public int hashCode() {
+        return m_value;
+    }
+
+    public String toString() {
+        return String.valueOf(m_value);
+    }
+
+    // Number interface
+    public byte byteValue() {
+        return (byte) m_value;
+    }
+
+    public short shortValue() {
+        return (short) m_value;
+    }
+
+    public int intValue() {
+        return m_value;
+    }
+
+    public long longValue() {
+        return m_value;
+    }
+
+    public float floatValue() {
+        return m_value;
+    }
+
+    public double doubleValue() {
+        return m_value;
+    }
+
+    /**
+     * For ParmType interface
+     */
+    public void add(final int i, final PreparedStatement stat) throws SQLException {
+        stat.setInt(i, m_value);
+    }
+
+    public int getType() {
+        return Types.INTEGER;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinder.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinder.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinder.java
new file mode 100644
index 0000000..37cb9fb
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinder.java
@@ -0,0 +1,22 @@
+/*
+ * 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.arquillian.tests.bmp.remote;
+
+import javax.ejb.EJBObject;
+
+public interface LittleFinder extends EJBObject {
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinderBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinderBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinderBean.java
new file mode 100644
index 0000000..0635f85
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinderBean.java
@@ -0,0 +1,55 @@
+/*
+ * 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.arquillian.tests.bmp.remote;
+
+import javax.ejb.EntityBean;
+import javax.ejb.EntityContext;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Collection;
+
+public class LittleFinderBean implements EntityBean {
+    private static final long serialVersionUID = -1719910497840449494L;
+
+    public void ejbActivate() throws RemoteException {
+    }
+
+    public void ejbPassivate() throws RemoteException {
+    }
+
+    public void setEntityContext(final EntityContext context) throws RemoteException {
+    }
+
+    public void unsetEntityContext() throws RemoteException {
+    }
+
+    public void ejbLoad() throws RemoteException {
+    }
+
+    public void ejbStore() throws RemoteException {
+    }
+
+    public void ejbRemove() throws RemoteException {
+    }
+
+    public Collection<LittleFinderPK> ejbFindAll() throws Exception {
+        final ArrayList<LittleFinderPK> pks = new ArrayList();
+        pks.add(new LittleFinderPK("1A"));
+        return pks;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinderHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinderHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinderHome.java
new file mode 100644
index 0000000..1f9b1a7
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinderHome.java
@@ -0,0 +1,25 @@
+/*
+ * 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.arquillian.tests.bmp.remote;
+
+import javax.ejb.EJBHome;
+import java.rmi.RemoteException;
+import java.util.Collection;
+
+public interface LittleFinderHome extends EJBHome {
+    Collection<LittleFinder> findAll() throws Exception, RemoteException;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinderPK.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinderPK.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinderPK.java
new file mode 100644
index 0000000..36185fe
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/LittleFinderPK.java
@@ -0,0 +1,25 @@
+/*
+ * 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.arquillian.tests.bmp.remote;
+
+public class LittleFinderPK extends StringPK {
+    private static final long serialVersionUID = 5782590322327281948L;
+
+    public LittleFinderPK(final String s) {
+        super(s);
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/StringPK.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/StringPK.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/StringPK.java
new file mode 100644
index 0000000..2986f84
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/StringPK.java
@@ -0,0 +1,71 @@
+/*
+ * 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.arquillian.tests.bmp.remote;
+
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.sql.Types;
+
+/**
+ * A primary key in a Database table with a String representation (varchar).
+ */
+public class StringPK implements Serializable {
+    private static final long serialVersionUID = -6429314795121119701L;
+    private String m_value;
+
+    public StringPK(final String s) {
+        m_value = s;
+    }
+
+    public String getValue() {
+        return m_value;
+    }
+
+    public boolean equals(final Object o) {
+        if (o instanceof StringPK) {
+            final StringPK s = (StringPK) o;
+            if (m_value == null)
+                return s.m_value == null;
+            return m_value.equals(s.m_value);
+        } else {
+            return false;
+        }
+    }
+
+    public int compareTo(final Object o) {
+        return ("" + m_value).compareTo(((StringPK) o).m_value);
+    }
+
+    public int hashCode() {
+        return ("" + m_value).hashCode();
+    }
+
+    public String toString() {
+        if (m_value == null)
+            return "NULL";
+        return '\'' + m_value + '\'';
+    }
+
+    public void add(final int i, final PreparedStatement stat) throws SQLException {
+        stat.setString(i, m_value);
+    }
+
+    public int getType() {
+        return Types.VARCHAR;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/local/ejb-jar.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/local/ejb-jar.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/local/ejb-jar.xml
new file mode 100644
index 0000000..3d62471
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/local/ejb-jar.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+-->
+<ejb-jar>
+    <enterprise-beans>
+        <session>
+            <ejb-name>FinderTestHome</ejb-name>
+            <local-home>org.apache.openejb.arquillian.tests.bmp.local.FinderTestHome</local-home>
+            <local>org.apache.openejb.arquillian.tests.bmp.local.FinderTest</local>
+            <ejb-class>org.apache.openejb.arquillian.tests.bmp.local.FinderTestBean</ejb-class>
+            <session-type>Stateless</session-type>
+            <transaction-type>Container</transaction-type>
+            <ejb-local-ref>
+                <ejb-ref-name>ejb/LittleFinderHome</ejb-ref-name>
+                <ejb-ref-type>Entity</ejb-ref-type>
+                <local-home>org.apache.openejb.arquillian.tests.bmp.local.LittleFinderHome</local-home>
+                <local>org.apache.openejb.arquillian.tests.bmp.local.LittleFinder</local>
+                <ejb-link>LittleFinderHome</ejb-link>
+            </ejb-local-ref>
+            <ejb-local-ref>
+                <ejb-ref-name>ejb/BigFinderHome</ejb-ref-name>
+                <ejb-ref-type>Entity</ejb-ref-type>
+                <local-home>org.apache.openejb.arquillian.tests.bmp.local.BigFinderHome</local-home>
+                <local>org.apache.openejb.arquillian.tests.bmp.local.BigFinder</local>
+                <ejb-link>BigFinderHome</ejb-link>
+            </ejb-local-ref>
+        </session>
+        <entity>
+            <description>LittleFinder</description>
+            <ejb-name>LittleFinderHome</ejb-name>
+            <local-home>org.apache.openejb.arquillian.tests.bmp.local.LittleFinderHome</local-home>
+            <local>org.apache.openejb.arquillian.tests.bmp.local.LittleFinder</local>
+            <ejb-class>org.apache.openejb.arquillian.tests.bmp.local.LittleFinderBean</ejb-class>
+            <persistence-type>Bean</persistence-type>
+            <prim-key-class>org.apache.openejb.arquillian.tests.bmp.local.LittleFinderPK</prim-key-class>
+            <reentrant>False</reentrant>
+        </entity>
+        <entity>
+            <description>BigFinder</description>
+            <ejb-name>BigFinderHome</ejb-name>
+            <local-home>org.apache.openejb.arquillian.tests.bmp.local.BigFinderHome</local-home>
+            <local>org.apache.openejb.arquillian.tests.bmp.local.BigFinder</local>
+            <ejb-class>org.apache.openejb.arquillian.tests.bmp.local.BigFinderBean</ejb-class>
+            <persistence-type>Bean</persistence-type>
+            <prim-key-class>org.apache.openejb.arquillian.tests.bmp.local.BigFinderPK</prim-key-class>
+            <reentrant>False</reentrant>
+        </entity>
+    </enterprise-beans>
+</ejb-jar>
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/local/web.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/local/web.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/local/web.xml
new file mode 100644
index 0000000..9a50cc7
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/local/web.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+-->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+        http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         id="WebApp_ID" version="2.5">
+
+    <servlet>
+        <servlet-name>TestServlet</servlet-name>
+        <servlet-class>org.apache.openejb.arquillian.tests.bmp.local.FinderServlet</servlet-class>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>TestServlet</servlet-name>
+        <url-pattern>/</url-pattern>
+    </servlet-mapping>
+
+    <ejb-local-ref>
+        <ejb-ref-name>ejb/FinderTest</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local-home>org.apache.openejb.arquillian.tests.bmp.local.FinderTestHome</local-home>
+        <local>org.apache.openejb.arquillian.tests.bmp.local.FinderTest</local>
+    </ejb-local-ref>
+</web-app>

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/remote/ejb-jar.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/remote/ejb-jar.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/remote/ejb-jar.xml
new file mode 100644
index 0000000..5485dcb
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/remote/ejb-jar.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+-->
+<ejb-jar>
+    <enterprise-beans>
+        <session>
+            <ejb-name>FinderTestHome</ejb-name>
+            <home>org.apache.openejb.arquillian.tests.bmp.remote.FinderTestHome</home>
+            <remote>org.apache.openejb.arquillian.tests.bmp.remote.FinderTest</remote>
+            <ejb-class>org.apache.openejb.arquillian.tests.bmp.remote.FinderTestBean</ejb-class>
+            <session-type>Stateless</session-type>
+            <transaction-type>Container</transaction-type>
+            <ejb-ref>
+                <ejb-ref-name>ejb/LittleFinderHome</ejb-ref-name>
+                <ejb-ref-type>Entity</ejb-ref-type>
+                <home>org.apache.openejb.arquillian.tests.bmp.remote.LittleFinderHome</home>
+                <remote>org.apache.openejb.arquillian.tests.bmp.remote.LittleFinder</remote>
+                <ejb-link>LittleFinderHome</ejb-link>
+            </ejb-ref>
+            <ejb-ref>
+                <ejb-ref-name>ejb/BigFinderHome</ejb-ref-name>
+                <ejb-ref-type>Entity</ejb-ref-type>
+                <home>org.apache.openejb.arquillian.tests.bmp.remote.BigFinderHome</home>
+                <remote>org.apache.openejb.arquillian.tests.bmp.remote.BigFinder</remote>
+                <ejb-link>BigFinderHome</ejb-link>
+            </ejb-ref>
+        </session>
+        <entity>
+            <description>LittleFinder</description>
+            <ejb-name>LittleFinderHome</ejb-name>
+            <home>org.apache.openejb.arquillian.tests.bmp.remote.LittleFinderHome</home>
+            <remote>org.apache.openejb.arquillian.tests.bmp.remote.LittleFinder</remote>
+            <ejb-class>org.apache.openejb.arquillian.tests.bmp.remote.LittleFinderBean</ejb-class>
+            <persistence-type>Bean</persistence-type>
+            <prim-key-class>org.apache.openejb.arquillian.tests.bmp.remote.LittleFinderPK</prim-key-class>
+            <reentrant>False</reentrant>
+        </entity>
+        <entity>
+            <description>BigFinder</description>
+            <ejb-name>BigFinderHome</ejb-name>
+            <home>org.apache.openejb.arquillian.tests.bmp.remote.BigFinderHome</home>
+            <remote>org.apache.openejb.arquillian.tests.bmp.remote.BigFinder</remote>
+            <ejb-class>org.apache.openejb.arquillian.tests.bmp.remote.BigFinderBean</ejb-class>
+            <persistence-type>Bean</persistence-type>
+            <prim-key-class>org.apache.openejb.arquillian.tests.bmp.remote.BigFinderPK</prim-key-class>
+            <reentrant>False</reentrant>
+        </entity>
+    </enterprise-beans>
+</ejb-jar>
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/5fa2b74d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/remote/web.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/remote/web.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/remote/web.xml
new file mode 100644
index 0000000..7d52703
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/bmp/remote/web.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+-->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+        http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         id="WebApp_ID" version="2.5">
+
+    <servlet>
+        <servlet-name>TestServlet</servlet-name>
+        <servlet-class>org.apache.openejb.arquillian.tests.bmp.remote.FinderServlet</servlet-class>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>TestServlet</servlet-name>
+        <url-pattern>/</url-pattern>
+    </servlet-mapping>
+
+    <ejb-ref>
+        <ejb-ref-name>ejb/FinderTest</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <home>org.apache.openejb.arquillian.tests.bmp.remote.FinderTestHome</home>
+        <remote>org.apache.openejb.arquillian.tests.bmp.remote.FinderTest</remote>
+    </ejb-ref>
+</web-app>


Mime
View raw message