You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jg...@apache.org on 2018/12/06 17:33:23 UTC

[01/24] tomee git commit: TOMEE-2295 test for element being ignored

Repository: tomee
Updated Branches:
  refs/heads/master 1436a3687 -> c1f9d1976


TOMEE-2295 test for <mapping-file> element being ignored


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

Branch: refs/heads/master
Commit: 9c585b0cf133219f0039864516dcdc828d3b609c
Parents: 354b14a
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Wed Nov 28 11:51:18 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Wed Nov 28 11:51:18 2018 +0000

----------------------------------------------------------------------
 .../src/main/resources/test-orm.xml             | 32 +++++++
 .../openejb/core/LegacyInterfaceTest.java       | 89 ++++++++++++++++++++
 2 files changed, 121 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/9c585b0c/container/openejb-core/src/main/resources/test-orm.xml
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/resources/test-orm.xml b/container/openejb-core/src/main/resources/test-orm.xml
new file mode 100644
index 0000000..0646b30
--- /dev/null
+++ b/container/openejb-core/src/main/resources/test-orm.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" version="1.0">
+    <entity class="openejb.org.apache.openejb.core.MyCmpBean" name="MyCmpBean">
+        <description>MyCmpBean</description>
+        <named-query name="MyCmpBean.findByPrimaryKey(java.lang.Integer)">
+            <query>SELECT OBJECT(DL) FROM License DL</query>
+        </named-query>
+        <attributes>
+            <id name="id"/>
+            <basic name="name">
+                <column name="wNAME" length="300"/>
+            </basic>
+        </attributes>
+    </entity>
+</entity-mappings>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/9c585b0c/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java
index f450f2c..0b4b73f 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java
@@ -36,6 +36,9 @@ import org.apache.openejb.jee.QueryMethod;
 import org.apache.openejb.jee.SingletonBean;
 import org.apache.openejb.jee.TransAttribute;
 import org.apache.openejb.jee.jpa.*;
+import org.apache.openejb.jee.jpa.unit.Persistence;
+import org.apache.openejb.jee.jpa.unit.PersistenceUnit;
+import org.apache.openejb.jee.jpa.unit.TransactionType;
 import org.junit.AfterClass;
 
 import javax.ejb.CreateException;
@@ -216,6 +219,92 @@ public class LegacyInterfaceTest extends TestCase {
         assertEquals("wNAME", basicList.get(0).getColumn().getName());
     }
 
+    public void testCustomCmpMappingsWithMappingFileDefinedInPersistenceXml() throws Exception {
+
+        System.setProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY, InitContextFactory.class.getName());
+
+        final ConfigurationFactory config = new ConfigurationFactory();
+        final Assembler assembler = new Assembler();
+
+        assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
+        assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
+
+        final EjbJar ejbJar = new EjbJar();
+        ejbJar.addEnterpriseBean(new SingletonBean(MySingletonBean.class));
+        ejbJar.addEnterpriseBean(new EntityBean(MyBmpBean.class, PersistenceType.BEAN));
+
+        final EntityBean cmp = ejbJar.addEnterpriseBean(new EntityBean(MyCmpBean.class, PersistenceType.CONTAINER));
+        cmp.setPrimKeyClass(Integer.class.getName());
+        cmp.setPrimkeyField("id");
+        cmp.getCmpField().add(new CmpField("id"));
+        cmp.getCmpField().add(new CmpField("name"));
+        final Query query = new Query();
+        query.setQueryMethod(new QueryMethod("findByPrimaryKey", Integer.class.getName()));
+        query.setEjbQl("SELECT OBJECT(DL) FROM License DL");
+        cmp.getQuery().add(query);
+        final List<ContainerTransaction> transactions = ejbJar.getAssemblyDescriptor().getContainerTransaction();
+
+        transactions.add(new ContainerTransaction(TransAttribute.SUPPORTS, null, "MyBmpBean", "*"));
+        transactions.add(new ContainerTransaction(TransAttribute.SUPPORTS, null, "MyCmpBean", "*"));
+        transactions.add(new ContainerTransaction(TransAttribute.SUPPORTS, null, "MySingletonBean", "*"));
+
+        final File f = new File("test").getAbsoluteFile();
+        if (!f.exists() && !f.mkdirs()) {
+            throw new Exception("Failed to create test directory: " + f);
+        }
+
+        final EntityMappings entityMappings = new EntityMappings();
+
+        final Entity entity = new Entity();
+        entity.setClazz("openejb.org.apache.openejb.core.MyCmpBean");
+        entity.setName("MyCmpBean");
+        entity.setDescription("MyCmpBean");
+        entity.setAttributes(new Attributes());
+
+        final NamedQuery namedQuery = new NamedQuery();
+        namedQuery.setQuery("SELECT OBJECT(DL) FROM License DL");
+        entity.getNamedQuery().add(namedQuery);
+
+        final Id id = new Id();
+        id.setName("id");
+        entity.getAttributes().getId().add(id);
+
+        final Basic basic = new Basic();
+        basic.setName("name");
+        final Column column = new Column();
+        column.setName("wNAME");
+        column.setLength(300);
+        basic.setColumn(column);
+        entity.getAttributes().getBasic().add(basic);
+
+        entityMappings.getEntity().add(entity);
+
+        final AppModule module = new AppModule(this.getClass().getClassLoader(), f.getAbsolutePath());
+        final EjbModule ejbModule = new EjbModule(ejbJar);
+
+
+        Persistence persistence = new Persistence();
+        PersistenceUnit pu = persistence.addPersistenceUnit("cmp");
+        pu.setTransactionType(TransactionType.JTA);
+        pu.setJtaDataSource("fake");
+        pu.setNonJtaDataSource("fake");
+        pu.getMappingFile().add("test-orm.xml");
+        pu.addClass("openejb.org.apache.openejb.core.MyCmpBean");
+        module.addPersistenceModule(new PersistenceModule("pu", persistence));
+
+        module.getEjbModules().add(ejbModule);
+
+        assertNull(module.getCmpMappings());
+        assembler.createApplication(config.configureApplication(module));
+        assertNotNull(module.getCmpMappings());
+        assertEquals(1, pu.getClazz().size());
+        assertEquals("openejb.org.apache.openejb.core.MyCmpBean", pu.getClazz().get(0));
+        final List<Basic> basicList = module.getCmpMappings().getEntityMap().get("openejb.org.apache.openejb.core.MyCmpBean").getAttributes().getBasic();
+        assertEquals(1, basicList.size());
+        assertEquals(300, basicList.get(0).getColumn().getLength().intValue());
+        assertEquals("wNAME", basicList.get(0).getColumn().getName());
+    }
+
     @LocalHome(MyLocalHome.class)
     @RemoteHome(MyRemoteHome.class)
     public static abstract class MyCmpBean implements javax.ejb.EntityBean {


[18/24] tomee git commit: Merge remote-tracking branch 'upstream/master' into cmp-jpa

Posted by jg...@apache.org.
Merge remote-tracking branch 'upstream/master' into cmp-jpa


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

Branch: refs/heads/master
Commit: 7b8e4fa1ebb17f8907833065533a71f87f26b0b0
Parents: ff6639e 4b760d3
Author: Jonathan Gallimore <jg...@tomitribe.com>
Authored: Wed Dec 5 12:43:56 2018 +0000
Committer: Jonathan Gallimore <jg...@tomitribe.com>
Committed: Wed Dec 5 12:43:56 2018 +0000

----------------------------------------------------------------------
 .../java/org/apache/openejb/cli/Bootstrap.java  |   3 -
 examples/mp-metrics-counted/README.md           |   9 +-
 .../apache/openejb/server/axis/AxisService.java |   8 +-
 .../openejb/server/axis/AxisWsContainer.java    |  17 +-
 .../openejb/server/axis/EjbRpcProvider.java     |  22 +-
 .../openejb/server/axis/PojoProvider.java       |  21 ++
 .../server/axis/ReadOnlyServiceDesc.java        | 208 +++++++++++++++++++
 .../assembler/CommonsSchemaInfoBuilder.java     |  14 +-
 .../axis/assembler/CommonsSchemaLoader.java     |  11 +-
 .../HeavyweightOperationInfoBuilder.java        | 112 +++++-----
 .../assembler/HeavyweightTypeInfoBuilder.java   |  26 +--
 .../server/axis/assembler/JaxRpcFaultInfo.java  |   2 +-
 .../axis/assembler/JaxRpcOperationInfo.java     |   4 +-
 .../axis/assembler/JaxRpcServiceInfo.java       |   4 +-
 .../assembler/JaxRpcServiceInfoBuilder.java     |   2 +-
 .../server/axis/assembler/JaxRpcTypeInfo.java   |   2 +-
 .../assembler/LightweightTypeInfoBuilder.java   |   4 +-
 .../server/axis/assembler/XmlSchemaInfo.java    |   4 +-
 .../server/axis/assembler/XmlTypeInfo.java      |   4 +-
 .../server/axis/client/ArrayTypeInfo.java       |  10 +
 .../server/axis/client/AxisClientImpl.java      |   6 +
 .../axis/client/AxisServiceReference.java       |   6 +
 .../client/GenericServiceEndpointWrapper.java   |   3 +
 .../axis/client/NoOverrideCallbackFilter.java   |   8 +
 .../ServiceEndpointMethodInterceptor.java       |  10 +
 .../axis/client/ServiceMethodInterceptor.java   |  10 +
 .../server/cli/command/ClassLoaderCommand.java  |   2 +-
 .../server/cli/command/DeployedAppCommand.java  |   2 +-
 .../org/apache/openejb/daemon/NTService.java    |   9 +-
 .../openejb/server/ejbd/AuthRequestHandler.java |  14 +-
 .../apache/openejb/server/ejbd/CallContext.java |  10 +-
 .../server/ejbd/ClientObjectFactory.java        |   6 +-
 .../apache/openejb/server/ejbd/EjbDaemon.java   |  28 +--
 .../openejb/server/ejbd/EjbRequestHandler.java  |  38 ++--
 .../openejb/server/ejbd/JndiRequestHandler.java |  22 +-
 .../openejb/server/ejbd/KeepAliveServer.java    |  14 +-
 .../server/ejbd/LogoutRequestHandler.java       |  15 +-
 .../openejb/server/ejbd/ServerSideResolver.java |   4 +-
 .../openejb/server/discovery/EchoNet.java       |   2 +-
 .../discovery/MulticastDiscoveryAgent.java      |  10 +-
 .../server/discovery/MulticastPulseAgent.java   |  46 ++--
 .../discovery/MultipointDiscoveryAgent.java     |  12 +-
 .../server/discovery/MultipointServer.java      |  16 +-
 .../openejb/server/discovery/Tracker.java       |  10 +-
 .../apache/openejb/server/DiscoveryAgent.java   |   2 +
 .../openejb/server/DiscoveryListener.java       |   1 -
 .../openejb/server/DiscoveryRegistry.java       |  14 +-
 .../openejb/server/FilteredServiceManager.java  |   2 +-
 .../java/org/apache/openejb/server/Main.java    |   1 -
 .../openejb/server/ServiceAccessController.java |   4 +-
 .../apache/openejb/server/ServiceDaemon.java    |  18 +-
 .../apache/openejb/server/ServiceManager.java   |   2 +-
 .../java/org/apache/openejb/server/Start.java   |   2 +-
 .../org/apache/openejb/server/admin/Stop.java   |   6 +-
 .../server/auth/ExactIPAddressPermission.java   |   1 +
 .../server/auth/ExactIPv6AddressPermission.java |   1 +
 .../auth/FactorizedIPAddressPermission.java     |   1 +
 .../server/auth/IPAddressPermissionEditor.java  |   2 +
 .../server/auth/NetmaskIPAddressPermission.java |   1 +
 .../auth/NetmaskIPv6AddressPermission.java      |   1 +
 .../server/auth/PermitAllPermission.java        |   1 +
 .../auth/StartWithIPAddressPermission.java      |   1 +
 .../apache/openejb/server/osgi/Activator.java   |   2 +
 .../server/osgi/ServiceManagerExtender.java     |   6 +-
 .../server/stream/CountingOutputStream.java     |   2 +
 .../LightWeightMappingValidator.java            |  12 +-
 .../openejb/server/webservices/WsService.java   |  71 +++----
 .../openejb/server/webservices/WsServlet.java   |  27 ++-
 .../openejb/server/webservices/WsdlVisitor.java |   4 +-
 .../webservices/saaj/MessageFactoryImpl.java    |   2 +
 .../webservices/saaj/SaajFactoryFinder.java     |  10 +-
 .../webservices/saaj/SaajMetaFactoryImpl.java   |   2 +
 .../server/webservices/saaj/SaajUniverse.java   |   8 +-
 .../saaj/SoapConnectionFactoryImpl.java         |   1 +
 .../webservices/saaj/SoapFactoryImpl.java       |   8 +
 .../org/apache/tomee/common/NamingUtil.java     |  12 +-
 .../org/apache/tomee/installer/Installer.java   |  18 +-
 77 files changed, 708 insertions(+), 328 deletions(-)
----------------------------------------------------------------------



[11/24] tomee git commit: Merge remote-tracking branch 'apache/master' into cmp-jpa

Posted by jg...@apache.org.
Merge remote-tracking branch 'apache/master' into cmp-jpa


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

Branch: refs/heads/master
Commit: d878bf09f0eea13e61e113a37d1d0e9ce6b83c7a
Parents: 86aec7f 7ff618f
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Tue Dec 4 09:53:00 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Tue Dec 4 09:53:00 2018 +0000

----------------------------------------------------------------------
 .../java/org/apache/openejb/AppContext.java     |   8 +-
 .../java/org/apache/openejb/BeanContext.java    |  76 ++++++-------
 .../org/apache/openejb/ClassLoaderUtil.java     |   8 +-
 .../org/apache/openejb/DeploymentContext.java   |   2 +-
 .../org/apache/openejb/InjectionProcessor.java  |   4 +-
 .../java/org/apache/openejb/MethodContext.java  |   6 +-
 .../org/apache/openejb/OpenEjbContainer.java    |   4 +-
 .../org/apache/openejb/UndeployException.java   |   2 +-
 .../openejb/assembler/classic/Assembler.java    |  62 +++++------
 .../assembler/classic/ClassListInfo.java        |   2 +-
 .../openejb/assembler/classic/ClientInfo.java   |  10 +-
 .../assembler/classic/CmpJarBuilder.java        |   2 +-
 .../assembler/classic/ConnectorInfo.java        |  12 +--
 .../assembler/classic/ContainerSystemInfo.java  |   6 +-
 .../classic/DelegatePermissionCollection.java   |   4 +-
 .../assembler/classic/DeployTimeEnhancer.java   |  10 +-
 .../assembler/classic/EjbJarBuilder.java        |   2 +-
 .../openejb/assembler/classic/EjbJarInfo.java   |  24 ++---
 .../openejb/assembler/classic/EjbResolver.java  |   8 +-
 .../classic/EnterpriseBeanBuilder.java          |  10 +-
 .../assembler/classic/EnterpriseBeanInfo.java   |  28 ++---
 .../assembler/classic/EntityBeanInfo.java       |   6 +-
 .../classic/EntityManagerFactoryCallable.java   |   2 +-
 .../assembler/classic/FacilitiesInfo.java       |  10 +-
 .../assembler/classic/HandlerChainInfo.java     |   4 +-
 .../openejb/assembler/classic/HandlerInfo.java  |   4 +-
 .../assembler/classic/InjectableInfo.java       |   2 +-
 .../assembler/classic/InjectionBuilder.java     |   2 +-
 .../classic/InterceptorBindingBuilder.java      |  18 ++--
 .../classic/InterceptorBindingInfo.java         |   4 +-
 .../assembler/classic/InterceptorInfo.java      |  18 ++--
 .../classic/JaccPermissionsBuilder.java         |   4 +-
 .../openejb/assembler/classic/JndiBuilder.java  |  18 ++--
 .../assembler/classic/JndiEncBuilder.java       |   4 +-
 .../openejb/assembler/classic/JndiEncInfo.java  |  16 +--
 .../assembler/classic/ManagedBeanInfo.java      |   6 +-
 .../classic/MessageDrivenBeanInfo.java          |   2 +-
 .../assembler/classic/MethodAttributeInfo.java  |   2 +-
 .../classic/MethodConcurrencyBuilder.java       |   4 +-
 .../assembler/classic/MethodInfoUtil.java       |  31 +++---
 .../assembler/classic/MethodPermissionInfo.java |   2 +-
 .../assembler/classic/MethodScheduleInfo.java   |   2 +-
 .../classic/MethodTransactionBuilder.java       |   2 +-
 .../assembler/classic/PersistenceUnitInfo.java  |   8 +-
 .../assembler/classic/PolicyContext.java        |   2 +-
 .../openejb/assembler/classic/PortInfo.java     |   2 +-
 .../classic/ProxyInterfaceResolver.java         |   8 +-
 .../openejb/assembler/classic/ServiceInfo.java  |   2 +-
 .../assembler/classic/ServiceReferenceInfo.java |   4 +-
 .../openejb/assembler/classic/ServletInfo.java  |   4 +-
 .../assembler/classic/StatefulBeanInfo.java     |  14 +--
 .../assembler/classic/ValidatorBuilder.java     |   2 +-
 .../openejb/assembler/classic/WsBuilder.java    |   4 +-
 .../assembler/classic/util/ServiceInfos.java    |   2 +-
 .../apache/openejb/async/AsynchronousPool.java  |   2 +-
 .../org/apache/openejb/bval/ValidatorUtil.java  |   2 +-
 .../org/apache/openejb/cdi/CdiBeanInfo.java     |  50 ++++-----
 .../java/org/apache/openejb/cdi/CdiEjbBean.java |  12 +--
 .../java/org/apache/openejb/cdi/CdiPlugin.java  |  16 +--
 .../cdi/CdiResourceInjectionService.java        |   2 +-
 .../openejb/cdi/ConstructorInjectionBean.java   |   2 +-
 .../openejb/cdi/CurrentCreationalContext.java   |   2 +-
 .../apache/openejb/cdi/OpenEJBBeanBuilder.java  |   2 +-
 .../openejb/cdi/OptimizedLoaderService.java     |   2 +-
 .../CompositeClassLoaderConfigurer.java         |   2 +-
 .../ProvisioningClassLoaderConfigurer.java      |   4 +-
 .../java/org/apache/openejb/cli/MainImpl.java   |   2 +-
 .../openejb/component/ClassLoaderEnricher.java  |   2 +-
 .../openejb/config/AnnotationDeployer.java      |  72 ++++++-------
 .../config/AppContextConfigDeployer.java        |   2 +-
 .../apache/openejb/config/AppInfoBuilder.java   |  10 +-
 .../org/apache/openejb/config/AppModule.java    |  34 +++---
 .../org/apache/openejb/config/AppValidator.java |   2 +-
 .../org/apache/openejb/config/AutoConfig.java   |  44 ++++----
 .../org/apache/openejb/config/AutoDeployer.java |   8 +-
 .../openejb/config/BaseConvertDefinitions.java  |   2 +-
 .../apache/openejb/config/BeanProperties.java   |   2 +-
 .../apache/openejb/config/CleanEnvEntries.java  |   2 +-
 .../openejb/config/ClearEmptyMappedName.java    |   2 +-
 .../org/apache/openejb/config/ClientModule.java |   6 +-
 .../apache/openejb/config/CmpJpaConversion.java |  18 ++--
 .../config/ConfigurableClasspathArchive.java    |   4 +-
 .../openejb/config/ConfigurationFactory.java    |  26 ++---
 .../apache/openejb/config/ConnectorModule.java  |   4 +-
 .../apache/openejb/config/ContainerUtils.java   |   2 +-
 .../config/ConvertDataSourceDefinitions.java    |   4 +-
 .../openejb/config/DebuggableVmHackery.java     |   4 +-
 .../apache/openejb/config/DeploymentLoader.java |  68 ++++++------
 .../apache/openejb/config/DeploymentModule.java |   2 +-
 .../openejb/config/DeploymentsResolver.java     |   4 +-
 .../config/EnvEntriesPropertiesDeployer.java    |   2 +-
 .../apache/openejb/config/FinderFactory.java    |   6 +-
 .../openejb/config/GeneratedClientModules.java  |   2 +-
 .../openejb/config/InitEjbDeployments.java      |   6 +-
 .../openejb/config/JndiEncInfoBuilder.java      |   6 +-
 .../apache/openejb/config/LinkBuiltInTypes.java |   4 +-
 .../apache/openejb/config/MBeanDeployer.java    |   4 +-
 .../java/org/apache/openejb/config/Module.java  |   4 +-
 .../apache/openejb/config/NewLoaderLogic.java   |  12 +--
 .../config/OpenEJBDeploymentManager.java        |  12 +--
 .../openejb/config/OpenEjb2Conversion.java      |  10 +-
 .../config/PersistenceContextAnnFactory.java    |   8 +-
 .../openejb/config/PersistenceModule.java       |   2 +-
 .../config/PersistenceUnitLinkResolver.java     |   2 +-
 .../openejb/config/QuickServerXmlParser.java    |   2 +-
 .../org/apache/openejb/config/RemoteServer.java |   6 +-
 .../openejb/config/RemoveWebServices.java       |   2 +-
 .../org/apache/openejb/config/ScanUtil.java     |   4 +-
 .../org/apache/openejb/config/ServiceUtils.java |   2 +-
 .../apache/openejb/config/SunConversion.java    |  36 +++----
 .../org/apache/openejb/config/TldScanner.java   |  12 +--
 .../openejb/config/ValidationContext.java       |   6 +-
 .../openejb/config/VmDeploymentManager.java     |  10 +-
 .../org/apache/openejb/config/WebModule.java    |  20 ++--
 .../openejb/config/WebappAggregatedArchive.java |   2 +-
 .../org/apache/openejb/config/WsDeployer.java   |   6 +-
 .../config/provider/ProviderManager.java        |  16 +--
 .../config/provider/ServiceJarXmlLoader.java    |   6 +-
 .../config/rules/CheckAssemblyBindings.java     |   6 +-
 .../openejb/config/rules/CheckAsynchronous.java |   2 +-
 .../openejb/config/rules/CheckCallbacks.java    |   2 +-
 .../openejb/config/rules/CheckClassLoading.java |   8 +-
 .../openejb/config/rules/CheckDependsOn.java    |   8 +-
 .../config/rules/CheckDescriptorLocation.java   |   4 +-
 .../config/rules/CheckInjectionTargets.java     |   2 +-
 .../openejb/config/rules/CheckMethods.java      |   8 +-
 .../config/rules/CheckRestMethodArePublic.java  |   4 +-
 .../apache/openejb/config/sys/JaxbOpenejb.java  |   2 +-
 .../apache/openejb/config/sys/ListAdapter.java  |   2 +-
 .../org/apache/openejb/config/sys/Openejb.java  |   2 +-
 .../apache/openejb/config/sys/Resources.java    |  10 +-
 .../openejb/config/sys/SaxAppCtxConfig.java     |   6 +-
 .../apache/openejb/config/sys/SaxOpenejb.java   |   2 +-
 .../openejb/config/sys/ServiceProvider.java     |   2 +-
 .../apache/openejb/config/sys/ServicesJar.java  |   2 +-
 .../openejb/config/sys/WikiGenerator.java       |   4 +-
 .../openejb/config/typed/util/ObjectMap.java    |   4 +-
 .../config/typed/util/ProviderGenerator.java    |   4 +-
 .../apache/openejb/core/BaseSessionContext.java |  10 +-
 .../openejb/core/CoreContainerSystem.java       |  12 +--
 ...impleTransactionSynchronizationRegistry.java |   4 +-
 .../org/apache/openejb/core/ThreadContext.java  |   2 +-
 .../org/apache/openejb/core/WebContext.java     |   4 +-
 .../apache/openejb/core/cmp/CmpContainer.java   |  12 +--
 .../openejb/core/cmp/ComplexKeyGenerator.java   |   2 +-
 .../openejb/core/cmp/cmp2/Cmp2Generator.java    |   8 +-
 .../apache/openejb/core/cmp/cmp2/CmrSet.java    |   2 +-
 .../openejb/core/cmp/cmp2/SetValuedCmr.java     |   2 +-
 .../openejb/core/cmp/jpa/JpaCmpEngine.java      |   2 +-
 .../openejb/core/entity/EntityContainer.java    |   6 +-
 .../openejb/core/entity/EntityContext.java      |   4 +-
 .../core/entity/EntityInstanceManager.java      |   2 +-
 .../openejb/core/entity/EntrancyTracker.java    |   4 +-
 .../core/interceptor/InterceptorData.java       |  20 ++--
 .../core/interceptor/InterceptorStack.java      |   2 +-
 .../ReflectionInvocationContext.java            |   2 +-
 .../openejb/core/ivm/BaseEjbProxyHandler.java   |  10 +-
 .../openejb/core/ivm/EjbHomeProxyHandler.java   |   6 +-
 .../openejb/core/ivm/EjbObjectProxyHandler.java |   2 +-
 .../openejb/core/ivm/IntraVmArtifact.java       |   2 +-
 .../ivm/naming/AbstractThreadLocalProxy.java    |   2 +-
 .../ivm/naming/ContextualJndiReference.java     |   4 +-
 .../openejb/core/ivm/naming/IvmContext.java     |   6 +-
 .../core/ivm/naming/JaxWsServiceReference.java  |   8 +-
 .../apache/openejb/core/managed/Instance.java   |   4 +-
 .../openejb/core/managed/ManagedContainer.java  |  18 ++--
 .../openejb/core/managed/SimpleCache.java       |   8 +-
 .../openejb/core/mdb/EndpointFactory.java       |   2 +-
 .../apache/openejb/core/mdb/MdbContainer.java   |   4 +-
 .../openejb/core/mdb/MdbInstanceManager.java    |   6 +-
 .../openejb/core/mdb/MdbPoolContainer.java      |   4 +-
 .../core/security/AbstractSecurityService.java  |   6 +-
 .../core/security/jaas/SQLLoginModule.java      |   6 +-
 .../core/security/jaas/ScriptLoginModule.java   |   4 +-
 .../jaas/ServiceProviderLoginModule.java        |   4 +-
 .../core/security/jacc/BasicJaccProvider.java   |   2 +-
 .../security/jacc/BasicPolicyConfiguration.java |   2 +-
 .../core/singleton/SingletonContainer.java      |  10 +-
 .../singleton/SingletonInstanceManager.java     |   6 +-
 .../apache/openejb/core/stateful/Instance.java  |   4 +-
 .../openejb/core/stateful/SimpleCache.java      |   8 +-
 .../core/stateful/StatefulContainer.java        |  14 +--
 .../core/stateless/StatelessContainer.java      |  10 +-
 .../stateless/StatelessInstanceManager.java     |   4 +-
 .../openejb/core/timer/EJBCronTrigger.java      |  16 +--
 .../openejb/core/timer/EjbTimerServiceImpl.java |   4 +-
 .../openejb/core/timer/MemoryTimerStore.java    |  18 ++--
 .../core/transaction/JtaTransactionPolicy.java  |   8 +-
 .../core/webservices/HandlerChainData.java      |   4 +-
 .../openejb/core/webservices/HandlerData.java   |   8 +-
 .../core/webservices/HandlerResolverImpl.java   |  16 +--
 .../webservices/PortAddressRegistryImpl.java    |  18 ++--
 .../openejb/core/webservices/PortData.java      |   4 +-
 .../openejb/core/webservices/PortRefData.java   |   2 +-
 .../core/webservices/ProviderWrapper.java       |   2 +-
 .../core/webservices/ServiceRefData.java        |   4 +-
 .../apache/openejb/dyni/DynamicSubclass.java    |   2 +-
 .../org/apache/openejb/log/ColorFormatter.java  |   2 +-
 .../apache/openejb/log/logger/Log4jLogger.java  |   2 +-
 .../apache/openejb/log/logger/Slf4jLogger.java  |   5 +-
 .../stat/descriptive/DescriptiveStatistics.java |   2 +-
 .../math/stat/descriptive/moment/Kurtosis.java  |   2 +-
 .../math/stat/descriptive/moment/Skewness.java  |   2 +-
 .../openejb/monitoring/DynamicMBeanWrapper.java |  12 +--
 .../apache/openejb/monitoring/ManagedMBean.java |  14 +--
 .../openejb/monitoring/ObjectNameBuilder.java   |   2 +-
 .../openejb/monitoring/StatsInterceptor.java    |   2 +-
 .../remote/RemoteResourceMonitor.java           |   4 +-
 .../openejb/persistence/JtaEntityManager.java   |   2 +-
 .../persistence/JtaEntityManagerRegistry.java   |   2 +-
 .../apache/openejb/persistence/JtaQuery.java    |   2 +-
 .../persistence/PersistenceBootstrap.java       |   8 +-
 .../persistence/PersistenceUnitInfoImpl.java    |   6 +-
 .../openejb/resource/AutoConnectionTracker.java |  10 +-
 .../resource/activemq/ActiveMQ5Factory.java     |   4 +-
 .../resource/jdbc/DataSourceFactory.java        |   2 +-
 .../resource/jdbc/driver/AlternativeDriver.java |   2 +-
 .../logging/LoggingPreparedSqlStatement.java    |   2 +-
 .../jdbc/pool/PoolDataSourceCreator.java        |   2 +-
 .../jdbc/pool/XADataSourceResource.java         |   2 +-
 .../resource/jdbc/router/FailOverRouter.java    |   2 +-
 .../resource/quartz/QuartzResourceAdapter.java  |   8 +-
 .../rest/AbstractRestThreadLocalProxy.java      |   2 +-
 ...MultivaluedMapWithCaseInsensitiveKeySet.java |   2 +-
 .../openejb/rest/ThreadLocalHttpHeaders.java    |   2 +-
 .../openejb/ri/sp/PseudoTransactionService.java |  14 +--
 .../java/org/apache/openejb/table/Lines.java    |   2 +-
 .../openejb/testing/ApplicationComposers.java   |  30 +++---
 .../openejb/testng/PropertiesBuilder.java       |   2 +-
 .../impl/ManagedExecutorServiceImpl.java        |   2 +-
 .../ManagedScheduledExecutorServiceImpl.java    |  12 +--
 .../apache/openejb/util/AnnotationFinder.java   |  10 +-
 .../apache/openejb/util/AsynchronousRunner.java |   2 +-
 .../java/org/apache/openejb/util/Classes.java   |   4 +-
 .../java/org/apache/openejb/util/Debug.java     |  14 +--
 .../apache/openejb/util/DirectoryMonitor.java   |   4 +-
 .../java/org/apache/openejb/util/Duration.java  |   2 +-
 .../apache/openejb/util/ExecutorBuilder.java    |   8 +-
 .../java/org/apache/openejb/util/Index.java     |  20 ++--
 .../openejb/util/IntrospectionSupport.java      |   4 +-
 .../main/java/org/apache/openejb/util/Join.java |   2 +-
 .../org/apache/openejb/util/LinkResolver.java   |   6 +-
 .../apache/openejb/util/ListConfigurator.java   |   2 +-
 .../openejb/util/Log4jLogStreamFactory.java     |   2 +-
 .../java/org/apache/openejb/util/Logger.java    |   2 +-
 .../java/org/apache/openejb/util/Memoizer.java  |   4 +-
 .../java/org/apache/openejb/util/Messages.java  |   2 +-
 .../apache/openejb/util/ObjectRecipeHelper.java |   2 +-
 .../apache/openejb/util/OpenEJBScripter.java    |   2 +-
 .../apache/openejb/util/PojoSerialization.java  |   2 +-
 .../main/java/org/apache/openejb/util/Pool.java |   2 +-
 .../apache/openejb/util/PropertiesHelper.java   |   2 +-
 .../org/apache/openejb/util/References.java     |  20 ++--
 .../apache/openejb/util/SimpleJSonParser.java   |   4 +-
 .../apache/openejb/util/SuperProperties.java    |  16 +--
 .../org/apache/openejb/util/URISupport.java     |   6 +-
 .../java/org/apache/openejb/util/UrlCache.java  |  10 +-
 .../org/apache/openejb/util/UrlComparator.java  |   2 +-
 .../openejb/util/proxy/Jdk13ProxyFactory.java   |   2 +-
 .../util/proxy/LocalBeanProxyFactory.java       |   4 +-
 .../org/apache/openejb/util/proxy/ProxyEJB.java |   2 +-
 .../apache/openejb/util/proxy/QueryProxy.java   |   6 +-
 .../openejb/web/LightweightWebAppBuilder.java   |  22 ++--
 .../openejb/DependenceValidationTest.java       |   2 +-
 .../org/apache/openejb/DependencyVisitor.java   |   8 +-
 .../apache/openejb/OpenEjbContainerTest.java    |   4 +-
 .../openejb/assembler/DeployerEjbTest.java      |   2 +-
 .../assembler/classic/AccessTimeoutTest.java    |   4 +-
 .../classic/AppNamingReadOnlyTest.java          |   4 +-
 .../classic/ConcurrentLockTypeTest.java         |   4 +-
 .../assembler/classic/ConcurrentMethodTest.java |   4 +-
 .../classic/DataSourceDefinitionTest.java       |   2 +-
 .../DescriptorDataSourceDefinitionTest.java     |   2 +-
 .../InterceptorBindingInfoComparatorTest.java   |  10 +-
 .../assembler/classic/JdbcConfigTest.java       |   4 +-
 .../assembler/classic/LinkResolverTest.java     |   2 +-
 .../MethodTransactionInfoComparatorTest.java    |   6 +-
 .../OpenEjbConfigurationValidationTest.java     |   2 +-
 .../classic/ResourceInfoComparatorTest.java     |   6 +-
 .../apache/openejb/cdi/BasicObserverTest.java   |   2 +-
 .../apache/openejb/cdi/DependentScopedTest.java |   2 +-
 .../openejb/config/AnnotationDeployerTest.java  |   2 +-
 .../config/ApplicationPropertiesTest.java       |  14 +--
 .../config/AutoConfigMdbContainerTest.java      |   2 +-
 .../config/AutoConfigResourceRefsTest.java      |   4 +-
 .../apache/openejb/config/AutoDeployerTest.java |   2 +-
 .../openejb/config/BeanPropertiesTest.java      |  12 +--
 .../openejb/config/BusinessInterfacesTest.java  |   8 +-
 .../config/CheckDescriptorLocationTest.java     |   6 +-
 ...escriptorLocationTestFileDeletionHelper.java |   2 +-
 .../openejb/config/CleanEnvEntriesTest.java     |   2 +-
 .../openejb/config/DeploymentLoaderTest.java    |   4 +-
 .../openejb/config/DeploymentsElementTest.java  |  16 +--
 .../openejb/config/EarModuleNamesTest.java      |  28 ++---
 .../apache/openejb/config/EarUnpackTest.java    |   4 +-
 .../apache/openejb/config/EjbModuleIdTest.java  |  14 +--
 .../openejb/config/JMXDataSourceTest.java       |   2 +-
 .../config/JndiEncInfoBuilderInsertTest.java    |  10 +-
 .../openejb/config/MBeanDeployerTest.java       |   2 +-
 .../openejb/config/ModulePropertiesTest.java    |  10 +-
 .../PersistenceContextAnnFactoryTest.java       |   2 +-
 .../openejb/config/ProviderManagerTest.java     |   4 +-
 .../openejb/config/ServiceClasspathTest.java    |   6 +-
 .../openejb/config/SunCmpConversionTest.java    |   2 +-
 .../apache/openejb/config/XmlOverridesTest.java |   2 +-
 ...CheckInvalidAsynchronousAnnotationsTest.java |   4 +-
 .../openejb/config/rules/InvokeMethod.java      |  10 +-
 .../config/rules/KeysAnnotationVisitor.java     |   4 +-
 .../config/rules/ValidationAssertions.java      |   2 +-
 .../config/rules/ValidationKeysAuditorTest.java |  18 ++--
 .../openejb/core/InheritedAppExceptionTest.java |   2 +-
 .../openejb/core/asynch/AsynchInRoleTest.java   |  14 +--
 .../apache/openejb/core/asynch/AsynchTest.java  |  14 +--
 .../apache/openejb/core/cmp/jpa/AuthorBean.java |   2 +-
 .../apache/openejb/core/cmp/jpa/BookBean.java   |   2 +-
 .../openejb/core/ivm/naming/IvmContextTest.java |   4 +-
 .../core/mdb/CustomMdbContainerTest.java        |   2 +-
 .../org/apache/openejb/core/mdb/JmsTest.java    |   4 +-
 .../org/apache/openejb/core/mdb/MdbInvoker.java |   4 +-
 .../org/apache/openejb/core/mdb/MdbProxy.java   |   2 +-
 .../org/apache/openejb/core/mdb/MdbTest.java    |   4 +-
 .../openejb/core/mdb/NoMessageDeliveryTest.java |   2 +-
 .../connector/impl/SampleManagedConnection.java |   2 +-
 .../connector/impl/SampleResourceAdapter.java   |   2 +-
 .../core/singleton/AsyncPostContructTest.java   |   6 +-
 .../stateful/EntityManagerPropogationTest.java  |   4 +-
 .../stateful/StatefulConcurrentLookupTest.java  |   2 +-
 .../core/stateful/StatefulContainerTest.java    |   2 +-
 .../StatefulSecurityPermissionsTest.java        |   2 +-
 .../core/stateless/StatelessPoolStatsTest.java  |  12 +--
 .../interceptors/FullyInterceptedBean.java      |   4 +-
 .../interceptors/FullyInterceptedTest.java      |   4 +-
 .../MethodLevelInterceptorOnlySLSBean.java      |   2 +-
 .../MethodLevelInterceptorOnlyTest.java         |   2 +-
 .../SecondStatelessInterceptedBean.java         |   2 +-
 .../SecondStatelessInterceptedTest.java         |   2 +-
 .../openejb/interceptors/ThirdSLSBean.java      |   4 +-
 .../openejb/interceptors/ThirdSLSBeanTest.java  |   4 +-
 .../org/apache/openejb/interceptors/Utils.java  |   2 +-
 .../java/org/apache/openejb/meta/MetaTest.java  |   4 +-
 .../persistence/JtaEntityManagerTest.java       |   2 +-
 .../resource/AutoConnectionTrackerTest.java     |   8 +-
 .../resource/jdbc/DynamicDataSourceTest.java    |   6 +-
 .../MultiThreadedManagedDataSourceTest.java     |   2 +-
 .../cmr/onetomany/ExampleABean_ABean.java       |   4 +-
 .../entity/cmr/onetoone/ExampleABean_ABean.java |   2 +-
 .../entity/cmr/onetoone/ExampleBBean_BBean.java |   2 +-
 .../TransactionRollbackCauseTest.java           |   2 +-
 .../java/org/apache/openejb/util/Archives.java  |   2 +-
 .../apache/openejb/util/DynamicEJBImplTest.java |   4 +-
 .../org/apache/openejb/util/OptionsTest.java    |   2 +-
 .../java/org/apache/openejb/util/PoolTest.java  |  18 ++--
 .../org/apache/openejb/util/PropertiesTest.java |   2 +-
 .../org/apache/openejb/util/ReferencesTest.java |  24 ++---
 .../openejb/util/SuperPropertiesTest.java       |   2 +-
 .../apache/openejb/util/UrlComparatorTest.java  |   2 +-
 .../org/apache/openejb/util/WebArchives.java    |   2 +-
 .../util/proxy/LocalBeanProxyFactoryTest.java   |   6 +-
 .../openejb/util/proxy/SampleLocalBean.java     |   2 +-
 .../openejb/jee/FacesConfigFlowDefinition.java  |   2 +-
 .../junit/context/OpenEjbTestContext.java       |   8 +-
 .../org/apache/openejb/junit/context/Util.java  |  11 +-
 docs/activemqresourceadapter-config.md          |   2 +-
 docs/common-datasource-configurations.md        |   2 +-
 docs/comparison.md                              |   2 +-
 docs/datasource-config.md                       |   2 +-
 docs/datasource-configuration-by-creator.md     |  10 +-
 docs/deploying-in-tomee.md                      |   2 +-
 docs/ejbd-transport.md                          |   2 +-
 ...-testing-with-openejb,-jetty-and-selenium.md |   2 +-
 docs/javamailsession-config.md                  |   2 +-
 docs/jpa-concepts.md                            |   2 +-
 docs/jpa-usage.md                               |   2 +-
 docs/openjpa.md                                 |   2 +-
 docs/orb-config.md                              |   2 +-
 docs/persistence-context.md                     |   2 +-
 docs/persistence-unit-ref.md                    |   2 +-
 docs/tomee-and-hibernate.md                     |   2 +-
 docs/tomee-and-intellij.md                      |   2 +-
 docs/tomee-directory-structure.md               |   2 +-
 docs/tomee-webapp.md                            |   2 +-
 examples/arquillian-jpa/pom.xml                 |   4 +-
 examples/java-modules/README.md                 |   7 ++
 examples/java-modules/pom.xml                   | 108 +++++++++++++++++++
 .../javamodules/rest/HelloResource.java         |  29 +++++
 .../javamodules/rest/HelloResourceTest.java     |  45 ++++++++
 .../src/test/resources/arquillian.xml           |  33 ++++++
 examples/mp-metrics-timed/README.md             |   4 +-
 examples/pom.xml                                |  16 +--
 examples/quartz-app/README.md                   |   6 +-
 examples/realm-in-tomee/README.md               |   6 +-
 .../README.md                                   |   6 +-
 .../openejb/test/SuperInterceptedBean.java      |   6 +-
 .../entity/bmp/BasicBmp2DataSourcesBean.java    |   4 +-
 .../openejb/test/entity/bmp/RmiIiopBmpBean.java |   1 -
 .../test/interceptor/ClassInterceptor.java      |  10 +-
 .../openejb/test/interceptor/DDInterceptor.java |  10 +-
 .../test/interceptor/MethodInterceptor.java     |   4 +-
 .../interceptor/SecondClassInterceptor.java     |  10 +-
 .../test/interceptor/SuperClassInterceptor.java |  10 +-
 .../test/singleton/BeanTxSingletonBean.java     |   1 -
 .../test/stateless/BeanTxStatelessBean.java     |   1 -
 .../org/apache/openejb/test/RiTestServer.java   |   1 -
 .../apache/openejb/server/DiscoveryAgent.java   |   4 +-
 .../apache/tomee/RemoteTomEEEJBContainer.java   |   6 +-
 .../catalina/OpenEJBNamingContextListener.java  |   4 +-
 .../tomee/catalina/OpenEJBNamingResource.java   |   4 +-
 .../tomee/catalina/TomEEWebappLoader.java       |   4 +-
 .../org/apache/tomee/catalina/TomcatLoader.java |  22 ++--
 .../jul/formatter/SimpleTomEEFormatter.java     |   6 +-
 .../jul/handler/rotating/LocalFileHandler.java  |   9 +-
 .../jul/formatter/SimpleTomEEFormatterTest.java |   6 +-
 .../org/apache/tomee/loader/LoaderServlet.java  |   4 +-
 .../apache/tomee/loader/OpenEJBListener.java    |   9 +-
 414 files changed, 1561 insertions(+), 1344 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/d878bf09/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
----------------------------------------------------------------------


[07/24] tomee git commit: Merge branch 'master' into cmp-jpa

Posted by jg...@apache.org.
Merge branch 'master' into cmp-jpa


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

Branch: refs/heads/master
Commit: 83a49c4254cf68c49fbb9231305dc71be5fa790d
Parents: 2469243 d5fcddc
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Fri Nov 30 23:37:30 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Fri Nov 30 23:37:30 2018 +0000

----------------------------------------------------------------------
 .../apache/openejb/config/DeploymentLoader.java |    2 +-
 docs/.DS_Store                                  |  Bin 0 -> 6148 bytes
 docs/Configuring-in-tomee.mdtext                |   41 +
 docs/activemqresourceadapter-config.mdtext      |   66 +
 docs/admin/.DS_Store                            |  Bin 0 -> 6148 bytes
 docs/admin/cluster/index.adoc                   |  227 +++
 docs/admin/configuration/application.adoc       |  100 ++
 docs/admin/configuration/containers.adoc        |  585 +++++++
 docs/admin/configuration/index.adoc             |   24 +
 docs/admin/configuration/resources.adoc         |  572 +++++++
 docs/admin/configuration/server.adoc            |   86 +
 docs/admin/file-layout.adoc                     |  144 ++
 docs/admin/index.adoc                           |    7 +
 docs/advanced/.DS_Store                         |  Bin 0 -> 6148 bytes
 docs/advanced/applicationcomposer/index.adoc    |   76 +
 docs/advanced/client/jndi.adoc                  |  116 ++
 docs/advanced/index.adoc                        |    7 +
 docs/advanced/jms/jms-configuration.adoc        |   67 +
 docs/advanced/setup/index.adoc                  |  142 ++
 docs/advanced/shading/index.adoc                |  276 ++++
 docs/advanced/tomee-embedded/index.adoc         |  223 +++
 docs/alternate-descriptors.mdtext               |  114 ++
 docs/annotations,-xml-and-defaults.mdtext       |  565 +++++++
 docs/app-clients-and-jndi.mdtext                |   69 +
 docs/application-composer/advanced.md           |   90 +
 docs/application-composer/getting-started.md    |  188 +++
 docs/application-composer/history.md            |   38 +
 docs/application-composer/index.md              |   18 +
 docs/application-deployment-solutions.mdtext    |   75 +
 ...plication-discovery-via-the-classpath.mdtext |   91 +
 docs/application-resources.mdtext               |  247 +++
 docs/arquillian-available-adapters.mdtext       |  262 +++
 docs/arquillian-getting-started.mdtext          |   20 +
 docs/basics---getting-things.mdtext             |  103 ++
 docs/basics---security.mdtext                   |   52 +
 docs/basics---transactions.mdtext               |   56 +
 docs/bmpentitycontainer-config.mdtext           |   35 +
 docs/bouncy-castle.mdtext                       |   31 +
 docs/built-in-type-converters.mdtext            |   91 +
 docs/callbacks.mdtext                           |  164 ++
 docs/changing-jms-implementations.mdtext        |  133 ++
 docs/client-server-transports.mdtext            |   19 +
 docs/clients.mdtext                             |  101 ++
 docs/cmpentitycontainer-config.mdtext           |   34 +
 docs/collapsed-ear.mdtext                       |   42 +
 docs/common-datasource-configurations.mdtext    |  111 ++
 docs/common-errors.mdtext                       |   27 +
 ...common-persistenceprovider-properties.mdtext |   44 +
 docs/comparison.mdtext                          |  219 +++
 docs/concepts.mdtext                            |   75 +
 docs/configuration.mdtext                       |  140 ++
 docs/configuring-containers-in-tests.mdtext     |   24 +
 docs/configuring-datasources-in-tests.mdtext    |   56 +
 docs/configuring-datasources.mdtext             |  167 ++
 docs/configuring-durations.mdtext               |   64 +
 docs/configuring-javamail.mdtext                |   37 +
 docs/configuring-logging-in-tests.mdtext        |  114 ++
 ...configuring-persistenceunits-in-tests.mdtext |  141 ++
 docs/constructor-injection.mdtext               |   95 ++
 docs/containers-and-resources.mdtext            |  479 ++++++
 docs/contrib/.DS_Store                          |  Bin 0 -> 6148 bytes
 docs/contrib/debug/debug-intellij.mdtext        |  129 ++
 docs/contrib/debug/idea1.png                    |  Bin 0 -> 48995 bytes
 docs/contrib/debug/idea10.png                   |  Bin 0 -> 54939 bytes
 docs/contrib/debug/idea2.png                    |  Bin 0 -> 36567 bytes
 docs/contrib/debug/idea3.png                    |  Bin 0 -> 20165 bytes
 docs/contrib/debug/idea4.png                    |  Bin 0 -> 55824 bytes
 docs/contrib/debug/idea6.png                    |  Bin 0 -> 19286 bytes
 docs/contrib/debug/idea7.png                    |  Bin 0 -> 19805 bytes
 docs/contrib/debug/idea8.png                    |  Bin 0 -> 55721 bytes
 docs/contrib/debug/idea9.png                    |  Bin 0 -> 19477 bytes
 docs/custom-injection.mdtext                    |  192 +++
 docs/datasource-config.mdtext                   |  537 ++++++
 docs/datasource-configuration-by-creator.md     |  151 ++
 docs/datasource-password-encryption.mdtext      |  124 ++
 docs/deamon/lin-service.mdtext                  |   13 +
 docs/deamon/win-service.mdtext                  |   13 +
 docs/declaring-references.mdtext                |    2 +
 docs/deploy-tool.mdtext                         |  161 ++
 docs/deploying-in-tomee.mdtext                  |   69 +
 docs/deployment-id.mdtext                       |  227 +++
 docs/deployments.mdtext                         |  131 ++
 docs/details-on-openejb-jar.mdtext              |  152 ++
 docs/developer/.DS_Store                        |  Bin 0 -> 6148 bytes
 docs/developer/classloading/index.adoc          |   59 +
 docs/developer/configuration/cxf.adoc           |   93 ++
 docs/developer/ide/index.adoc                   |   25 +
 docs/developer/index.adoc                       |    7 +
 docs/developer/json/index.adoc                  |  206 +++
 docs/developer/migration/tomee-1-to-7.adoc      |   33 +
 .../testing/applicationcomposer/index.adoc      |  335 ++++
 docs/developer/testing/arquillian/index.adoc    |  421 +++++
 docs/developer/testing/index.adoc               |    9 +
 docs/developer/testing/other/index.adoc         |  134 ++
 docs/developer/tools/gradle-plugins.adoc        |   50 +
 docs/developer/tools/index.adoc                 |    8 +
 docs/developer/tools/maven-plugins.adoc         |   12 +
 .../tools/maven/applicationcomposer.adoc        |   47 +
 docs/developer/tools/maven/embedded.adoc        |   53 +
 docs/developer/tools/maven/tomee.adoc           |  183 ++
 docs/docs.adoc                                  |   26 +
 docs/documentation.mdtext                       |  102 ++
 docs/documentation.old.mdtext                   |  102 ++
 docs/dynamic-datasource.mdtext                  |  216 +++
 docs/eclipse-plugin.mdtext                      |   38 +
 docs/ejb-failover.mdtext                        |   88 +
 docs/ejb-local-ref.mdtext                       |   49 +
 docs/ejb-over-ssl.mdtext                        |   96 ++
 docs/ejb-ref.mdtext                             |   47 +
 docs/ejb-refs.mdtext                            |  174 ++
 docs/ejb-request-logging.mdtext                 |   94 ++
 docs/ejbd-transport.mdtext                      |  132 ++
 docs/embedded-and-remotable.mdtext              |  179 ++
 docs/embedded-configuration.mdtext              |  132 ++
 docs/embedding.mdtext                           |   26 +
 docs/failover-logging.mdtext                    |   38 +
 docs/faq.mdtext                                 |   96 ++
 docs/faq_openejb-jar.html.mdtext                |    2 +
 docs/features.mdtext                            |    1 +
 docs/from-glassfish-to-tomee.mdtext             |    3 +
 ...ting-with-openejb,-jetty-and-selenium.mdtext |  236 +++
 docs/generating-ejb-3-annotations.mdtext        |   57 +
 docs/getting-started.mdtext                     |  169 ++
 docs/hello-world.mdtext                         |  246 +++
 docs/hibernate.mdtext                           |   94 ++
 docs/initialcontext-config.mdtext               |   24 +
 docs/installation-drop-in-war.mdtext            |   41 +
 docs/installation.mdtext                        |   30 +
 docs/installing-tomee.mdtext                    |   67 +
 docs/java7.mdtext                               |   36 +
 docs/javaagent-with-maven-surefire.mdtext       |   54 +
 docs/javaagent.mdtext                           |   57 +
 docs/javaee7-status.mdtext                      |  182 ++
 docs/javamailsession-config.mdtext              |   24 +
 docs/jms-resources-and-mdb-container.mdtext     |  279 ++++
 docs/jmsconnectionfactory-config.mdtext         |   85 +
 docs/jndi-names.mdtext                          |  368 +++++
 docs/jpa-concepts.mdtext                        |  217 +++
 docs/jpa-usage.mdtext                           |   50 +
 docs/local-client-injection.mdtext              |   85 +
 docs/local-server.mdtext                        |   57 +
 docs/lookup-of-other-ejbs-example.mdtext        |  147 ++
 docs/managedcontainer-config.mdtext             |   24 +
 docs/manual-installation.mdtext                 |  223 +++
 docs/maven.mdtext                               |   38 +
 docs/maven/build-mojo.mdtext                    | 1422 ++++++++++++++++
 docs/maven/configtest-mojo.mdtext               | 1324 +++++++++++++++
 docs/maven/debug-mojo.mdtext                    | 1391 ++++++++++++++++
 docs/maven/deploy-mojo.mdtext                   |  251 +++
 docs/maven/exec-mojo.mdtext                     | 1547 +++++++++++++++++
 docs/maven/favicon.ico                          |  Bin 0 -> 3638 bytes
 docs/maven/help-mojo.mdtext                     |  145 ++
 docs/maven/index.mdtext                         |  144 ++
 docs/maven/list-mojo.mdtext                     |  165 ++
 docs/maven/run-mojo.mdtext                      | 1391 ++++++++++++++++
 docs/maven/start-mojo.mdtext                    | 1391 ++++++++++++++++
 docs/maven/stop-mojo.mdtext                     | 1324 +++++++++++++++
 docs/maven/undeploy-mojo.mdtext                 |  205 +++
 docs/messagedrivencontainer-config.mdtext       |   65 +
 docs/multicast-discovery.mdtext                 |   79 +
 .../multiple-business-interface-hazzards.mdtext |  199 +++
 docs/multipoint-considerations.mdtext           |   26 +
 docs/multipoint-discovery.mdtext                |   71 +
 docs/multipoint-recommendations.mdtext          |  139 ++
 docs/multipulse-discovery.mdtext                |   90 +
 docs/new-in-openejb-3.0.mdtext                  |  175 ++
 docs/openejb-3.mdtext                           |   68 +
 docs/openejb-binaries.mdtext                    |   24 +
 docs/openejb-eclipse-plugin.mdtext              |   19 +
 docs/openejb-jsr-107-integration.mdtext         |   21 +
 docs/openejb.xml.mdtext                         |   93 ++
 docs/openjpa.mdtext                             |  111 ++
 docs/orb-config.mdtext                          |   24 +
 docs/persistence-context.mdtext                 |   54 +
 docs/persistence-unit-ref.mdtext                |   87 +
 docs/properties-listing.mdtext                  |   90 +
 docs/properties-tool.mdtext                     |  212 +++
 docs/property-overriding.mdtext                 |   62 +
 docs/provisioning.mdtext                        |   76 +
 docs/proxyfactory-config.mdtext                 |   24 +
 docs/queue-config.mdtext                        |   34 +
 docs/quickstart.mdtext                          |   67 +
 docs/refcard/.DS_Store                          |  Bin 0 -> 6148 bytes
 docs/refcard/css/cypher_main.css                |  493 ++++++
 docs/refcard/css/github.min.css                 |  129 ++
 docs/refcard/css/refcard.css                    |  491 ++++++
 docs/refcard/css/style.css                      |  102 ++
 docs/refcard/favicon.ico                        |  Bin 0 -> 3638 bytes
 docs/refcard/images/github.png                  |  Bin 0 -> 2473 bytes
 docs/refcard/images/tomee.png                   |  Bin 0 -> 1914 bytes
 docs/refcard/js/highlight.min.js                |    1 +
 docs/refcard/js/jquery.min.js                   |    5 +
 docs/refcard/js/modernizr.custom.2.6.2.js       |    4 +
 docs/refcard/js/refcard.js                      |   74 +
 docs/refcard/refcard.html                       | 1556 ++++++++++++++++++
 docs/remote-server.mdtext                       |   60 +
 docs/resource-injection.mdtext                  |  180 ++
 docs/resource-ref-for-datasource.mdtext         |   42 +
 docs/running-a-standalone-openejb-server.mdtext |   91 +
 docs/securing-a-web-service.mdtext              |  239 +++
 docs/security-annotations.mdtext                |  294 ++++
 docs/security.mdtext                            |  144 ++
 docs/securityservice-config.mdtext              |   34 +
 docs/service-locator.mdtext                     |  169 ++
 docs/services.mdtext                            |   16 +
 docs/singleton-beans.mdtext                     |  223 +++
 docs/singleton-ejb.mdtext                       |    2 +
 docs/singletoncontainer-config.mdtext           |   53 +
 docs/spring-and-openejb-3.0.mdtext              |  185 +++
 docs/spring-ejb-and-jpa.mdtext                  |  170 ++
 docs/spring.mdtext                              |  121 ++
 docs/ssh.mdtext                                 |   48 +
 docs/standalone-server.mdtext                   |   23 +
 docs/startup.mdtext                             |  293 ++++
 docs/statefulcontainer-config.mdtext            |  157 ++
 docs/statelesscontainer-config.mdtext           |  458 ++++++
 docs/system-properties-files.mdtext             |   20 +
 docs/system-properties.mdtext                   |   64 +
 docs/telnet-console.mdtext                      |  163 ++
 docs/tip-concurrency.mdtext                     |   22 +
 docs/tip-jersey-client.mdtext                   |   18 +
 docs/tip-weblogic.mdtext                        |   13 +
 docs/tomcat-object-factory.mdtext               |   12 +
 docs/tomee-and-eclipse.mdtext                   |  141 ++
 docs/tomee-and-hibernate.mdtext                 |  159 ++
 docs/tomee-and-intellij.mdtext                  |   77 +
 docs/tomee-and-netbeans.mdtext                  |   93 ++
 docs/tomee-and-security.mdtext                  |   41 +
 docs/tomee-and-webspheremq.mdtext               |  132 ++
 docs/tomee-cluster.txt                          |   72 +
 docs/tomee-directory-structure.mdtext           |   57 +
 docs/tomee-embedded-maven-plugin.mdtext         |  956 +++++++++++
 docs/tomee-jaas.mdtext                          |   69 +
 docs/tomee-logging-in-eclipse.mdtext            |   10 +
 docs/tomee-logging.mdtext                       |   29 +
 docs/tomee-maven-plugin.mdtext                  |  144 ++
 docs/tomee-mp-getting-started.mdtext            |   61 +
 docs/tomee-version-policies.mdtext              |   24 +
 docs/tomee-webaccess.mdtext                     |   18 +
 docs/tomee-webapp.mdtext                        |   58 +
 docs/topic-config.mdtext                        |   34 +
 docs/transaction-annotations.mdtext             |  217 +++
 docs/transactionmanager-config.mdtext           |  164 ++
 docs/understanding-callbacks.mdtext             |   88 +
 docs/understanding-the-directory-layout.mdtext  |   69 +
 docs/unix-daemon.mdtext                         |  105 ++
 docs/validation-tool.mdtext                     |  138 ++
 docs/version-checker.mdtext                     |    9 +
 examples/pom.xml                                |    1 +
 examples/websocket-tls-basic-auth/README.md     |   19 +
 examples/websocket-tls-basic-auth/pom.xml       |  123 ++
 .../src/main/conf/keystore.jks                  |  Bin 0 -> 2245 bytes
 .../src/main/conf/server.xml                    |  166 ++
 .../src/main/conf/tomcat-users.xml              |   45 +
 .../superbiz/websockets/WebSocketResource.java  |   32 +
 .../src/main/webapp/WEB-INF/beans.xml           |   20 +
 .../src/main/webapp/WEB-INF/web.xml             |   35 +
 .../websockets/WebSocketResourceTest.java       |  135 ++
 .../src/test/resources/arquillian.xml           |   41 +
 pom.xml                                         |    2 +-
 tomee/pom.xml                                   |    2 +-
 .../org/apache/tomee/installer/Installer.java   |    2 +-
 tomee/tomee-microprofile-webapp/pom.xml         |  201 ---
 .../src/main/assembly/war.xml                   |   92 --
 .../src/main/resources/META-INF/LICENSE         | 1197 --------------
 .../src/main/resources/META-INF/NOTICE          |  171 --
 tomee/tomee-microprofile/mp-common/pom.xml      |   52 +
 ...ilsafeContainerExecutionManagerProvider.java |   67 +
 ...feContainerExecutionManagerProviderTest.java |   75 +
 tomee/tomee-microprofile/pom.xml                |   38 +
 .../tomee-microprofile-webapp/pom.xml           |  208 +++
 .../src/main/assembly/war.xml                   |   92 ++
 .../src/main/resources/META-INF/LICENSE         | 1197 ++++++++++++++
 .../src/main/resources/META-INF/NOTICE          |  171 ++
 274 files changed, 39562 insertions(+), 1665 deletions(-)
----------------------------------------------------------------------



[20/24] tomee git commit: TOMEE-2295 check the correct database schema is in place

Posted by jg...@apache.org.
TOMEE-2295 check the correct database schema is in place


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

Branch: refs/heads/master
Commit: 46a731e7f11206f2bec39f21435fc2525ac67b1a
Parents: 1ba0375
Author: Jonathan Gallimore <jg...@tomitribe.com>
Authored: Wed Dec 5 14:55:40 2018 +0000
Committer: Jonathan Gallimore <jg...@tomitribe.com>
Committed: Wed Dec 5 14:55:40 2018 +0000

----------------------------------------------------------------------
 .../tests/cmp/sample/CustomOrmXmlTest.java      | 15 +++++--
 .../tests/cmp/sample/MoviesServlet.java         | 43 ++++++++++++++++++++
 .../openejb/arquillian/tests/cmp/sample/web.xml |  5 +++
 3 files changed, 60 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/46a731e7/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
index f261015..e8141b6 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
@@ -24,6 +24,7 @@ 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;
 
@@ -60,8 +61,16 @@ public class CustomOrmXmlTest {
     public void checkCmpJpaEntityORMMappings() throws Exception {
         final String output = IO.slurp(new URL(url.toExternalForm()));
         System.out.println(output);
-        //Assert.assertTrue(output.contains("Movie added successfully"));
-        //Assert.assertTrue(output.contains("Movie removed successfully"));
-        //Assert.assertTrue(output.contains("title='Bad Boys', director='Michael Bay', year=1995"));
+
+        Assert.assertTrue(output.contains("TABLE_NAME: ACTOR, COLUMN_NAME: ACTORID, DATA_TYPE: INTEGER, CHARACTER_MAXIMUM_LENGTH: null"));
+        Assert.assertTrue(output.contains("TABLE_NAME: ACTOR, COLUMN_NAME: ACTOR_NAME, DATA_TYPE: CHARACTER VARYING, CHARACTER_MAXIMUM_LENGTH: 250"));
+        Assert.assertTrue(output.contains("TABLE_NAME: ACTOR_MOVIE, COLUMN_NAME: ACTORS_ACTORID, DATA_TYPE: INTEGER, CHARACTER_MAXIMUM_LENGTH: null"));
+        Assert.assertTrue(output.contains("TABLE_NAME: ACTOR_MOVIE, COLUMN_NAME: MOVIES_MOVIEID, DATA_TYPE: INTEGER, CHARACTER_MAXIMUM_LENGTH: null"));
+        Assert.assertTrue(output.contains("TABLE_NAME: MOVIE, COLUMN_NAME: MOVIEID, DATA_TYPE: INTEGER, CHARACTER_MAXIMUM_LENGTH: null"));
+        Assert.assertTrue(output.contains("TABLE_NAME: MOVIE, COLUMN_NAME: GENRE, DATA_TYPE: CHARACTER VARYING, CHARACTER_MAXIMUM_LENGTH: 255"));
+        Assert.assertTrue(output.contains("TABLE_NAME: MOVIE, COLUMN_NAME: MOVIE_NAME, DATA_TYPE: CHARACTER VARYING, CHARACTER_MAXIMUM_LENGTH: 250"));
+
+        final String[] split = output.split("\r\n");
+        Assert.assertEquals(7, split.length);
     }
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/46a731e7/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
index 54f0893..63d868c 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
@@ -18,6 +18,11 @@
 package org.apache.openejb.arquillian.tests.cmp.sample;
 
 import java.io.IOException;
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.rmi.PortableRemoteObject;
@@ -25,6 +30,7 @@ import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.sql.DataSource;
 
 
 public class MoviesServlet extends HttpServlet {
@@ -32,6 +38,9 @@ public class MoviesServlet extends HttpServlet {
     @Override
     protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
         try {
+
+            final PrintWriter pw = resp.getWriter();
+
             final Context initial = new InitialContext();
 
             final MoviesBusinessHome home = (MoviesBusinessHome)
@@ -40,6 +49,40 @@ public class MoviesServlet extends HttpServlet {
             final MoviesBusiness moviesBusiness = home.create();
             moviesBusiness.doLogic();
 
+            final DataSource ds = (DataSource) initial.lookup("java:comp/env/db/DataSource");
+            try (final Connection connection = ds.getConnection();
+                 final PreparedStatement ps = connection.prepareStatement(
+                         "select TABLE_NAME, COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH " +
+                                 "from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'PUBLIC'");
+
+                 final ResultSet rs = ps.executeQuery()) {
+
+                final ResultSetMetaData metaData = rs.getMetaData();
+                final int columnCount = metaData.getColumnCount();
+
+                final String[] columnNames = new String[columnCount];
+
+                for (int c = 0; c < columnCount; c++) {
+                    columnNames[c] = metaData.getColumnName(c + 1);
+                }
+
+                while (rs.next()) {
+                    final StringBuilder sb = new StringBuilder();
+
+                    for (int c = 0; c < columnCount; c++) {
+                        if (c > 0) {
+                            sb.append(", ");
+                        }
+
+                        sb.append(columnNames[c]).append(": ").append(rs.getString(c + 1));
+                    }
+
+                    pw.println(sb.toString());
+                }
+            }
+
+            pw.flush();
+
         } catch (final Exception ex) {
             throw new ServletException(ex);
         }

http://git-wip-us.apache.org/repos/asf/tomee/blob/46a731e7/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
index a536e17..cd3c591 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
@@ -39,4 +39,9 @@
         <home>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessHome</home>
         <remote>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusiness</remote>
     </ejb-ref>
+
+    <resource-ref>
+        <res-ref-name>db/DataSource</res-ref-name>
+        <res-type>javax.sql.DataSource</res-type>
+    </resource-ref>
 </web-app>
\ No newline at end of file


[22/24] tomee git commit: Merge branch 'master' into cmp-jpa

Posted by jg...@apache.org.
Merge branch 'master' into cmp-jpa


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

Branch: refs/heads/master
Commit: 4086d2c8ba739173b69c13cbc12159a8fdf03b2b
Parents: 5aab807 388460f
Author: Jonathan Gallimore <jg...@tomitribe.com>
Authored: Wed Dec 5 17:18:29 2018 +0000
Committer: Jonathan Gallimore <jg...@tomitribe.com>
Committed: Wed Dec 5 17:18:29 2018 +0000

----------------------------------------------------------------------
 .../securityejb/SecurityEJBPropagationTest.java |   4 +-
 .../src/test/resources/test/context.xml         |  20 ++
 .../openejb/config/AnnotationDeployer.java      |   4 +-
 .../org/apache/openejb/config/AutoConfig.java   | 113 ++++++-
 .../apache/openejb/config/sys/SaxOpenejb.java   |  19 +-
 .../openejb/core/mdb/MdbInstanceManager.java    |   6 +-
 .../apache/openejb/config/Messages.properties   |   3 +
 .../connector-starter-api/pom.xml               |  50 ----
 .../connector/starter/api/InboundListener.java  |  24 --
 .../src/main/resources/META-INF/LICENSE         | 202 -------------
 .../src/main/resources/META-INF/NOTICE          |   7 -
 .../connector-starter-impl/pom.xml              |  60 ----
 .../starter/adapter/SampleActivationSpec.java   |  54 ----
 .../starter/adapter/SampleResourceAdapter.java  |  92 ------
 .../src/main/resources/META-INF/LICENSE         | 202 -------------
 .../src/main/resources/META-INF/NOTICE          |   7 -
 .../src/main/rar/META-INF/LICENSE               | 294 -------------------
 .../src/main/rar/META-INF/NOTICE                |   5 -
 .../src/main/rar/META-INF/ra.xml                |  58 ----
 .../connector-starter-sample-war/pom.xml        | 150 ----------
 .../src/main/java/org/superbiz/Receiver.java    |  35 ---
 .../src/main/java/org/superbiz/Sender.java      |  52 ----
 .../src/main/resources/META-INF/LICENSE         | 202 -------------
 .../src/main/resources/META-INF/NOTICE          |   7 -
 .../src/main/resources/META-INF/ejb-jar.xml     |  23 --
 .../org/tomitribe/connector/starter/Runner.java | 104 -------
 .../src/test/resources/arquillian.xml           |  30 --
 examples/connector-ear-sample/pom.xml           | 205 -------------
 .../moviefun/MoviesArquillianHtmlUnitTest.java  |   2 +-
 tck/cdi-embedded/dev-tests.xml                  |  60 ++++
 tck/cdi-tomee/dev-tests.xml                     |  62 ++++
 .../test/resources/META-INF/cdi-tck.properties  |   2 +-
 .../tomee/catalina/TomcatWebAppBuilder.java     |  10 +-
 .../java/org/apache/tomee/embedded/Main.java    |   2 +-
 .../openejb/mockito/MockitoExtension.java       |   2 +-
 35 files changed, 289 insertions(+), 1883 deletions(-)
----------------------------------------------------------------------



[08/24] tomee git commit: Merge branch 'master' into cmp-jpa

Posted by jg...@apache.org.
Merge branch 'master' into cmp-jpa


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

Branch: refs/heads/master
Commit: 8342058ae1f35f426e25a2eea9244a8ba106457f
Parents: 83a49c4 b4cf3cf
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Mon Dec 3 12:03:14 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Mon Dec 3 12:03:14 2018 +0000

----------------------------------------------------------------------
 .../openejb/assembler/classic/AppInfo.java      |   34 +-
 .../openejb/assembler/classic/WebAppInfo.java   |   24 +-
 docs/Configuring-in-tomee.md                    |   45 +
 docs/Configuring-in-tomee.mdtext                |   41 -
 docs/activemqresourceadapter-config.md          |   69 +
 docs/activemqresourceadapter-config.mdtext      |   66 -
 docs/admin/cluster/index.adoc                   |   25 +-
 docs/admin/configuration/application.adoc       |    0
 docs/admin/configuration/containers.adoc        |    0
 docs/admin/configuration/index.adoc             |    0
 docs/admin/configuration/resources.adoc         |    0
 docs/admin/configuration/server.adoc            |    0
 docs/admin/file-layout.adoc                     |    0
 docs/admin/index.adoc                           |    0
 docs/advanced/applicationcomposer/index.adoc    |    0
 docs/advanced/client/jndi.adoc                  |    4 +-
 docs/advanced/index.adoc                        |    0
 docs/advanced/setup/index.adoc                  |    0
 docs/advanced/shading/index.adoc                |    0
 docs/advanced/tomee-embedded/foo.ado            |    0
 docs/advanced/tomee-embedded/index.adoc         |    0
 docs/alternate-descriptors.md                   |  117 ++
 docs/alternate-descriptors.mdtext               |  114 --
 docs/annotations,-xml-and-defaults.md           |  569 +++++++
 docs/annotations,-xml-and-defaults.mdtext       |  565 -------
 docs/app-clients-and-jndi.md                    |   73 +
 docs/app-clients-and-jndi.mdtext                |   69 -
 docs/application-deployment-solutions.md        |   78 +
 docs/application-deployment-solutions.mdtext    |   75 -
 docs/application-discovery-via-the-classpath.md |   94 ++
 ...plication-discovery-via-the-classpath.mdtext |   91 -
 docs/application-resources.md                   |  250 +++
 docs/application-resources.mdtext               |  247 ---
 docs/arquillian-available-adapters.md           |  264 +++
 docs/arquillian-available-adapters.mdtext       |  262 ---
 docs/arquillian-getting-started.md              |   24 +
 docs/arquillian-getting-started.mdtext          |   20 -
 docs/basics---getting-things.md                 |  107 ++
 docs/basics---getting-things.mdtext             |  103 --
 docs/basics---security.md                       |   55 +
 docs/basics---security.mdtext                   |   52 -
 docs/basics---transactions.md                   |   60 +
 docs/basics---transactions.mdtext               |   56 -
 docs/bmpentitycontainer-config.md               |   37 +
 docs/bmpentitycontainer-config.mdtext           |   35 -
 docs/bouncy-castle.md                           |   34 +
 docs/bouncy-castle.mdtext                       |   31 -
 docs/built-in-type-converters.md                |   94 ++
 docs/built-in-type-converters.mdtext            |   91 -
 docs/callbacks.md                               |  167 ++
 docs/callbacks.mdtext                           |  164 --
 docs/changing-jms-implementations.md            |  136 ++
 docs/changing-jms-implementations.mdtext        |  133 --
 docs/client-server-transports.md                |   22 +
 docs/client-server-transports.mdtext            |   19 -
 docs/clients.md                                 |  104 ++
 docs/clients.mdtext                             |  101 --
 docs/cmpentitycontainer-config.md               |   36 +
 docs/cmpentitycontainer-config.mdtext           |   34 -
 docs/collapsed-ear.md                           |   46 +
 docs/collapsed-ear.mdtext                       |   42 -
 docs/common-datasource-configurations.md        |  115 ++
 docs/common-datasource-configurations.mdtext    |  111 --
 docs/common-errors.md                           |   30 +
 docs/common-errors.mdtext                       |   27 -
 docs/common-persistenceprovider-properties.md   |   47 +
 ...common-persistenceprovider-properties.mdtext |   44 -
 docs/comparison.md                              |  222 +++
 docs/comparison.mdtext                          |  219 ---
 docs/concepts.md                                |   79 +
 docs/concepts.mdtext                            |   75 -
 docs/configuration.md                           |  144 ++
 docs/configuration.mdtext                       |  140 --
 docs/configuring-containers-in-tests.md         |   27 +
 docs/configuring-containers-in-tests.mdtext     |   24 -
 docs/configuring-datasources-in-tests.md        |   60 +
 docs/configuring-datasources-in-tests.mdtext    |   56 -
 docs/configuring-datasources.md                 |  170 ++
 docs/configuring-datasources.mdtext             |  167 --
 docs/configuring-durations.md                   |   67 +
 docs/configuring-durations.mdtext               |   64 -
 docs/configuring-javamail.md                    |   41 +
 docs/configuring-javamail.mdtext                |   37 -
 docs/configuring-logging-in-tests.md            |  118 ++
 docs/configuring-logging-in-tests.mdtext        |  114 --
 docs/configuring-persistenceunits-in-tests.md   |  144 ++
 ...configuring-persistenceunits-in-tests.mdtext |  141 --
 docs/constructor-injection.md                   |   98 ++
 docs/constructor-injection.mdtext               |   95 --
 docs/containers-and-resources.md                |  483 ++++++
 docs/containers-and-resources.mdtext            |  479 ------
 docs/contrib/debug/debug-intellij.md            |  133 ++
 docs/contrib/debug/debug-intellij.mdtext        |  129 --
 docs/custom-injection.md                        |  193 +++
 docs/custom-injection.mdtext                    |  192 ---
 docs/datasource-config.md                       |  541 ++++++
 docs/datasource-config.mdtext                   |  537 ------
 docs/datasource-password-encryption.md          |  128 ++
 docs/datasource-password-encryption.mdtext      |  124 --
 docs/deamon/lin-service.md                      |   17 +
 docs/deamon/lin-service.mdtext                  |   13 -
 docs/deamon/win-service.md                      |   17 +
 docs/deamon/win-service.mdtext                  |   13 -
 docs/declaring-references.md                    |    6 +
 docs/declaring-references.mdtext                |    2 -
 docs/deploy-tool.md                             |  165 ++
 docs/deploy-tool.mdtext                         |  161 --
 docs/deploying-in-tomee.md                      |   73 +
 docs/deploying-in-tomee.mdtext                  |   69 -
 docs/deployment-id.md                           |  231 +++
 docs/deployment-id.mdtext                       |  227 ---
 docs/deployments.md                             |  135 ++
 docs/deployments.mdtext                         |  131 --
 docs/details-on-openejb-jar.md                  |  156 ++
 docs/details-on-openejb-jar.mdtext              |  152 --
 docs/developer/classloading/index.adoc          |    0
 docs/developer/configuration/cxf.adoc           |    0
 docs/developer/ide/index.adoc                   |    0
 docs/developer/index.adoc                       |    0
 docs/developer/json/index.adoc                  |    0
 .../testing/applicationcomposer/index.adoc      |    0
 docs/developer/testing/arquillian/index.adoc    |    0
 docs/developer/testing/index.adoc               |    0
 docs/developer/testing/other/index.adoc         |    0
 docs/developer/tools/gradle-plugins.adoc        |    0
 docs/developer/tools/index.adoc                 |    0
 docs/developer/tools/maven-plugins.adoc         |    0
 .../tools/maven/applicationcomposer.adoc        |    0
 docs/developer/tools/maven/embedded.adoc        |    0
 docs/developer/tools/maven/tomee.adoc           |    0
 docs/documentation.md                           |  106 ++
 docs/documentation.mdtext                       |  102 --
 docs/documentation.old.md                       |  102 ++
 docs/documentation.old.mdtext                   |  102 --
 docs/dynamic-datasource.md                      |  220 +++
 docs/dynamic-datasource.mdtext                  |  216 ---
 docs/eclipse-plugin.md                          |   42 +
 docs/eclipse-plugin.mdtext                      |   38 -
 docs/ejb-failover.md                            |   89 +
 docs/ejb-failover.mdtext                        |   88 -
 docs/ejb-local-ref.md                           |   52 +
 docs/ejb-local-ref.mdtext                       |   49 -
 docs/ejb-over-ssl.md                            |  100 ++
 docs/ejb-over-ssl.mdtext                        |   96 --
 docs/ejb-ref.md                                 |   50 +
 docs/ejb-ref.mdtext                             |   47 -
 docs/ejb-refs.md                                |  178 ++
 docs/ejb-refs.mdtext                            |  174 --
 docs/ejb-request-logging.md                     |   98 ++
 docs/ejb-request-logging.mdtext                 |   94 --
 docs/ejbd-transport.md                          |  136 ++
 docs/ejbd-transport.mdtext                      |  132 --
 docs/embedded-and-remotable.md                  |  181 ++
 docs/embedded-and-remotable.mdtext              |  179 --
 docs/embedded-configuration.md                  |  135 ++
 docs/embedded-configuration.mdtext              |  132 --
 docs/embedding.md                               |   30 +
 docs/embedding.mdtext                           |   26 -
 docs/failover-logging.md                        |   42 +
 docs/failover-logging.mdtext                    |   38 -
 docs/faq.md                                     |   99 ++
 docs/faq.mdtext                                 |   96 --
 docs/faq_openejb-jar.html.mdtext                |    2 -
 docs/features.md                                |    6 +
 docs/features.mdtext                            |    1 -
 docs/from-glassfish-to-tomee.md                 |    7 +
 docs/from-glassfish-to-tomee.mdtext             |    3 -
 ...-testing-with-openejb,-jetty-and-selenium.md |  240 +++
 ...ting-with-openejb,-jetty-and-selenium.mdtext |  236 ---
 docs/generating-ejb-3-annotations.md            |   61 +
 docs/generating-ejb-3-annotations.mdtext        |   57 -
 docs/getting-started.md                         |  172 ++
 docs/getting-started.mdtext                     |  169 --
 docs/hello-world.md                             |  250 +++
 docs/hello-world.mdtext                         |  246 ---
 docs/hibernate.md                               |   98 ++
 docs/hibernate.mdtext                           |   94 --
 docs/initialcontext-config.md                   |   26 +
 docs/initialcontext-config.mdtext               |   24 -
 docs/installation-drop-in-war.md                |   45 +
 docs/installation-drop-in-war.mdtext            |   41 -
 docs/installation.md                            |   34 +
 docs/installation.mdtext                        |   30 -
 docs/installing-tomee.md                        |   71 +
 docs/installing-tomee.mdtext                    |   67 -
 docs/java7.md                                   |   40 +
 docs/java7.mdtext                               |   36 -
 docs/javaagent-with-maven-surefire.md           |   57 +
 docs/javaagent-with-maven-surefire.mdtext       |   54 -
 docs/javaagent.md                               |   61 +
 docs/javaagent.mdtext                           |   57 -
 docs/javaee7-status.md                          |  185 +++
 docs/javaee7-status.mdtext                      |  182 --
 docs/javamailsession-config.md                  |   26 +
 docs/javamailsession-config.mdtext              |   24 -
 docs/jms-resources-and-mdb-container.md         |  283 ++++
 docs/jms-resources-and-mdb-container.mdtext     |  279 ----
 docs/jmsconnectionfactory-config.md             |   87 +
 docs/jmsconnectionfactory-config.mdtext         |   85 -
 docs/jndi-names.md                              |  372 +++++
 docs/jndi-names.mdtext                          |  368 -----
 docs/jpa-concepts.md                            |  220 +++
 docs/jpa-concepts.mdtext                        |  217 ---
 docs/jpa-usage.md                               |   52 +
 docs/jpa-usage.mdtext                           |   50 -
 docs/local-client-injection.md                  |   87 +
 docs/local-client-injection.mdtext              |   85 -
 docs/local-server.md                            |   61 +
 docs/local-server.mdtext                        |   57 -
 docs/lookup-of-other-ejbs-example.md            |  149 ++
 docs/lookup-of-other-ejbs-example.mdtext        |  147 --
 docs/managedcontainer-config.md                 |   26 +
 docs/managedcontainer-config.mdtext             |   24 -
 docs/manual-installation.md                     |  224 +++
 docs/manual-installation.mdtext                 |  223 ---
 docs/maven.md                                   |   42 +
 docs/maven.mdtext                               |   38 -
 docs/maven/build-mojo.md                        | 1426 ++++++++++++++++
 docs/maven/build-mojo.mdtext                    | 1422 ----------------
 docs/maven/configtest-mojo.md                   | 1328 +++++++++++++++
 docs/maven/configtest-mojo.mdtext               | 1324 ---------------
 docs/maven/debug-mojo.md                        | 1395 ++++++++++++++++
 docs/maven/debug-mojo.mdtext                    | 1391 ----------------
 docs/maven/deploy-mojo.md                       |  255 +++
 docs/maven/deploy-mojo.mdtext                   |  251 ---
 docs/maven/exec-mojo.md                         | 1551 ++++++++++++++++++
 docs/maven/exec-mojo.mdtext                     | 1547 -----------------
 docs/maven/help-mojo.md                         |  149 ++
 docs/maven/help-mojo.mdtext                     |  145 --
 docs/maven/index.md                             |  148 ++
 docs/maven/index.mdtext                         |  144 --
 docs/maven/list-mojo.md                         |  169 ++
 docs/maven/list-mojo.mdtext                     |  165 --
 docs/maven/run-mojo.md                          | 1395 ++++++++++++++++
 docs/maven/run-mojo.mdtext                      | 1391 ----------------
 docs/maven/start-mojo.md                        | 1395 ++++++++++++++++
 docs/maven/start-mojo.mdtext                    | 1391 ----------------
 docs/maven/stop-mojo.md                         | 1328 +++++++++++++++
 docs/maven/stop-mojo.mdtext                     | 1324 ---------------
 docs/maven/undeploy-mojo.md                     |  209 +++
 docs/maven/undeploy-mojo.mdtext                 |  205 ---
 docs/messagedrivencontainer-config.md           |   67 +
 docs/messagedrivencontainer-config.mdtext       |   65 -
 docs/multicast-discovery.md                     |   83 +
 docs/multicast-discovery.mdtext                 |   79 -
 docs/multiple-business-interface-hazzards.md    |  202 +++
 .../multiple-business-interface-hazzards.mdtext |  199 ---
 docs/multipoint-considerations.md               |   30 +
 docs/multipoint-considerations.mdtext           |   26 -
 docs/multipoint-discovery.md                    |   75 +
 docs/multipoint-discovery.mdtext                |   71 -
 docs/multipoint-recommendations.md              |  141 ++
 docs/multipoint-recommendations.mdtext          |  139 --
 docs/multipulse-discovery.md                    |   94 ++
 docs/multipulse-discovery.mdtext                |   90 -
 docs/new-in-openejb-3.0.md                      |  179 ++
 docs/new-in-openejb-3.0.mdtext                  |  175 --
 docs/openejb-3.md                               |   72 +
 docs/openejb-3.mdtext                           |   68 -
 docs/openejb-binaries.md                        |   27 +
 docs/openejb-binaries.mdtext                    |   24 -
 docs/openejb-eclipse-plugin.md                  |   22 +
 docs/openejb-eclipse-plugin.mdtext              |   19 -
 docs/openejb-jsr-107-integration.md             |   25 +
 docs/openejb-jsr-107-integration.mdtext         |   21 -
 docs/openejb.xml.md                             |   96 ++
 docs/openejb.xml.mdtext                         |   93 --
 docs/openjpa.md                                 |  113 ++
 docs/openjpa.mdtext                             |  111 --
 docs/orb-config.md                              |   26 +
 docs/orb-config.mdtext                          |   24 -
 docs/persistence-context.md                     |   57 +
 docs/persistence-context.mdtext                 |   54 -
 docs/persistence-unit-ref.md                    |   91 +
 docs/persistence-unit-ref.mdtext                |   87 -
 docs/properties-listing.md                      |   94 ++
 docs/properties-listing.mdtext                  |   90 -
 docs/properties-tool.md                         |  216 +++
 docs/properties-tool.mdtext                     |  212 ---
 docs/property-overriding.md                     |   65 +
 docs/property-overriding.mdtext                 |   62 -
 docs/provisioning.md                            |   78 +
 docs/provisioning.mdtext                        |   76 -
 docs/proxyfactory-config.md                     |   26 +
 docs/proxyfactory-config.mdtext                 |   24 -
 docs/queue-config.md                            |   36 +
 docs/queue-config.mdtext                        |   34 -
 docs/quickstart.md                              |   71 +
 docs/quickstart.mdtext                          |   67 -
 docs/remote-server.md                           |   64 +
 docs/remote-server.mdtext                       |   60 -
 docs/resource-injection.md                      |  184 +++
 docs/resource-injection.mdtext                  |  180 --
 docs/resource-ref-for-datasource.md             |   46 +
 docs/resource-ref-for-datasource.mdtext         |   42 -
 docs/running-a-standalone-openejb-server.md     |   95 ++
 docs/running-a-standalone-openejb-server.mdtext |   91 -
 docs/securing-a-web-service.md                  |  242 +++
 docs/securing-a-web-service.mdtext              |  239 ---
 docs/security-annotations.md                    |  296 ++++
 docs/security-annotations.mdtext                |  294 ----
 docs/security.md                                |  148 ++
 docs/security.mdtext                            |  144 --
 docs/securityservice-config.md                  |   36 +
 docs/securityservice-config.mdtext              |   34 -
 docs/service-locator.md                         |  171 ++
 docs/service-locator.mdtext                     |  169 --
 docs/services.md                                |   20 +
 docs/services.mdtext                            |   16 -
 docs/singleton-beans.md                         |  226 +++
 docs/singleton-beans.mdtext                     |  223 ---
 docs/singleton-ejb.md                           |    6 +
 docs/singleton-ejb.mdtext                       |    2 -
 docs/singletoncontainer-config.md               |   56 +
 docs/singletoncontainer-config.mdtext           |   53 -
 docs/spring-and-openejb-3.0.md                  |  190 +++
 docs/spring-and-openejb-3.0.mdtext              |  185 ---
 docs/spring-ejb-and-jpa.md                      |  173 ++
 docs/spring-ejb-and-jpa.mdtext                  |  170 --
 docs/spring.md                                  |  124 ++
 docs/spring.mdtext                              |  121 --
 docs/ssh.md                                     |   51 +
 docs/ssh.mdtext                                 |   48 -
 docs/standalone-server.md                       |   27 +
 docs/standalone-server.mdtext                   |   23 -
 docs/startup.md                                 |  296 ++++
 docs/startup.mdtext                             |  293 ----
 docs/statefulcontainer-config.md                |  160 ++
 docs/statefulcontainer-config.mdtext            |  157 --
 docs/statelesscontainer-config.md               |  461 ++++++
 docs/statelesscontainer-config.mdtext           |  458 ------
 docs/system-properties-files.md                 |   22 +
 docs/system-properties-files.mdtext             |   20 -
 docs/system-properties.md                       |   68 +
 docs/system-properties.mdtext                   |   64 -
 docs/telnet-console.md                          |  166 ++
 docs/telnet-console.mdtext                      |  163 --
 docs/tip-concurrency.md                         |   26 +
 docs/tip-concurrency.mdtext                     |   22 -
 docs/tip-jersey-client.md                       |   22 +
 docs/tip-jersey-client.mdtext                   |   18 -
 docs/tip-weblogic.md                            |   17 +
 docs/tip-weblogic.mdtext                        |   13 -
 docs/tomcat-object-factory.md                   |   15 +
 docs/tomcat-object-factory.mdtext               |   12 -
 docs/tomee-and-eclipse.md                       |  145 ++
 docs/tomee-and-eclipse.mdtext                   |  141 --
 docs/tomee-and-hibernate.md                     |  163 ++
 docs/tomee-and-hibernate.mdtext                 |  159 --
 docs/tomee-and-intellij.md                      |   81 +
 docs/tomee-and-intellij.mdtext                  |   77 -
 docs/tomee-and-netbeans.md                      |   97 ++
 docs/tomee-and-netbeans.mdtext                  |   93 --
 docs/tomee-and-security.md                      |   45 +
 docs/tomee-and-security.mdtext                  |   41 -
 docs/tomee-and-webspheremq.md                   |  136 ++
 docs/tomee-and-webspheremq.mdtext               |  132 --
 docs/tomee-directory-structure.md               |   61 +
 docs/tomee-directory-structure.mdtext           |   57 -
 docs/tomee-embedded-maven-plugin.md             |  959 +++++++++++
 docs/tomee-embedded-maven-plugin.mdtext         |  956 -----------
 docs/tomee-jaas.md                              |   73 +
 docs/tomee-jaas.mdtext                          |   69 -
 docs/tomee-logging-in-eclipse.md                |   13 +
 docs/tomee-logging-in-eclipse.mdtext            |   10 -
 docs/tomee-logging.md                           |   33 +
 docs/tomee-logging.mdtext                       |   29 -
 docs/tomee-maven-plugin.md                      |  148 ++
 docs/tomee-maven-plugin.mdtext                  |  144 --
 docs/tomee-mp-getting-started.md                |   65 +
 docs/tomee-mp-getting-started.mdtext            |   61 -
 docs/tomee-version-policies.md                  |   28 +
 docs/tomee-version-policies.mdtext              |   24 -
 docs/tomee-webaccess.md                         |   21 +
 docs/tomee-webaccess.mdtext                     |   18 -
 docs/tomee-webapp.md                            |   62 +
 docs/tomee-webapp.mdtext                        |   58 -
 docs/topic-config.md                            |   36 +
 docs/topic-config.mdtext                        |   34 -
 docs/transaction-annotations.md                 |  219 +++
 docs/transaction-annotations.mdtext             |  217 ---
 docs/transactionmanager-config.md               |  166 ++
 docs/transactionmanager-config.mdtext           |  164 --
 docs/understanding-callbacks.md                 |   92 ++
 docs/understanding-callbacks.mdtext             |   88 -
 docs/understanding-the-directory-layout.md      |   72 +
 docs/understanding-the-directory-layout.mdtext  |   69 -
 docs/unix-daemon.md                             |  108 ++
 docs/unix-daemon.mdtext                         |  105 --
 docs/validation-tool.md                         |  141 ++
 docs/validation-tool.mdtext                     |  138 --
 docs/version-checker.md                         |   12 +
 docs/version-checker.mdtext                     |    9 -
 examples/access-timeout-meta/README.md          |    6 +-
 examples/access-timeout/README.md               |    7 +-
 examples/alternate-descriptors/README.md        |   11 +-
 examples/applet/README.md                       |    6 +-
 examples/application-composer/README.md         |    6 +-
 examples/applicationexception/README.md         |    7 +-
 .../appexception/BusinessException.java         |    0
 .../appexception/ThrowBusinessException.java    |    0
 .../ThrowBusinessExceptionImpl.java             |    0
 .../appexception/ValueRequiredException.java    |    0
 .../ThrowBusinessExceptionImplTest.java         |    0
 examples/arquillian-jpa/README.md               |    8 +-
 examples/async-methods/README.md                |    7 +-
 examples/async-postconstruct/README.md          |    6 +-
 .../README.md                                   |    4 +
 .../bean-validation-design-by-contract/pom.xml  |    0
 .../designbycontract/OlympicGamesManager.java   |    0
 .../designbycontract/PoleVaultingManager.java   |    0
 .../PoleVaultingManagerBean.java                |    0
 .../designbycontract/OlympicGamesTest.java      |    0
 examples/bval-evaluation-redeployment/README.md |    4 +
 .../cdi-alternative-and-stereotypes/README.md   |    4 +
 examples/cdi-application-scope/README.md        |    6 +-
 examples/cdi-basic/README.md                    |    6 +-
 examples/cdi-events/README.md                   |    4 +
 examples/cdi-interceptors/README.md             |    7 +-
 examples/cdi-produces-disposes/README.md        |    6 +-
 examples/cdi-produces-field/README.md           |    6 +-
 examples/cdi-request-scope/README.md            |    7 +-
 examples/change-jaxws-url/README.md             |   11 +-
 examples/component-interfaces/README.md         |    6 +-
 .../connector/starter/api/SampleConnection.java |    0
 .../starter/api/SampleConnectionFactory.java    |    0
 .../adapter/SampleConnectionFactoryImpl.java    |    0
 .../starter/adapter/SampleConnectionImpl.java   |    0
 .../adapter/SampleManagedConnection.java        |    0
 .../adapter/SampleManagedConnectionFactory.java |    0
 .../SampleManagedConnectionMetaData.java        |    0
 .../connector/api/SampleConnection.java         |    0
 .../connector/api/SampleConnectionFactory.java  |    0
 .../adapter/SampleConnectionFactoryImpl.java    |    0
 .../connector/adapter/SampleConnectionImpl.java |    0
 .../adapter/SampleManagedConnection.java        |    0
 .../adapter/SampleManagedConnectionFactory.java |    0
 .../SampleManagedConnectionMetaData.java        |    0
 examples/connector-war/README.md                |    6 +-
 .../adapter/SampleConnectionFactoryImpl.java    |    0
 .../connector/adapter/SampleConnectionImpl.java |    0
 .../adapter/SampleManagedConnection.java        |    0
 .../adapter/SampleManagedConnectionFactory.java |    0
 .../SampleManagedConnectionMetaData.java        |    0
 .../connector/api/SampleConnection.java         |    0
 .../connector/api/SampleConnectionFactory.java  |    0
 examples/custom-injection/README.md             |    6 +-
 examples/datasource-ciphered-password/README.md |    6 +-
 examples/datasource-versioning/README.md        |    6 +-
 examples/decorators/README.md                   |    6 +-
 examples/deltaspike-fullstack/README.md         |    6 +-
 examples/dynamic-dao-implementation/README.md   |    6 +-
 examples/dynamic-datasource-routing/README.md   |    7 +-
 examples/dynamic-datasource-routing/pom.xml     |    0
 .../BoostrapUtility.java                        |    0
 .../DeterminedRouter.java                       |    0
 .../dynamicdatasourcerouting/Person.java        |    0
 .../RoutedPersister.java                        |    0
 .../META-INF/org.router/service-jar.xml         |    0
 .../src/main/resources/META-INF/persistence.xml |    0
 .../DynamicDataSourceTest.java                  |    0
 examples/dynamic-implementation/README.md       |    6 +-
 .../dynamic-proxy-to-access-mbean/README.md     |    7 +-
 examples/ear-testing/README.md                  |    6 +-
 examples/ejb-examples/README.md                 |    6 +-
 examples/ejb-webservice/README.md               |    6 +-
 examples/helloworld-weblogic/README.md          |    6 +-
 .../injection-of-connectionfactory/README.md    |    6 +-
 examples/injection-of-datasource/README.md      |    6 +-
 examples/injection-of-ejbs/README.md            |    6 +-
 examples/injection-of-entitymanager/README.md   |    6 +-
 examples/injection-of-env-entry/README.md       |    6 +-
 examples/interceptors/README.md                 |    6 +-
 .../interceptors/ClassLevelInterceptorOne.java  |    0
 .../ClassLevelInterceptorSuperClassOne.java     |    0
 .../ClassLevelInterceptorSuperClassTwo.java     |    0
 .../interceptors/ClassLevelInterceptorTwo.java  |    0
 .../interceptors/DefaultInterceptorOne.java     |    0
 .../interceptors/DefaultInterceptorTwo.java     |    0
 .../FullyInterceptedSuperClass.java             |    0
 .../interceptors/MethodLevelInterceptorOne.java |    0
 .../interceptors/MethodLevelInterceptorTwo.java |    0
 .../SuperClassOfClassLevelInterceptor.java      |    0
 .../org/superbiz/interceptors/ThirdSLSBean.java |    0
 .../interceptors/ThirdSLSBeanLocal.java         |    0
 .../src/main/resources/META-INF/ejb-jar.xml     |    0
 .../interceptors/FullyInterceptedTest.java      |    0
 .../MethodLevelInterceptorOnlyTest.java         |    0
 .../superbiz/interceptors/ThirdSLSBeanTest.java |    0
 examples/javamail/README.md                     |    8 +-
 examples/jpa-eclipselink/README.md              |    8 +-
 examples/jpa-enumerated/README.md               |    6 +-
 examples/jpa-hibernate/README.md                |    6 +-
 examples/jsf-cdi-and-ejb/README.md              |    8 +-
 examples/jsf-managedBean-and-ejb/README.md      |    6 +-
 .../lookup-of-ejbs-with-descriptor/README.md    |    6 +-
 examples/lookup-of-ejbs/README.md               |    6 +-
 examples/mbean-auto-registration/README.md      |    6 +-
 examples/mbean-auto-registration/pom.xml        |    0
 .../org/superbiz/mbean/GuessHowManyMBean.java   |    0
 .../src/main/resources/META-INF/beans.xml       |    0
 .../superbiz/mbean/GuessHowManyMBeanTest.java   |    0
 examples/moviefun/README.md                     |    6 +-
 examples/movies-complete-meta/README.md         |    6 +-
 examples/movies-complete/README.md              |    6 +-
 examples/mp-metrics-counted/README.md           |    4 +
 examples/mp-metrics-timed/README.md             |    4 +
 examples/mtom/README.md                         |    4 +
 examples/myfaces-codi-demo/README.md            |    8 +-
 examples/persistence-fragment/README.md         |    6 +-
 examples/polling-parent/README.md               |    4 +
 examples/quartz-app/README.md                   |    7 +-
 examples/realm-in-tomee/README.md               |    6 +-
 .../README.md                                   |    9 +-
 examples/resources-declared-in-webapp/README.md |    6 +-
 examples/resources-jmx-example/README.md        |   10 +-
 examples/rest-cdi/README.md                     |    9 +-
 .../rest-example-with-application/README.md     |    6 +-
 examples/rest-example/README.md                 |    6 +-
 examples/rest-mp-jwt/README.md                  |    4 +
 examples/rest-on-ejb/README.md                  |    6 +-
 examples/rest-xml-json/README.md                |    9 +-
 examples/schedule-events/README.md              |    7 +-
 examples/schedule-expression/README.md          |    6 +-
 examples/schedule-methods-meta/README.md        |    6 +-
 examples/schedule-methods/README.md             |    6 +-
 examples/simple-cdi-interceptor/README.md       |    4 +
 .../superbiz/cdi/bookshow/beans/BookShow.java   |    0
 .../cdi/bookshow/interceptorbinding/Log.java    |    0
 .../interceptors/LoggingInterceptor.java        |    0
 .../src/main/resources/META-INF/beans.xml       |    0
 .../cdi/bookshow/interceptors/BookShowTest.java |    0
 examples/simple-cmp2/README.md                  |    6 +-
 examples/simple-mdb-and-cdi/README.md           |    6 +-
 examples/simple-mdb-with-descriptor/README.md   |    6 +-
 examples/simple-mdb/README.md                   |    6 +-
 examples/simple-rest/README.md                  |    7 +-
 examples/simple-singleton/README.md             |    7 +-
 examples/simple-stateful-callbacks/README.md    |    8 +-
 examples/simple-stateful/README.md              |    6 +-
 examples/simple-stateless-callbacks/README.md   |    6 +-
 .../simple-stateless-with-descriptor/README.md  |    6 +-
 examples/simple-stateless/README.md             |    6 +-
 .../README.md                                   |    6 +-
 examples/simple-webservice/README.md            |    7 +-
 examples/spring-data-proxy-meta/README.md       |    4 +
 examples/spring-data-proxy/README.md            |    4 +
 examples/struts/README.md                       |    6 +-
 examples/telephone-stateful/README.md           |    6 +-
 examples/testcase-injection/README.md           |    6 +-
 examples/testing-security-2/README.md           |    6 +-
 examples/testing-security-3/README.md           |    7 +-
 examples/testing-security-meta/README.md        |    6 +-
 examples/testing-security/README.md             |    6 +-
 examples/testing-transactions-bmt/README.md     |    6 +-
 examples/testing-transactions/README.md         |    6 +-
 examples/transaction-rollback/README.md         |    6 +-
 examples/troubleshooting/README.md              |    6 +-
 examples/webservice-attachments/README.md       |    6 +-
 examples/webservice-handlerchain/README.md      |    6 +-
 examples/webservice-holder/README.md            |    6 +-
 examples/webservice-inheritance/README.md       |    6 +-
 examples/webservice-security/README.md          |    6 +-
 examples/webservice-ws-security/README.md       |    6 +-
 examples/websocket-tls-basic-auth/README.md     |    4 +
 pom.xml                                         |    2 +-
 .../cxf/rs/johnzon/TomEEJsonbProvider.java      |   16 +
 .../cxf/rs/johnzon/TomEEJsonbProviderTest.java  |  116 ++
 .../openejb/server/rest/EJBRestServiceInfo.java |    2 +-
 .../rest/OpenEJBRestRuntimeException.java       |    2 +-
 .../apache/openejb/server/rest/RESTService.java |    2 +-
 .../apache/openejb/server/rest/RsRegistry.java  |    1 -
 .../openejb/server/rest/RsRegistryImpl.java     |    4 +-
 .../apache/openejb/server/rest/RsServlet.java   |    2 +
 .../catalina/startup/OpenEJBContextConfig.java  |   12 +-
 .../org/apache/tomee/catalina/ContextValue.java |    3 +-
 .../tomee/catalina/GlobalListenerSupport.java   |    4 +
 .../tomee/catalina/IgnoredStandardContext.java  |    1 +
 .../tomee/catalina/LazyStopStandardRoot.java    |    7 +
 .../apache/tomee/catalina/OpenEJBContext.java   |   29 +
 .../catalina/OpenEJBNamingContextListener.java  |    2 +
 .../tomee/catalina/OpenEJBNamingResource.java   |    2 +-
 .../org/apache/tomee/catalina/OpenEJBValve.java |    1 +
 .../apache/tomee/catalina/ServerListener.java   |    1 +
 .../catalina/TomEEClassLoaderEnricher.java      |    6 +-
 .../tomee/catalina/TomEEContainerListener.java  |    8 +-
 .../tomee/catalina/TomcatDeploymentLoader.java  |    4 +-
 .../tomee/catalina/TomcatJndiBuilder.java       |    5 +-
 .../org/apache/tomee/catalina/TomcatLoader.java |   10 +-
 .../tomee/catalina/TomcatSecurityService.java   |   27 +-
 .../catalina/TomcatThreadContextListener.java   |   12 +-
 .../tomee/catalina/TomcatWebAppBuilder.java     |   97 +-
 .../tomee/common/AbstractObjectFactory.java     |    1 +
 .../org/apache/tomee/common/EjbFactory.java     |    2 +
 .../org/apache/tomee/common/EnumFactory.java    |    1 +
 .../tomee/common/LegacyAnnotationProcessor.java |   25 +
 .../org/apache/tomee/common/LookupFactory.java  |    1 +
 .../org/apache/tomee/common/NamingUtil.java     |    2 +-
 .../tomee/common/PersistenceContextFactory.java |    2 +
 .../tomee/common/PersistenceUnitFactory.java    |    2 +
 .../apache/tomee/common/ResourceFactory.java    |    2 +
 .../tomee/common/SystemComponentFactory.java    |    1 +
 .../tomee/common/UserTransactionFactory.java    |    1 +
 .../java/org/apache/tomee/common/WsFactory.java |    3 +
 .../java/org/apache/tomee/installer/Alerts.java |    6 +-
 .../apache/tomee/installer/InstallerTools.java  |    2 +-
 .../org/apache/tomee/installer/Installers.java  |    3 +-
 .../java/org/apache/tomee/installer/Paths.java  |    2 +-
 .../tomee/embedded/EmbeddedTomEEContainer.java  |    6 +-
 .../java/org/apache/tomee/embedded/FatApp.java  |    2 +-
 .../internal/StandardContextCustomizer.java     |    3 +-
 .../jul/formatter/AsyncConsoleHandler.java      |    1 +
 .../apache/tomee/loader/OpenEJBListener.java    |    8 +-
 .../org/apache/tomee/loader/TomEEListener.java  |    3 +-
 .../java/org/apache/tomee/loader/UrlSet.java    |   18 +-
 .../apache/tomee/loader/filter/FilterList.java  |    2 +-
 .../org/apache/tomee/loader/filter/Filters.java |   16 +-
 .../apache/tomee/webapp/installer/Common.java   |    2 +-
 .../apache/tomee/webapp/installer/Runner.java   |    2 +-
 .../tomee/webservices/TomcatWsRegistry.java     |    1 +
 620 files changed, 30831 insertions(+), 29581 deletions(-)
----------------------------------------------------------------------



[15/24] tomee git commit: Merge branch 'master' into cmp-jpa

Posted by jg...@apache.org.
Merge branch 'master' into cmp-jpa


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

Branch: refs/heads/master
Commit: 5e972344fff1867ccbd3f25377fd07ba832020a3
Parents: 7dfdc4a 95c8263
Author: Jonathan Gallimore <jg...@tomitribe.com>
Authored: Tue Dec 4 23:49:56 2018 +0000
Committer: Jonathan Gallimore <jg...@tomitribe.com>
Committed: Tue Dec 4 23:49:56 2018 +0000

----------------------------------------------------------------------
 .../java/org/apache/openejb/cli/Bootstrap.java  |  39 ++-
 .../openejb/loader/BasicURLClassPath.java       |   4 +-
 .../main/resources/archetype-resources/pom.xml  |   4 +-
 .../server/cxf/rs/TestCLIFromJaxRSTest.java     |  70 +++++
 tomee/apache-tomee/pom.xml                      |  12 +
 .../src/test/java/org/apache/tomee/Test.java    |  24 ++
 .../java/org/apache/tomee/TestCommand1.java     |  25 ++
 .../java/org/apache/tomee/TestCommand2.java     |  26 ++
 .../test/java/org/apache/tomee/TomEECliIT.java  | 281 +++++++++++++++++++
 9 files changed, 460 insertions(+), 25 deletions(-)
----------------------------------------------------------------------



[12/24] tomee git commit: TOMEE-2295 - ripping a lot of stuff out of this. Still not working.

Posted by jg...@apache.org.
TOMEE-2295 - ripping a lot of stuff out of this. Still not working.


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

Branch: refs/heads/master
Commit: 79d386fd81683af5742ad3ef55a25936335c4b8d
Parents: d878bf0
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Tue Dec 4 14:29:14 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Tue Dec 4 14:29:14 2018 +0000

----------------------------------------------------------------------
 .../arquillian-tomee-webprofile-tests/pom.xml   | 48 +++++++++++
 .../arquillian/tests/cmp/sample/Actor.java      |  8 +-
 .../arquillian/tests/cmp/sample/ActorBean.java  | 12 +--
 .../tests/cmp/sample/ActorLocalHome.java        |  1 +
 .../arquillian/tests/cmp/sample/ActorVO.java    | 68 ---------------
 .../tests/cmp/sample/CustomOrmXmlTest.java      |  6 +-
 .../arquillian/tests/cmp/sample/Movie.java      | 45 ----------
 .../arquillian/tests/cmp/sample/MovieBean.java  | 90 --------------------
 .../tests/cmp/sample/MovieLocalHome.java        | 35 --------
 .../tests/cmp/sample/MovieServlet.java          | 21 +----
 .../arquillian/tests/cmp/sample/MovieVO.java    | 89 -------------------
 .../tests/cmp/sample/MoviesBusinessBean.java    | 76 +----------------
 .../tests/cmp/sample/MoviesBusinessLocal.java   |  7 +-
 .../arquillian/tests/cmp/sample/custom-orm.xml  | 58 -------------
 .../arquillian/tests/cmp/sample/ejb-jar.xml     | 81 +-----------------
 .../arquillian/tests/cmp/sample/persistence.xml | 32 -------
 16 files changed, 70 insertions(+), 607 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/pom.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/pom.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/pom.xml
index e4593e8..b37cdbb 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/pom.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/pom.xml
@@ -52,6 +52,54 @@
   <build>
     <plugins>
       <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.21.0</version>
+        <executions>
+          <execution>
+            <id>default-test</id>
+            <phase>test</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <skip>true</skip>
+              <parallel>none</parallel>
+              <threadCount>1</threadCount>
+              <reuseForks>true</reuseForks>
+              <trimStackTrace>false</trimStackTrace>
+            </configuration>
+          </execution>
+          <execution>
+            <id>test-tomee-embedded</id>
+            <phase>test</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <skip>${maven.test.skip}</skip>
+              <!--<argLine>-javaagent:${settings.localRepository}/org/apache/tomee/openejb-javaagent/8.0.0-SNAPSHOT/openejb-javaagent-8.0.0-SNAPSHOT.jar -agentpath:/Users/jgallimore/tmp/libtracknpe.so</argLine>-->
+              <argLine>-javaagent:${settings.localRepository}/org/apache/tomee/openejb-javaagent/8.0.0-SNAPSHOT/openejb-javaagent-8.0.0-SNAPSHOT.jar</argLine>
+              <systemPropertyVariables>
+                <tomee.version>8.0.0-SNAPSHOT</tomee.version>
+                <arquillian.launch>tomee-embedded</arquillian.launch>
+                <openejb.arquillian.adapter>tomee-embedded</openejb.arquillian.adapter>
+              </systemPropertyVariables>
+              <parallel>none</parallel>
+              <threadCount>1</threadCount>
+              <reuseForks>true</reuseForks>
+              <trimStackTrace>false</trimStackTrace>
+            </configuration>
+          </execution>
+        </executions>
+        <configuration>
+          <skip>true</skip>
+          <parallel>none</parallel>
+          <threadCount>1</threadCount>
+          <reuseForks>true</reuseForks>
+          <trimStackTrace>false</trimStackTrace>
+        </configuration>
+      </plugin>
+      <plugin>
         <groupId>org.apache.openjpa</groupId>
         <artifactId>openjpa-maven-plugin</artifactId>
         <version>${openjpa.version}</version>

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Actor.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Actor.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Actor.java
index 562b075..739b53c 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Actor.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Actor.java
@@ -25,11 +25,11 @@ public interface Actor extends javax.ejb.EJBLocalObject {
 
     void setId(Integer id);
 
-    String getFirstName();
+    String getFirstname();
 
-    void setFirstName(String director);
+    void setFirstname(String firstname);
 
-    String getLastName();
+    String getLastname();
 
-    void setLastName(String title);
+    void setLastname(String lastname);
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
index 70f0d23..3ac4087 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
@@ -24,8 +24,8 @@ public abstract class ActorBean implements EntityBean {
     }
 
     public Integer ejbCreate(final String firstName, final String lastName) {
-        this.setFirstName(firstName);
-        this.setLastName(lastName);
+        this.setFirstname(firstName);
+        this.setLastname(lastName);
         return null;
     }
 
@@ -33,13 +33,13 @@ public abstract class ActorBean implements EntityBean {
 
     public abstract void setId(Integer id);
 
-    public abstract String getFirstName();
+    public abstract String getFirstname();
 
-    public abstract void setFirstName(String firstName);
+    public abstract void setFirstname(String firstname);
 
-    public abstract String getLastName();
+    public abstract String getLastname();
 
-    public abstract void setLastName(String lastName);
+    public abstract void setLastname(String lastname);
 
 
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorLocalHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorLocalHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorLocalHome.java
index a8f7dd0..9878d6f 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorLocalHome.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorLocalHome.java
@@ -30,4 +30,5 @@ interface ActorLocalHome extends javax.ejb.EJBLocalHome {
     Actor findByPrimaryKey(Integer primarykey) throws FinderException;
 
     Collection findAll() throws FinderException;
+
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorVO.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorVO.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorVO.java
deleted file mode 100644
index a3c1a1d..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorVO.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-import java.io.Serializable;
-
-public class ActorVO implements Serializable {
-
-    private Integer id;
-    private String firstName;
-    private String lastName;
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getFirstName() {
-        return firstName;
-    }
-
-    public void setFirstName(String firstName) {
-        this.firstName = firstName;
-    }
-
-    public String getLastName() {
-        return lastName;
-    }
-
-    public void setLastName(String lastName) {
-        this.lastName = lastName;
-    }
-
-    public static ActorVO from (final Actor actor) {
-        final ActorVO actorVO = new ActorVO();
-        actorVO.setId(actor.getId());
-        actorVO.setFirstName(actor.getFirstName());
-        actorVO.setLastName(actor.getLastName());
-
-        return actorVO;
-    }
-
-    @Override
-    public String toString() {
-        return "ActorVO{" +
-                "id=" + id +
-                ", firstName='" + firstName + '\'' +
-                ", lastName='" + lastName + '\'' +
-                '}';
-    }
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
index 138ba53..7a706f3 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
@@ -42,10 +42,8 @@ public class CustomOrmXmlTest {
     @Deployment(testable = false)
     public static WebArchive createDeployment() {
         WebArchive archive = ShrinkWrap.create(WebArchive.class, CustomOrmXmlTest.class.getSimpleName() + ".war")
-                .addClasses(MovieServlet.class, Movie.class, MovieBean.class, MovieException.class, MovieLocalHome.class, MoviesBusinessBean.class,
-                        MoviesBusinessLocal.class, MoviesBusinessLocalHome.class, MovieVO.class, ActorBean.class, ActorLocalHome.class, Actor.class)
-                .addAsResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml"), "META-INF/custom-orm.xml")
-                .addAsResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml"), "META-INF/persistence.xml")
+                .addClasses(MovieServlet.class, MovieException.class, MoviesBusinessBean.class,
+                        MoviesBusinessLocal.class, MoviesBusinessLocalHome.class, ActorBean.class, ActorLocalHome.class, Actor.class)
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml"), "openejb-jar.xml")
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml"), "ejb-jar.xml")
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/web.xml"), "web.xml");

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Movie.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Movie.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Movie.java
deleted file mode 100644
index 1ff9285..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Movie.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-import java.util.Collection;
-
-/**
- * @version $Revision$ $Date$
- */
-public interface Movie extends javax.ejb.EJBLocalObject {
-
-    java.lang.Integer getId();
-
-    void setId(java.lang.Integer id);
-
-    String getDirector();
-
-    void setDirector(String director);
-
-    String getTitle();
-
-    void setTitle(String title);
-
-    int getYear();
-
-    void setYear(int year);
-
-    void addActor(String firstName, String lastName);
-
-    Collection getActorVO();
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
deleted file mode 100644
index edee309..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-import javax.ejb.CreateException;
-import javax.ejb.EJBException;
-import javax.ejb.EntityBean;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-public abstract class MovieBean implements EntityBean {
-
-    public MovieBean() {
-    }
-
-    public Integer ejbCreate(final String director, String title, final int year) {
-        this.setDirector(director);
-        this.setTitle(title);
-        this.setYear(year);
-        return null;
-    }
-
-    public abstract java.lang.Integer getId();
-
-    public abstract void setId(java.lang.Integer id);
-
-    public abstract String getDirector();
-
-    public abstract void setDirector(String director);
-
-    public abstract String getTitle();
-
-    public abstract void setTitle(String title);
-
-    public abstract int getYear();
-
-    public abstract void setYear(int year);
-
-    public abstract Collection getActors();
-
-    public abstract void setActors(Collection actors);
-
-    public void addActor(String firstName, String lastName) {
-        try {
-            final InitialContext context = new InitialContext();
-
-            final ActorLocalHome actorBean = (ActorLocalHome) context.lookup("java:comp/env/ejb/ActorBean");
-            final Actor actor = actorBean.create(firstName, lastName);
-
-            final Collection actors = this.getActors();
-            actors.add(actor);
-
-        } catch (NamingException | CreateException e) {
-            throw new EJBException(e);
-        }
-    }
-
-    public Collection getActorVO() {
-        List result = new ArrayList();
-
-        final Collection actors = this.getActors();
-        final Iterator iterator = actors.iterator();
-
-        while (iterator.hasNext()) {
-            Actor actor = (Actor) iterator.next();
-            result.add(ActorVO.from(actor));
-        }
-
-        return result;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieLocalHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieLocalHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieLocalHome.java
deleted file mode 100644
index dfcf910..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieLocalHome.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-import javax.ejb.CreateException;
-import javax.ejb.FinderException;
-import java.util.Collection;
-
-/**
- * @version $Revision$ $Date$
- */
-interface MovieLocalHome extends javax.ejb.EJBLocalHome {
-
-    Movie create(String director, String title, int year) throws CreateException;
-
-    Movie findByPrimaryKey(Integer primarykey) throws FinderException;
-
-    Collection<Movie> findAll() throws FinderException;
-
-    Collection<Movie> findByDirector(String director) throws FinderException;
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
index 9610abf..730e78d 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
@@ -27,8 +27,6 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.io.PrintWriter;
-import java.util.Collection;
-import java.util.Iterator;
 
 public class MovieServlet extends HttpServlet {
 
@@ -54,23 +52,8 @@ public class MovieServlet extends HttpServlet {
 
             final MoviesBusinessLocal bean = home.create();
 
-            final int id = bean.addMovie("Bad Boys", "Michael Bay", 1995);
-            bean.addActor(id, "Will", "Smith");
-            bean.addActor(id, "Martin", "Lawrence");
-
-            pw.println("Movie added successfully");
-
-            final Collection allMovies = bean.findAll();
-
-            final Iterator iterator = allMovies.iterator();
-            while (iterator.hasNext()) {
-                final MovieVO movie = (MovieVO) iterator.next();
-                pw.println(movie.toString());
-
-                bean.delete(movie.getId());
-                pw.println("Movie removed successfully");
-            }
-
+            bean.addActor("Will", "Smith");
+            pw.println("Actor added successfully");
             bean.remove();
             pw.flush();
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieVO.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieVO.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieVO.java
deleted file mode 100644
index d7618dc..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieVO.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-public class MovieVO implements Serializable {
-
-    private Integer id;
-    private String title;
-    private String director;
-    private int year;
-    private List actors = new ArrayList();
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    public String getDirector() {
-        return director;
-    }
-
-    public void setDirector(String director) {
-        this.director = director;
-    }
-
-    public int getYear() {
-        return year;
-    }
-
-    public void setYear(int year) {
-        this.year = year;
-    }
-
-    public Collection getActors() {
-        return actors;
-    }
-
-    public static MovieVO from (final Movie movie) {
-        final MovieVO movieVO = new MovieVO();
-        movieVO.setId(movie.getId());
-        movieVO.setTitle(movie.getTitle());
-        movieVO.setDirector(movie.getDirector());
-        movieVO.setYear(movie.getYear());
-        movieVO.getActors().addAll(movie.getActorVO());
-
-        return movieVO;
-    }
-
-    @Override
-    public String toString() {
-        return "MovieVO{" +
-                "id=" + id +
-                ", title='" + title + '\'' +
-                ", director='" + director + '\'' +
-                ", year=" + year +
-                ", actors=" + actors +
-                '}';
-    }
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
index 2b45cdd..3baa70a 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
@@ -18,18 +18,12 @@ package org.apache.openejb.arquillian.tests.cmp.sample;
 
 import javax.ejb.CreateException;
 import javax.ejb.EJBException;
-import javax.ejb.FinderException;
-import javax.ejb.RemoveException;
 import javax.ejb.SessionBean;
 import javax.ejb.SessionContext;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import javax.rmi.PortableRemoteObject;
 import java.rmi.RemoteException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
 public class MoviesBusinessBean implements SessionBean {
 
     private SessionContext ctx;
@@ -48,81 +42,19 @@ public class MoviesBusinessBean implements SessionBean {
 
     @Override
     public void setSessionContext(final SessionContext ctx) throws EJBException, RemoteException {
-
         this.ctx = ctx;
     }
 
-
-    public int addMovie(final String title, final String director, int year) throws MovieException {
+    public void addActor(final String firstName, final String lastName) throws MovieException {
         try {
             final InitialContext context = new InitialContext();
-            final MovieLocalHome home = (MovieLocalHome)
-                    PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/MovieBean"), MovieLocalHome.class);
 
-            final Movie movie = home.create(director, title, year);
-            return movie.getId();
+            final ActorLocalHome actorLocalHome = (ActorLocalHome)
+                    PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/ActorBean"), ActorLocalHome.class);
 
+            final Actor actor = actorLocalHome.create(firstName, lastName);
         } catch (NamingException | CreateException e) {
             throw new MovieException(e);
         }
     }
-
-    public void addActor(final int movieId, final String firstName, final String lastName) throws MovieException {
-        try {
-            final InitialContext context = new InitialContext();
-            final MovieLocalHome home = (MovieLocalHome)
-                PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/MovieBean"), MovieLocalHome.class);
-
-            final Movie movie = home.findByPrimaryKey(movieId);
-            movie.addActor(firstName, lastName);
-        } catch (NamingException | FinderException e) {
-            throw new MovieException(e);
-        }
-    }
-
-    public MovieVO findByPrimaryKey(final int id) throws MovieException {
-        try {
-            final InitialContext context = new InitialContext();
-            final MovieLocalHome home = (MovieLocalHome)
-                    PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/MovieBean"), MovieLocalHome.class);
-
-
-            return MovieVO.from(home.findByPrimaryKey(id));
-        } catch (NamingException | FinderException e) {
-             throw new MovieException(e);
-        }
-    }
-
-    public Collection findAll() throws MovieException {
-        try {
-            final InitialContext context = new InitialContext();
-            final MovieLocalHome home = (MovieLocalHome)
-                    PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/MovieBean"), MovieLocalHome.class);
-
-            final Collection movies = home.findAll();
-
-            final Collection result = new ArrayList();
-            final Iterator iterator = movies.iterator();
-            while (iterator.hasNext()) {
-                Movie movie = (Movie) iterator.next();
-                result.add(MovieVO.from(movie));
-            }
-
-            return result;
-        } catch (NamingException | FinderException e) {
-            throw new MovieException(e);
-        }
-    }
-
-    public void delete(Integer id) throws MovieException {
-        try {
-            final InitialContext context = new InitialContext();
-            final MovieLocalHome home = (MovieLocalHome)
-                    PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/MovieBean"), MovieLocalHome.class);
-
-            home.remove(id);
-        } catch (NamingException | RemoveException e) {
-            throw new MovieException(e);
-        }
-    }
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
index 40a75f5..a924686 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
@@ -17,13 +17,8 @@
 package org.apache.openejb.arquillian.tests.cmp.sample;
 
 import java.rmi.RemoteException;
-import java.util.Collection;
 
 public interface MoviesBusinessLocal extends javax.ejb.EJBLocalObject {
 
-    int addMovie(final String title, final String director, int year) throws RemoteException, MovieException;
-    int addActor(final int movieId, final String firstName, final String lastName) throws RemoteException, MovieException;
-    Movie findByPrimaryKey(final int id) throws RemoteException, MovieException;
-    Collection findAll() throws RemoteException, MovieException;
-    void delete(Integer id) throws RemoteException, MovieException;
+    int addActor(final String firstName, final String lastName) throws RemoteException, MovieException;
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
deleted file mode 100644
index 49b5e27..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
-
-    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.
--->
-<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" version="1.0">
-    <entity class="openejb.org.apache.openejb.arquillian.tests.cmp.sample.MovieBean" name="MovieBean">
-        <description>CustomOrmXmlTest#MovieBean</description>
-        <table/>
-        <named-query name="MovieBean.findByDirector(java.lang.String)">
-            <query>SELECT m FROM MovieBean m WHERE m.director = ?1</query>
-        </named-query>
-        <named-query name="MovieBean.findAll">
-            <query>SELECT m FROM MovieBean as m</query>
-        </named-query>
-        <attributes>
-            <id name="id">
-                <generated-value strategy="IDENTITY"/>
-            </id>
-            <basic name="director"/>
-            <basic name="year"/>
-            <basic name="title"/>
-            <one-to-many mapped-by="MovieBean_actors" name="actors"/>
-        </attributes>
-    </entity>
-    <entity class="openejb.org.apache.openejb.arquillian.tests.cmp.sample.ActorBean" name="ActorBean">
-        <description>CustomOrmXmlTest#ActorBean</description>
-        <table/>
-        <named-query name="ActorBean.findAll">
-            <query>SELECT a FROM ActorBean as a</query>
-        </named-query>
-        <attributes>
-            <id name="id">
-                <generated-value strategy="IDENTITY"/>
-            </id>
-            <basic name="firstName"/>
-            <basic name="lastName"/>
-            <many-to-one name="MovieBean_actors">
-                <cascade>
-                    <cascade-all/>
-                </cascade>
-            </many-to-one>
-        </attributes>
-    </entity>
-</entity-mappings>

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
index 0ca6a12..556dfc3 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
@@ -33,13 +33,6 @@
       <session-type>Stateless</session-type>
       <transaction-type>Container</transaction-type>
       <ejb-local-ref>
-        <ejb-ref-name>ejb/MovieBean</ejb-ref-name>
-        <ejb-ref-type>Entity</ejb-ref-type>
-        <local-home>org.apache.openejb.arquillian.tests.cmp.sample.MovieLocalHome</local-home>
-        <local>org.apache.openejb.arquillian.tests.cmp.sample.Movie</local>
-        <ejb-link>MovieBean</ejb-link>
-      </ejb-local-ref>
-      <ejb-local-ref>
         <ejb-ref-name>ejb/ActorBean</ejb-ref-name>
         <ejb-ref-type>Entity</ejb-ref-type>
         <local-home>org.apache.openejb.arquillian.tests.cmp.sample.ActorLocalHome</local-home>
@@ -48,46 +41,6 @@
       </ejb-local-ref>
     </session>
     <entity>
-      <ejb-name>MovieBean</ejb-name>
-      <local-home>org.apache.openejb.arquillian.tests.cmp.sample.MovieLocalHome</local-home>
-      <local>org.apache.openejb.arquillian.tests.cmp.sample.Movie</local>
-      <ejb-class>org.apache.openejb.arquillian.tests.cmp.sample.MovieBean</ejb-class>
-      <persistence-type>Container</persistence-type>
-      <prim-key-class>java.lang.Integer</prim-key-class>
-      <reentrant>false</reentrant>
-      <cmp-version>2.x</cmp-version>
-      <abstract-schema-name>MovieBean</abstract-schema-name>
-      <cmp-field>
-        <field-name>id</field-name>
-      </cmp-field>
-      <cmp-field>
-        <field-name>director</field-name>
-      </cmp-field>
-      <cmp-field>
-        <field-name>year</field-name>
-      </cmp-field>
-      <cmp-field>
-        <field-name>title</field-name>
-      </cmp-field>
-      <primkey-field>id</primkey-field>
-      <query>
-        <query-method>
-          <method-name>findByDirector</method-name>
-          <method-params>
-            <method-param>java.lang.String</method-param>
-          </method-params>
-        </query-method>
-        <ejb-ql>SELECT m FROM MovieBean m WHERE m.director = ?1</ejb-ql>
-      </query>
-      <query>
-        <query-method>
-          <method-name>findAll</method-name>
-          <method-params/>
-        </query-method>
-        <ejb-ql>SELECT m FROM MovieBean as m</ejb-ql>
-      </query>
-    </entity>
-    <entity>
       <ejb-name>ActorBean</ejb-name>
       <local-home>org.apache.openejb.arquillian.tests.cmp.sample.ActorLocalHome</local-home>
       <local>org.apache.openejb.arquillian.tests.cmp.sample.Actor</local>
@@ -101,10 +54,10 @@
         <field-name>id</field-name>
       </cmp-field>
       <cmp-field>
-        <field-name>firstName</field-name>
+        <field-name>firstname</field-name>
       </cmp-field>
       <cmp-field>
-        <field-name>lastName</field-name>
+        <field-name>lastname</field-name>
       </cmp-field>
       <primkey-field>id</primkey-field>
       <query>
@@ -116,29 +69,6 @@
       </query>
     </entity>
   </enterprise-beans>
-  <relationships>
-    <ejb-relation>
-      <ejb-relationship-role>
-        <ejb-relationship-role-name>Movie-has-many-actors</ejb-relationship-role-name>
-        <multiplicity>One</multiplicity>
-        <cascade-delete/>
-        <relationship-role-source>
-          <ejb-name>MovieBean</ejb-name>
-        </relationship-role-source>
-        <cmr-field>
-          <cmr-field-name>actors</cmr-field-name>
-          <cmr-field-type>java.util.Collection</cmr-field-type>
-        </cmr-field>
-      </ejb-relationship-role>
-      <ejb-relationship-role>
-        <ejb-relationship-role-name>Actor-acts-in-movie</ejb-relationship-role-name>
-        <multiplicity>Many</multiplicity>
-        <relationship-role-source>
-          <ejb-name>ActorBean</ejb-name>
-        </relationship-role-source>
-      </ejb-relationship-role>
-    </ejb-relation>
-  </relationships>
   <assembly-descriptor>
     <container-transaction>
       <method>
@@ -149,13 +79,6 @@
     </container-transaction>
     <container-transaction>
       <method>
-        <ejb-name>MovieBean</ejb-name>
-        <method-name>*</method-name>
-      </method>
-      <trans-attribute>Supports</trans-attribute>
-    </container-transaction>
-    <container-transaction>
-      <method>
         <ejb-name>ActorBean</ejb-name>
         <method-name>*</method-name>
       </method>

http://git-wip-us.apache.org/repos/asf/tomee/blob/79d386fd/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
deleted file mode 100644
index 88e5765..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
-
-    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.
--->
-<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
-<persistence-unit name="cmp" transaction-type="JTA">
-    <jta-data-source>Default JDBC Database</jta-data-source>
-    <non-jta-data-source>Default Unmanaged JDBC Database</non-jta-data-source>
-    <mapping-file>META-INF/custom-orm.xml</mapping-file>
-    <class>openejb.org.apache.openejb.arquillian.tests.cmp.sample.MovieBean</class>
-    <class>openejb.org.apache.openejb.arquillian.tests.cmp.sample.ActorBean</class>
-    <properties>
-        <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true, Indexes=false, IgnoreErrors=true)"/>
-        <property name="openjpa.Log" value="DefaultLevel=INFO"/>
-        <property name="eclipselink.ddl-generation" value="create-tables"/>
-    </properties>
-</persistence-unit>
-</persistence>
\ No newline at end of file


[17/24] tomee git commit: Finals and formatting

Posted by jg...@apache.org.
Finals and formatting


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

Branch: refs/heads/master
Commit: ff6639ec0d5c38c706e655398b0a1b3c1a91edc4
Parents: cf9d96e
Author: Jonathan Gallimore <jg...@tomitribe.com>
Authored: Wed Dec 5 12:35:58 2018 +0000
Committer: Jonathan Gallimore <jg...@tomitribe.com>
Committed: Wed Dec 5 12:35:58 2018 +0000

----------------------------------------------------------------------
 .../arquillian/tests/cmp/sample/ActorBean.java  |  6 ++---
 .../tests/cmp/sample/ActorDetails.java          |  2 +-
 .../tests/cmp/sample/CustomOrmXmlTest.java      |  2 +-
 .../arquillian/tests/cmp/sample/MovieBean.java  | 28 ++++++++++----------
 .../tests/cmp/sample/MovieDetails.java          |  2 +-
 .../tests/cmp/sample/MoviesBusinessBean.java    | 22 +++++++--------
 .../tests/cmp/sample/MoviesServlet.java         | 14 +++++-----
 7 files changed, 37 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/ff6639ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
index de13f96..5542673 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
@@ -37,15 +37,15 @@ public abstract class ActorBean implements EntityBean {
 
     public abstract void setMovies(Collection movies);
 
-    public String ejbCreate(String name) throws CreateException {
+    public String ejbCreate(final String name) throws CreateException {
         setName(name);
         return null;
     }
 
-    public void ejbPostCreate(String name) throws CreateException {
+    public void ejbPostCreate(final String name) throws CreateException {
     }
 
-    public void setEntityContext(EntityContext ctx) {
+    public void setEntityContext(final EntityContext ctx) {
         context = ctx;
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/ff6639ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorDetails.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorDetails.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorDetails.java
index d95debf..23c1ce5 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorDetails.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorDetails.java
@@ -20,7 +20,7 @@ public class ActorDetails implements java.io.Serializable {
     private Integer id;
     private String name;
 
-    public ActorDetails(Integer id, String name) {
+    public ActorDetails(final Integer id, final String name) {
         this.id = id;
         this.name = name;
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/ff6639ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
index e23521a..ce87196 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
@@ -40,7 +40,7 @@ public class CustomOrmXmlTest {
 
     @Deployment(testable = false)
     public static WebArchive createDeployment() {
-        WebArchive archive = ShrinkWrap.create(WebArchive.class, CustomOrmXmlTest.class.getSimpleName() + ".war")
+        final WebArchive archive = ShrinkWrap.create(WebArchive.class, CustomOrmXmlTest.class.getSimpleName() + ".war")
                 .addClasses(ActorBean.class, ActorDetails.class, LocalActor.class, LocalActorHome.class,
                         LocalMovie.class, LocalMovieHome.class, MovieBean.class, MovieDetails.class,
                         MoviesBusiness.class, MoviesBusinessBean.class, MoviesBusinessHome.class,

http://git-wip-us.apache.org/repos/asf/tomee/blob/ff6639ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
index 88f69da..f200bdb 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
@@ -45,14 +45,14 @@ public abstract class MovieBean implements EntityBean {
     public abstract void setActors(Collection actors);
 
     public ArrayList getCopyOfActors() {
-        ArrayList actorList = new ArrayList();
-        Collection actors = getActors();
+        final ArrayList actorList = new ArrayList();
+        final Collection actors = getActors();
 
-        Iterator i = actors.iterator();
+        final Iterator i = actors.iterator();
 
         while (i.hasNext()) {
-            LocalActor actor = (LocalActor) i.next();
-            ActorDetails details =
+            final LocalActor actor = (LocalActor) i.next();
+            final ActorDetails details =
                 new ActorDetails(actor.getActorId(), actor.getName());
 
             actorList.add(details);
@@ -61,27 +61,27 @@ public abstract class MovieBean implements EntityBean {
         return actorList;
     }
 
-    public void addActor(LocalActor player) {
+    public void addActor(final LocalActor player) {
         try {
-            Collection actors = getActors();
+            final Collection actors = getActors();
 
             actors.add(player);
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             throw new EJBException(ex.getMessage());
         }
     }
 
-    public void removeActor(LocalActor actor) {
+    public void removeActor(final LocalActor actor) {
         try {
-            Collection players = getActors();
+            final Collection players = getActors();
 
             players.remove(actor);
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             throw new EJBException(ex.getMessage());
         }
     }
 
-    public String ejbCreate(String name, String genre)
+    public String ejbCreate(final String name, final String genre)
         throws CreateException {
         setName(name);
         setGenre(genre);
@@ -89,11 +89,11 @@ public abstract class MovieBean implements EntityBean {
         return null;
     }
 
-    public void ejbPostCreate(String name, String genre)
+    public void ejbPostCreate(final String name, final String genre)
         throws CreateException {
     }
 
-    public void setEntityContext(EntityContext ctx) {
+    public void setEntityContext(final EntityContext ctx) {
         context = ctx;
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/ff6639ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieDetails.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieDetails.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieDetails.java
index f08c257..84fe131 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieDetails.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieDetails.java
@@ -21,7 +21,7 @@ public class MovieDetails implements java.io.Serializable {
     private String name;
     private String genre;
 
-    public MovieDetails(String id, String name, String genre) {
+    public MovieDetails(final String id, final String name, final String genre) {
         this.id = id;
         this.name = name;
         this.genre = genre;

http://git-wip-us.apache.org/repos/asf/tomee/blob/ff6639ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
index 43c8667..9227dbf 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
@@ -29,12 +29,12 @@ import javax.naming.InitialContext;
 public class MoviesBusinessBean implements SessionBean {
     public void doLogic() {
         try {
-            Context initial = new InitialContext();
+            final Context initial = new InitialContext();
 
-            LocalActorHome actorHome = (LocalActorHome) initial.lookup("java:comp/env/ejb/Actor");
-            Context initial1 = new InitialContext();
+            final LocalActorHome actorHome = (LocalActorHome) initial.lookup("java:comp/env/ejb/Actor");
+            final Context initial1 = new InitialContext();
 
-            LocalMovieHome movieHome = (LocalMovieHome) initial1.lookup("java:comp/env/ejb/Movie");
+            final LocalMovieHome movieHome = (LocalMovieHome) initial1.lookup("java:comp/env/ejb/Movie");
 
             final LocalMovie movie = movieHome.create("Bad Boys", "Action Comedy");
 
@@ -43,7 +43,7 @@ public class MoviesBusinessBean implements SessionBean {
 
             movie.addActor(actor1);
             movie.addActor(actor2);
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             throw new EJBException(ex.getMessage());
         }
     }
@@ -60,16 +60,16 @@ public class MoviesBusinessBean implements SessionBean {
     public void ejbRemove() {
     }
 
-    public void setSessionContext(SessionContext sc) {
+    public void setSessionContext(final SessionContext sc) {
     }
 
-    private ArrayList copyActorsToDetails(Collection actors) {
-        ArrayList detailsList = new ArrayList();
-        Iterator i = actors.iterator();
+    private ArrayList copyActorsToDetails(final Collection actors) {
+        final ArrayList detailsList = new ArrayList();
+        final Iterator i = actors.iterator();
 
         while (i.hasNext()) {
-            LocalActor player = (LocalActor) i.next();
-            ActorDetails details =
+            final LocalActor player = (LocalActor) i.next();
+            final ActorDetails details =
                 new ActorDetails(player.getActorId(), player.getName());
 
             detailsList.add(details);

http://git-wip-us.apache.org/repos/asf/tomee/blob/ff6639ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
index 983294c..54f0893 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
@@ -30,19 +30,17 @@ import javax.servlet.http.HttpServletResponse;
 public class MoviesServlet extends HttpServlet {
 
     @Override
-    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+    protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
         try {
-            Context initial = new InitialContext();
-            Object objref = initial.lookup("java:comp/env/ejb/MoviesBusiness");
+            final Context initial = new InitialContext();
 
-            MoviesBusinessHome home =
-                    (MoviesBusinessHome) PortableRemoteObject.narrow(objref,
-                            MoviesBusinessHome.class);
+            final MoviesBusinessHome home = (MoviesBusinessHome)
+                    PortableRemoteObject.narrow(initial.lookup("java:comp/env/ejb/MoviesBusiness"), MoviesBusinessHome.class);
 
-            MoviesBusiness moviesBusiness = home.create();
+            final MoviesBusiness moviesBusiness = home.create();
             moviesBusiness.doLogic();
 
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             throw new ServletException(ex);
         }
     }


[16/24] tomee git commit: TOMEE-2295 working sample

Posted by jg...@apache.org.
TOMEE-2295 working sample


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

Branch: refs/heads/master
Commit: cf9d96ea1fba93ecd2decae10893d816372933b2
Parents: 5e97234
Author: Jonathan Gallimore <jg...@tomitribe.com>
Authored: Wed Dec 5 10:57:42 2018 +0000
Committer: Jonathan Gallimore <jg...@tomitribe.com>
Committed: Wed Dec 5 10:57:42 2018 +0000

----------------------------------------------------------------------
 .../arquillian/tests/cmp/sample/ActorBean.java  |  70 ++++++++++
 .../tests/cmp/sample/ActorDetails.java          |  39 ++++++
 .../tests/cmp/sample/CustomOrmXmlTest.java      |  13 +-
 .../arquillian/tests/cmp/sample/LocalActor.java |  29 ++++
 .../tests/cmp/sample/LocalActorHome.java        |  31 ++++
 .../arquillian/tests/cmp/sample/LocalMovie.java |  39 ++++++
 .../tests/cmp/sample/LocalMovieHome.java        |  33 +++++
 .../arquillian/tests/cmp/sample/MovieBean.java  | 118 ++++++++++++++++
 .../tests/cmp/sample/MovieDetails.java          |  45 ++++++
 .../tests/cmp/sample/MovieException.java        |  35 -----
 .../tests/cmp/sample/MovieServlet.java          |  64 ---------
 .../tests/cmp/sample/MoviesBusiness.java        |  25 ++++
 .../tests/cmp/sample/MoviesBusinessBean.java    |  76 +++++++---
 .../tests/cmp/sample/MoviesBusinessHome.java    |  27 ++++
 .../tests/cmp/sample/MoviesBusinessLocal.java   |  24 ----
 .../cmp/sample/MoviesBusinessLocalHome.java     |  26 ----
 .../tests/cmp/sample/MoviesServlet.java         |  50 +++++++
 .../arquillian/tests/cmp/sample/ejb-jar.xml     | 140 +++++++++++++++++--
 .../arquillian/tests/cmp/sample/openejb-jar.xml |  32 ++++-
 .../openejb/arquillian/tests/cmp/sample/web.xml |  14 +-
 20 files changed, 734 insertions(+), 196 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
new file mode 100644
index 0000000..de13f96
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
@@ -0,0 +1,70 @@
+/*
+ * 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.cmp.sample;
+
+import java.util.Collection;
+import javax.ejb.CreateException;
+import javax.ejb.EntityBean;
+import javax.ejb.EntityContext;
+
+
+public abstract class ActorBean implements EntityBean {
+    private EntityContext context;
+
+    public abstract Integer getActorId();
+
+    public abstract void setActorId(Integer id);
+
+    public abstract String getName();
+
+    public abstract void setName(String name);
+
+    public abstract Collection getMovies();
+
+    public abstract void setMovies(Collection movies);
+
+    public String ejbCreate(String name) throws CreateException {
+        setName(name);
+        return null;
+    }
+
+    public void ejbPostCreate(String name) throws CreateException {
+    }
+
+    public void setEntityContext(EntityContext ctx) {
+        context = ctx;
+    }
+
+    public void unsetEntityContext() {
+        context = null;
+    }
+
+    public void ejbRemove() {
+    }
+
+    public void ejbLoad() {
+    }
+
+    public void ejbStore() {
+    }
+
+    public void ejbPassivate() {
+    }
+
+    public void ejbActivate() {
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorDetails.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorDetails.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorDetails.java
new file mode 100644
index 0000000..d95debf
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorDetails.java
@@ -0,0 +1,39 @@
+/*
+ * 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.cmp.sample;
+
+public class ActorDetails implements java.io.Serializable {
+    private Integer id;
+    private String name;
+
+    public ActorDetails(Integer id, String name) {
+        this.id = id;
+        this.name = name;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String toString() {
+        return id + " " + name;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
index c442bcc..e23521a 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
@@ -24,7 +24,6 @@ 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;
 
@@ -42,8 +41,10 @@ public class CustomOrmXmlTest {
     @Deployment(testable = false)
     public static WebArchive createDeployment() {
         WebArchive archive = ShrinkWrap.create(WebArchive.class, CustomOrmXmlTest.class.getSimpleName() + ".war")
-                .addClasses(MovieServlet.class, MovieException.class, MoviesBusinessBean.class,
-                        MoviesBusinessLocal.class, MoviesBusinessLocalHome.class)
+                .addClasses(ActorBean.class, ActorDetails.class, LocalActor.class, LocalActorHome.class,
+                        LocalMovie.class, LocalMovieHome.class, MovieBean.class, MovieDetails.class,
+                        MoviesBusiness.class, MoviesBusinessBean.class, MoviesBusinessHome.class,
+                        MoviesServlet.class)
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml"), "openejb-jar.xml")
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml"), "ejb-jar.xml")
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/web.xml"), "web.xml");
@@ -57,8 +58,8 @@ public class CustomOrmXmlTest {
     public void checkCmpJpaEntityORMMappings() throws Exception {
         final String output = IO.slurp(new URL(url.toExternalForm()));
         System.out.println(output);
-        Assert.assertTrue(output.contains("Movie added successfully"));
-        Assert.assertTrue(output.contains("Movie removed successfully"));
-        Assert.assertTrue(output.contains("title='Bad Boys', director='Michael Bay', year=1995"));
+        //Assert.assertTrue(output.contains("Movie added successfully"));
+        //Assert.assertTrue(output.contains("Movie removed successfully"));
+        //Assert.assertTrue(output.contains("title='Bad Boys', director='Michael Bay', year=1995"));
     }
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalActor.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalActor.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalActor.java
new file mode 100644
index 0000000..26a0daf
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalActor.java
@@ -0,0 +1,29 @@
+/*
+ * 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.cmp.sample;
+
+import java.util.Collection;
+import javax.ejb.EJBLocalObject;
+
+
+public interface LocalActor extends EJBLocalObject {
+    Integer getActorId();
+
+    String getName();
+
+    Collection getMovies();
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalActorHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalActorHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalActorHome.java
new file mode 100644
index 0000000..b86b00b
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalActorHome.java
@@ -0,0 +1,31 @@
+/*
+ * 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.cmp.sample;
+
+import java.util.Collection;
+import javax.ejb.CreateException;
+import javax.ejb.EJBLocalHome;
+import javax.ejb.FinderException;
+
+
+public interface LocalActorHome extends EJBLocalHome {
+    LocalActor create(String name) throws CreateException;
+
+    LocalActor findByPrimaryKey(String id) throws FinderException;
+
+    Collection findAll() throws FinderException;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalMovie.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalMovie.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalMovie.java
new file mode 100644
index 0000000..682926e
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalMovie.java
@@ -0,0 +1,39 @@
+/*
+ * 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.cmp.sample;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import javax.ejb.EJBLocalObject;
+
+
+public interface LocalMovie extends EJBLocalObject {
+    Integer getMovieId();
+
+    String getName();
+
+    String getGenre();
+
+    Collection getActors();
+
+    ArrayList getCopyOfActors();
+
+    void addActor(LocalActor actor);
+
+    void removeActor(LocalActor actor);
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalMovieHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalMovieHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalMovieHome.java
new file mode 100644
index 0000000..fc343a7
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/LocalMovieHome.java
@@ -0,0 +1,33 @@
+/*
+ * 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.cmp.sample;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBLocalHome;
+import javax.ejb.FinderException;
+import java.util.Collection;
+
+
+public interface LocalMovieHome extends EJBLocalHome {
+    LocalMovie create(String name, String genre) throws CreateException;
+
+    LocalMovie findByPrimaryKey(String id) throws FinderException;
+
+    Collection findAll() throws FinderException;
+}
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
new file mode 100644
index 0000000..88f69da
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
@@ -0,0 +1,118 @@
+/*
+ * 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.cmp.sample;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import javax.ejb.CreateException;
+import javax.ejb.EJBException;
+import javax.ejb.EntityBean;
+import javax.ejb.EntityContext;
+
+
+public abstract class MovieBean implements EntityBean {
+    private EntityContext context;
+
+    public abstract Integer getMovieId();
+
+    public abstract void setMovieId(Integer id);
+
+    public abstract String getName();
+
+    public abstract void setName(String name);
+
+    public abstract String getGenre();
+
+    public abstract void setGenre(String city);
+
+    public abstract Collection getActors();
+
+    public abstract void setActors(Collection actors);
+
+    public ArrayList getCopyOfActors() {
+        ArrayList actorList = new ArrayList();
+        Collection actors = getActors();
+
+        Iterator i = actors.iterator();
+
+        while (i.hasNext()) {
+            LocalActor actor = (LocalActor) i.next();
+            ActorDetails details =
+                new ActorDetails(actor.getActorId(), actor.getName());
+
+            actorList.add(details);
+        }
+
+        return actorList;
+    }
+
+    public void addActor(LocalActor player) {
+        try {
+            Collection actors = getActors();
+
+            actors.add(player);
+        } catch (Exception ex) {
+            throw new EJBException(ex.getMessage());
+        }
+    }
+
+    public void removeActor(LocalActor actor) {
+        try {
+            Collection players = getActors();
+
+            players.remove(actor);
+        } catch (Exception ex) {
+            throw new EJBException(ex.getMessage());
+        }
+    }
+
+    public String ejbCreate(String name, String genre)
+        throws CreateException {
+        setName(name);
+        setGenre(genre);
+
+        return null;
+    }
+
+    public void ejbPostCreate(String name, String genre)
+        throws CreateException {
+    }
+
+    public void setEntityContext(EntityContext ctx) {
+        context = ctx;
+    }
+
+    public void unsetEntityContext() {
+        context = null;
+    }
+
+    public void ejbRemove() {
+    }
+
+    public void ejbLoad() {
+    }
+
+    public void ejbStore() {
+    }
+
+    public void ejbPassivate() {
+    }
+
+    public void ejbActivate() {
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieDetails.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieDetails.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieDetails.java
new file mode 100644
index 0000000..f08c257
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieDetails.java
@@ -0,0 +1,45 @@
+/*
+ * 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.cmp.sample;
+
+public class MovieDetails implements java.io.Serializable {
+    private String id;
+    private String name;
+    private String genre;
+
+    public MovieDetails(String id, String name, String genre) {
+        this.id = id;
+        this.name = name;
+        this.genre = genre;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getGenre() {
+        return genre;
+    }
+
+    public String toString() {
+        return id + " " + name + " " + genre;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieException.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieException.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieException.java
deleted file mode 100644
index cdf476c..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-public class MovieException extends Exception {
-
-    public MovieException() {
-    }
-
-    public MovieException(String message) {
-        super(message);
-    }
-
-    public MovieException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    public MovieException(Throwable cause) {
-        super(cause);
-    }
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
deleted file mode 100644
index 213439b..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-import javax.ejb.CreateException;
-import javax.ejb.RemoveException;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.rmi.PortableRemoteObject;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.PrintWriter;
-
-public class MovieServlet extends HttpServlet {
-
-
-    @Override
-    protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
-        process(req, resp);
-    }
-
-    @Override
-    protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
-        process(req, resp);
-    }
-
-    private void process(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
-
-        final PrintWriter pw = resp.getWriter();
-
-        try {
-            final InitialContext context = new InitialContext();
-            final MoviesBusinessLocalHome home = (MoviesBusinessLocalHome)
-                    PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/MoviesBusiness"), MoviesBusinessLocalHome.class);
-
-            final MoviesBusinessLocal bean = home.create();
-
-            bean.addActor("Will Smith");
-            pw.println("Person added successfully");
-            bean.remove();
-            pw.flush();
-
-        } catch (NamingException | CreateException | RemoveException | MovieException e) {
-            throw new ServletException(e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusiness.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusiness.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusiness.java
new file mode 100644
index 0000000..2ec73b3
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusiness.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.cmp.sample;
+
+import javax.ejb.EJBObject;
+import java.rmi.RemoteException;
+
+
+public interface MoviesBusiness extends EJBObject {
+    void doLogic() throws RemoteException;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
index e4a9b8e..43c8667 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
@@ -1,48 +1,80 @@
-/**
+/*
  * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.
+ *
+ *     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.cmp.sample;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import javax.ejb.CreateException;
 import javax.ejb.EJBException;
 import javax.ejb.SessionBean;
 import javax.ejb.SessionContext;
-import java.rmi.RemoteException;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
 public class MoviesBusinessBean implements SessionBean {
+    public void doLogic() {
+        try {
+            Context initial = new InitialContext();
+
+            LocalActorHome actorHome = (LocalActorHome) initial.lookup("java:comp/env/ejb/Actor");
+            Context initial1 = new InitialContext();
+
+            LocalMovieHome movieHome = (LocalMovieHome) initial1.lookup("java:comp/env/ejb/Movie");
+
+            final LocalMovie movie = movieHome.create("Bad Boys", "Action Comedy");
+
+            final LocalActor actor1 = actorHome.create("Will Smith");
+            final LocalActor actor2 = actorHome.create("Martin Lawrence");
 
-    private SessionContext ctx;
+            movie.addActor(actor1);
+            movie.addActor(actor2);
+        } catch (Exception ex) {
+            throw new EJBException(ex.getMessage());
+        }
+    }
 
-    @Override
-    public void ejbActivate() throws EJBException, RemoteException {
+    public void ejbCreate() throws CreateException {
     }
 
-    @Override
-    public void ejbPassivate() throws EJBException, RemoteException {
+    public void ejbActivate() {
     }
 
-    @Override
-    public void ejbRemove() throws EJBException, RemoteException {
+    public void ejbPassivate() {
     }
 
-    @Override
-    public void setSessionContext(final SessionContext ctx) throws EJBException, RemoteException {
-        this.ctx = ctx;
+    public void ejbRemove() {
     }
 
-    public void addActor(final String name) throws MovieException {
-        // this is literally a no-op now
+    public void setSessionContext(SessionContext sc) {
     }
 
+    private ArrayList copyActorsToDetails(Collection actors) {
+        ArrayList detailsList = new ArrayList();
+        Iterator i = actors.iterator();
+
+        while (i.hasNext()) {
+            LocalActor player = (LocalActor) i.next();
+            ActorDetails details =
+                new ActorDetails(player.getActorId(), player.getName());
+
+            detailsList.add(details);
+        }
+
+        return detailsList;
+    }
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessHome.java
new file mode 100644
index 0000000..6898c96
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessHome.java
@@ -0,0 +1,27 @@
+/*
+ * 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.cmp.sample;
+
+import java.rmi.RemoteException;
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+
+public interface MoviesBusinessHome extends EJBHome {
+    MoviesBusiness create() throws RemoteException, CreateException;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
deleted file mode 100644
index 3e458a7..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-import java.rmi.RemoteException;
-
-public interface MoviesBusinessLocal extends javax.ejb.EJBLocalObject {
-
-    int addActor(final String name) throws RemoteException, MovieException;
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocalHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocalHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocalHome.java
deleted file mode 100644
index a7181b9..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocalHome.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-import javax.ejb.CreateException;
-import java.rmi.RemoteException;
-
-public interface MoviesBusinessLocalHome extends javax.ejb.EJBLocalHome {
-
-    MoviesBusinessLocal create() throws RemoteException, CreateException;
-
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
new file mode 100644
index 0000000..983294c
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
@@ -0,0 +1,50 @@
+/*
+ * 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.cmp.sample;
+
+import java.io.IOException;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+public class MoviesServlet extends HttpServlet {
+
+    @Override
+    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+        try {
+            Context initial = new InitialContext();
+            Object objref = initial.lookup("java:comp/env/ejb/MoviesBusiness");
+
+            MoviesBusinessHome home =
+                    (MoviesBusinessHome) PortableRemoteObject.narrow(objref,
+                            MoviesBusinessHome.class);
+
+            MoviesBusiness moviesBusiness = home.create();
+            moviesBusiness.doLogic();
+
+        } catch (Exception ex) {
+            throw new ServletException(ex);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
index cb5f047..8b39053 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
@@ -16,28 +16,146 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
+<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         version="3.1"
-         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd">
-
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+  <display-name>RosterJAR</display-name>
   <enterprise-beans>
     <session>
-      <description>
-        A service that handles movie entities.
-      </description>
-      <ejb-name>MovieBusinessBean</ejb-name>
-      <local-home>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessLocalHome</local-home>
-      <local>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessLocal</local>
+      <ejb-name>RosterBean</ejb-name>
+      <home>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessHome</home>
+      <remote>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusiness</remote>
       <ejb-class>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessBean</ejb-class>
       <session-type>Stateless</session-type>
       <transaction-type>Container</transaction-type>
+      <ejb-local-ref>
+        <ejb-ref-name>ejb/Actor</ejb-ref-name>
+        <ejb-ref-type>Entity</ejb-ref-type>
+        <local-home>org.apache.openejb.arquillian.tests.cmp.sample.LocalActorHome</local-home>
+        <local>org.apache.openejb.arquillian.tests.cmp.sample.LocalActor</local>
+        <ejb-link>ActorBean</ejb-link>
+      </ejb-local-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>ejb/Movie</ejb-ref-name>
+        <ejb-ref-type>Entity</ejb-ref-type>
+        <local-home>org.apache.openejb.arquillian.tests.cmp.sample.LocalMovieHome</local-home>
+        <local>org.apache.openejb.arquillian.tests.cmp.sample.LocalMovie</local>
+        <ejb-link>MovieBean</ejb-link>
+      </ejb-local-ref>
+      <security-identity>
+        <use-caller-identity/>
+      </security-identity>
     </session>
+    <entity>
+      <ejb-name>MovieBean</ejb-name>
+      <local-home>org.apache.openejb.arquillian.tests.cmp.sample.LocalMovieHome</local-home>
+      <local>org.apache.openejb.arquillian.tests.cmp.sample.LocalMovie</local>
+      <ejb-class>org.apache.openejb.arquillian.tests.cmp.sample.MovieBean</ejb-class>
+      <persistence-type>Container</persistence-type>
+      <prim-key-class>java.lang.Integer</prim-key-class>
+      <reentrant>false</reentrant>
+      <cmp-version>2.x</cmp-version>
+      <abstract-schema-name>Movie</abstract-schema-name>
+      <cmp-field>
+        <description>no description</description>
+        <field-name>movieId</field-name>
+      </cmp-field>
+      <cmp-field>
+        <description>no description</description>
+        <field-name>name</field-name>
+      </cmp-field>
+      <cmp-field>
+        <description>no description</description>
+        <field-name>genre</field-name>
+      </cmp-field>
+      <primkey-field>movieId</primkey-field>
+      <security-identity>
+        <use-caller-identity/>
+      </security-identity>
+      <query>
+        <query-method>
+          <method-name>findAll</method-name>
+          <method-params/>
+        </query-method>
+        <ejb-ql>select object(m) from Movie m</ejb-ql>
+      </query>
+    </entity>
+    <entity>
+      <ejb-name>ActorBean</ejb-name>
+      <local-home>org.apache.openejb.arquillian.tests.cmp.sample.LocalActorHome</local-home>
+      <local>org.apache.openejb.arquillian.tests.cmp.sample.LocalActor</local>
+      <ejb-class>org.apache.openejb.arquillian.tests.cmp.sample.ActorBean</ejb-class>
+      <persistence-type>Container</persistence-type>
+      <prim-key-class>java.lang.Integer</prim-key-class>
+      <reentrant>false</reentrant>
+      <cmp-version>2.x</cmp-version>
+      <abstract-schema-name>Actor</abstract-schema-name>
+      <cmp-field>
+        <description>no description</description>
+        <field-name>actorId</field-name>
+      </cmp-field>
+      <cmp-field>
+        <description>no description</description>
+        <field-name>name</field-name>
+      </cmp-field>
+      <primkey-field>actorId</primkey-field>
+      <security-identity>
+        <use-caller-identity/>
+      </security-identity>
+      <query>
+        <query-method>
+          <method-name>findAll</method-name>
+          <method-params/>
+        </query-method>
+        <ejb-ql>select object(a) from Actor a</ejb-ql>
+      </query>
+    </entity>
   </enterprise-beans>
+  <relationships>
+    <ejb-relation>
+      <ejb-relationship-role>
+        <multiplicity>Many</multiplicity>
+        <relationship-role-source>
+          <ejb-name>ActorBean</ejb-name>
+        </relationship-role-source>
+        <cmr-field>
+          <cmr-field-name>movies</cmr-field-name>
+          <cmr-field-type>java.util.Collection</cmr-field-type>
+        </cmr-field>
+      </ejb-relationship-role>
+      <ejb-relationship-role>
+        <multiplicity>Many</multiplicity>
+        <relationship-role-source>
+          <ejb-name>MovieBean</ejb-name>
+        </relationship-role-source>
+        <cmr-field>
+          <cmr-field-name>actors</cmr-field-name>
+          <cmr-field-type>java.util.Collection</cmr-field-type>
+        </cmr-field>
+      </ejb-relationship-role>
+    </ejb-relation>
+  </relationships>
   <assembly-descriptor>
     <container-transaction>
       <method>
-        <ejb-name>MovieBusinessBean</ejb-name>
+        <ejb-name>RosterBean</ejb-name>
+        <method-intf>Remote</method-intf>
+        <method-name>*</method-name>
+      </method>
+      <trans-attribute>Required</trans-attribute>
+    </container-transaction>
+    <container-transaction>
+      <method>
+        <ejb-name>MovieBean</ejb-name>
+        <method-intf>Local</method-intf>
+        <method-name>*</method-name>
+      </method>
+      <trans-attribute>Required</trans-attribute>
+    </container-transaction>
+    <container-transaction>
+      <method>
+        <ejb-name>ActorBean</ejb-name>
+        <method-intf>Local</method-intf>
         <method-name>*</method-name>
       </method>
       <trans-attribute>Required</trans-attribute>

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
index 166128c..b6ab94d 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
@@ -1,4 +1,34 @@
 <?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.
+-->
 <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
-    <enterprise-beans/>
+    <enterprise-beans>
+        <entity>
+            <ejb-name>MovieBean</ejb-name>
+            <key-generator xmlns="http://www.openejb.org/xml/ns/pkgen-2.1">
+                <uuid/>
+            </key-generator>
+        </entity>
+        <entity>
+            <ejb-name>ActorBean</ejb-name>
+            <key-generator xmlns="http://www.openejb.org/xml/ns/pkgen-2.1">
+                <uuid/>
+            </key-generator>
+        </entity>
+    </enterprise-beans>
 </openejb-jar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/cf9d96ea/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
index 6d55e75..a536e17 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
@@ -24,19 +24,19 @@
          id="WebApp_ID" version="2.5">
 
     <servlet>
-        <servlet-name>MovieServlet</servlet-name>
-        <servlet-class>org.apache.openejb.arquillian.tests.cmp.sample.MovieServlet</servlet-class>
+        <servlet-name>RosterServlet</servlet-name>
+        <servlet-class>org.apache.openejb.arquillian.tests.cmp.sample.MoviesServlet</servlet-class>
     </servlet>
 
     <servlet-mapping>
-        <servlet-name>MovieServlet</servlet-name>
+        <servlet-name>RosterServlet</servlet-name>
         <url-pattern>/*</url-pattern>
     </servlet-mapping>
 
-    <ejb-local-ref>
+    <ejb-ref>
         <ejb-ref-name>ejb/MoviesBusiness</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
-        <local-home>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessLocalHome</local-home>
-        <local>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessLocal</local>
-    </ejb-local-ref>
+        <home>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessHome</home>
+        <remote>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusiness</remote>
+    </ejb-ref>
 </web-app>
\ No newline at end of file


[03/24] tomee git commit: TOMEE-2295 PMD

Posted by jg...@apache.org.
TOMEE-2295 PMD


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

Branch: refs/heads/master
Commit: a220243932db5968a78d6a08c7ab238b350b368b
Parents: ddbae44
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Wed Nov 28 20:00:45 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Wed Nov 28 20:00:45 2018 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/openejb/config/CmpJpaConversion.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/a2202439/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java b/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
index 194bbd9..eca9896 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
@@ -134,7 +134,7 @@ public class CmpJpaConversion implements DynamicDeployer {
         // check for an existing "cmp" persistence unit, and look at existing mappings
         final PersistenceUnit cmpPersistenceUnit = findCmpPersistenceUnit(appModule);
         if (cmpPersistenceUnit != null) {
-            if (cmpPersistenceUnit.getMappingFile() != null || cmpPersistenceUnit.getMappingFile().size() > 0) {
+            if (cmpPersistenceUnit.getMappingFile() != null && cmpPersistenceUnit.getMappingFile().size() > 0) {
                 for (final String mappingFile : cmpPersistenceUnit.getMappingFile()) {
                     final EntityMappings entityMappings = readEntityMappings(mappingFile);
                     if (entityMappings != null) {


[04/24] tomee git commit: Merge branch 'master' into cmp-jpa

Posted by jg...@apache.org.
Merge branch 'master' into cmp-jpa


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

Branch: refs/heads/master
Commit: 017cac6db4bd4c8bd93c690e24ff6bf7e64977ea
Parents: a220243 f2f2808
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Thu Nov 29 09:49:17 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Thu Nov 29 09:49:17 2018 +0000

----------------------------------------------------------------------
 examples/mp-metrics-counted/pom.xml             |  26 ++-
 .../org/superbiz/rest/WeatherServiceTest.java   |  75 ++++---
 examples/mp-metrics-timed/README.md             | 151 +++++++++++++
 examples/mp-metrics-timed/pom.xml               |  88 ++++++++
 .../src/main/java/WeatherService.java           |  42 ++++
 .../src/test/java/WeatherServiceTest.java       | 215 +++++++++++++++++++
 .../src/test/resources/arquillian.xml           |  30 +++
 examples/pom.xml                                |   1 +
 8 files changed, 596 insertions(+), 32 deletions(-)
----------------------------------------------------------------------



[19/24] tomee git commit: TOMEE-2295 add custom mapping back

Posted by jg...@apache.org.
TOMEE-2295 add custom mapping back


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

Branch: refs/heads/master
Commit: 1ba03751cc9962bf9e06d6830642bec3291808b3
Parents: 7b8e4fa
Author: Jonathan Gallimore <jg...@tomitribe.com>
Authored: Wed Dec 5 13:55:47 2018 +0000
Committer: Jonathan Gallimore <jg...@tomitribe.com>
Committed: Wed Dec 5 13:55:47 2018 +0000

----------------------------------------------------------------------
 .../arquillian-tomee-webprofile-tests/pom.xml   | 50 +-----------------
 .../tests/cmp/sample/CustomOrmXmlTest.java      |  2 +
 .../arquillian/tests/cmp/sample/custom-orm.xml  | 54 ++++++++++++++++++++
 .../arquillian/tests/cmp/sample/persistence.xml | 31 +++++++++++
 4 files changed, 88 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/1ba03751/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/pom.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/pom.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/pom.xml
index b37cdbb..b2c9a86 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/pom.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/pom.xml
@@ -52,54 +52,6 @@
   <build>
     <plugins>
       <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.21.0</version>
-        <executions>
-          <execution>
-            <id>default-test</id>
-            <phase>test</phase>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <configuration>
-              <skip>true</skip>
-              <parallel>none</parallel>
-              <threadCount>1</threadCount>
-              <reuseForks>true</reuseForks>
-              <trimStackTrace>false</trimStackTrace>
-            </configuration>
-          </execution>
-          <execution>
-            <id>test-tomee-embedded</id>
-            <phase>test</phase>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <configuration>
-              <skip>${maven.test.skip}</skip>
-              <!--<argLine>-javaagent:${settings.localRepository}/org/apache/tomee/openejb-javaagent/8.0.0-SNAPSHOT/openejb-javaagent-8.0.0-SNAPSHOT.jar -agentpath:/Users/jgallimore/tmp/libtracknpe.so</argLine>-->
-              <argLine>-javaagent:${settings.localRepository}/org/apache/tomee/openejb-javaagent/8.0.0-SNAPSHOT/openejb-javaagent-8.0.0-SNAPSHOT.jar</argLine>
-              <systemPropertyVariables>
-                <tomee.version>8.0.0-SNAPSHOT</tomee.version>
-                <arquillian.launch>tomee-embedded</arquillian.launch>
-                <openejb.arquillian.adapter>tomee-embedded</openejb.arquillian.adapter>
-              </systemPropertyVariables>
-              <parallel>none</parallel>
-              <threadCount>1</threadCount>
-              <reuseForks>true</reuseForks>
-              <trimStackTrace>false</trimStackTrace>
-            </configuration>
-          </execution>
-        </executions>
-        <configuration>
-          <skip>true</skip>
-          <parallel>none</parallel>
-          <threadCount>1</threadCount>
-          <reuseForks>true</reuseForks>
-          <trimStackTrace>false</trimStackTrace>
-        </configuration>
-      </plugin>
-      <plugin>
         <groupId>org.apache.openjpa</groupId>
         <artifactId>openjpa-maven-plugin</artifactId>
         <version>${openjpa.version}</version>
@@ -144,4 +96,4 @@
       </plugin>
     </plugins>
   </build>
-</project>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/1ba03751/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
index ce87196..f261015 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
@@ -45,6 +45,8 @@ public class CustomOrmXmlTest {
                         LocalMovie.class, LocalMovieHome.class, MovieBean.class, MovieDetails.class,
                         MoviesBusiness.class, MoviesBusinessBean.class, MoviesBusinessHome.class,
                         MoviesServlet.class)
+                .addAsResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml"), "META-INF/custom-orm.xml")
+                .addAsResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml"), "META-INF/persistence.xml")
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml"), "openejb-jar.xml")
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml"), "ejb-jar.xml")
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/web.xml"), "web.xml");

http://git-wip-us.apache.org/repos/asf/tomee/blob/1ba03751/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
new file mode 100644
index 0000000..22dbae5
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+    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.
+-->
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" version="1.0">
+    <entity class="openejb.org.apache.openejb.arquillian.tests.cmp.sample.Movie" name="Movie">
+        <description>CustomOrmXmlTest#MovieBean</description>
+        <table/>
+        <named-query name="Movie.findAll">
+            <query>select object(m) from Movie m</query>
+        </named-query>
+        <attributes>
+            <id name="movieId">
+                <generated-value strategy="IDENTITY"/>
+            </id>
+            <basic name="name">
+                <column name="movie_name" length="250"/>
+            </basic>
+            <basic name="genre"/>
+            <many-to-many mapped-by="movies" name="actors"/>
+        </attributes>
+    </entity>
+    <entity class="openejb.org.apache.openejb.arquillian.tests.cmp.sample.Actor" name="Actor">
+        <description>CustomOrmXmlTest#ActorBean</description>
+        <table/>
+        <named-query name="Actor.findAll">
+            <query>select object(a) from Actor a</query>
+        </named-query>
+        <attributes>
+            <id name="actorId">
+                <generated-value strategy="IDENTITY"/>
+            </id>
+            <basic name="name">
+                <column name="actor_name" length="250"/>
+            </basic>
+            <many-to-many name="movies"/>
+        </attributes>
+    </entity>
+</entity-mappings>
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/1ba03751/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
new file mode 100644
index 0000000..d184dd9
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+    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.
+-->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+    <persistence-unit name="cmp" transaction-type="JTA">
+        <jta-data-source>Default JDBC Database</jta-data-source>
+        <non-jta-data-source>Default Unmanaged JDBC Database</non-jta-data-source>
+        <mapping-file>META-INF/custom-orm.xml</mapping-file>
+        <class>openejb.org.apache.openejb.arquillian.tests.cmp.sample.Movie</class>
+        <class>openejb.org.apache.openejb.arquillian.tests.cmp.sample.Actor</class>
+        <properties>
+            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true, Indexes=false, IgnoreErrors=true)"/>
+            <property name="openjpa.Log" value="DefaultLevel=INFO"/>
+        </properties>
+    </persistence-unit>
+</persistence>


[05/24] tomee git commit: TOMEE-2295 use single class imports

Posted by jg...@apache.org.
TOMEE-2295 use single class imports


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

Branch: refs/heads/master
Commit: c8a734467d3addffe206c4711f56d8abd09f56a3
Parents: 017cac6
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Thu Nov 29 10:21:24 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Thu Nov 29 10:21:24 2018 +0000

----------------------------------------------------------------------
 .../org/apache/openejb/config/CmpJpaConversion.java | 16 +++++++++++++++-
 .../apache/openejb/core/LegacyInterfaceTest.java    |  8 +++++++-
 2 files changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/c8a73446/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java b/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
index eca9896..ffe065a 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
@@ -20,7 +20,21 @@ package org.apache.openejb.config;
 import org.apache.openejb.OpenEJBException;
 import org.apache.openejb.core.cmp.CmpUtil;
 import org.apache.openejb.core.cmp.jpa.JpaCmpEngine;
-import org.apache.openejb.jee.*;
+import org.apache.openejb.jee.CmpField;
+import org.apache.openejb.jee.CmpVersion;
+import org.apache.openejb.jee.EjbJar;
+import org.apache.openejb.jee.EjbRelation;
+import org.apache.openejb.jee.EjbRelationshipRole;
+import org.apache.openejb.jee.EnterpriseBean;
+import org.apache.openejb.jee.EntityBean;
+import org.apache.openejb.jee.JaxbJavaee;
+import org.apache.openejb.jee.Multiplicity;
+import org.apache.openejb.jee.PersistenceContextRef;
+import org.apache.openejb.jee.PersistenceType;
+import org.apache.openejb.jee.Query;
+import org.apache.openejb.jee.QueryMethod;
+import org.apache.openejb.jee.RelationshipRoleSource;
+import org.apache.openejb.jee.Relationships;
 import org.apache.openejb.jee.jpa.AttributeOverride;
 import org.apache.openejb.jee.jpa.Attributes;
 import org.apache.openejb.jee.jpa.Basic;

http://git-wip-us.apache.org/repos/asf/tomee/blob/c8a73446/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java
index 0e1f2d7..49f4ee3 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java
@@ -35,7 +35,13 @@ import org.apache.openejb.jee.Query;
 import org.apache.openejb.jee.QueryMethod;
 import org.apache.openejb.jee.SingletonBean;
 import org.apache.openejb.jee.TransAttribute;
-import org.apache.openejb.jee.jpa.*;
+import org.apache.openejb.jee.jpa.Attributes;
+import org.apache.openejb.jee.jpa.Basic;
+import org.apache.openejb.jee.jpa.Column;
+import org.apache.openejb.jee.jpa.Entity;
+import org.apache.openejb.jee.jpa.EntityMappings;
+import org.apache.openejb.jee.jpa.Id;
+import org.apache.openejb.jee.jpa.NamedQuery;
 import org.apache.openejb.jee.jpa.unit.Persistence;
 import org.apache.openejb.jee.jpa.unit.PersistenceUnit;
 import org.apache.openejb.jee.jpa.unit.TransactionType;


[09/24] tomee git commit: TOMEE-2295 WIP - fails with a NullPointerException which I'm trying to track down

Posted by jg...@apache.org.
TOMEE-2295 WIP - fails with a NullPointerException which I'm trying to track down


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

Branch: refs/heads/master
Commit: 5d3efd692c4ee3c635d76e5e53b0ff583d692be3
Parents: 8342058
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Mon Dec 3 16:46:52 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Mon Dec 3 16:46:52 2018 +0000

----------------------------------------------------------------------
 .../arquillian/tests/cmp/sample/Actor.java      | 35 ++++++++++
 .../arquillian/tests/cmp/sample/ActorBean.java  | 45 +++++++++++++
 .../tests/cmp/sample/ActorLocalHome.java        | 33 +++++++++
 .../arquillian/tests/cmp/sample/ActorVO.java    | 68 +++++++++++++++++++
 .../tests/cmp/sample/CustomOrmXmlTest.java      |  3 +-
 .../arquillian/tests/cmp/sample/Movie.java      |  6 ++
 .../arquillian/tests/cmp/sample/MovieBean.java  | 41 ++++++++++++
 .../tests/cmp/sample/MovieServlet.java          |  4 +-
 .../arquillian/tests/cmp/sample/MovieVO.java    | 10 +++
 .../tests/cmp/sample/MoviesBusinessBean.java    | 21 +++++-
 .../tests/cmp/sample/MoviesBusinessLocal.java   |  3 +-
 .../src/test/resources/arquillian.xml           |  2 +
 .../arquillian/tests/cmp/sample/custom-orm.xml  | 43 ++++++++++--
 .../arquillian/tests/cmp/sample/ejb-jar.xml     | 70 ++++++++++++++++++--
 .../arquillian/tests/cmp/sample/openejb-jar.xml |  6 ++
 .../arquillian/tests/cmp/sample/persistence.xml | 42 ++++++++----
 16 files changed, 406 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Actor.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Actor.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Actor.java
new file mode 100644
index 0000000..562b075
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Actor.java
@@ -0,0 +1,35 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface Actor extends javax.ejb.EJBLocalObject {
+
+    Integer getId();
+
+    void setId(Integer id);
+
+    String getFirstName();
+
+    void setFirstName(String director);
+
+    String getLastName();
+
+    void setLastName(String title);
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
new file mode 100644
index 0000000..70f0d23
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
@@ -0,0 +1,45 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+import javax.ejb.EntityBean;
+
+public abstract class ActorBean implements EntityBean {
+
+    public ActorBean() {
+    }
+
+    public Integer ejbCreate(final String firstName, final String lastName) {
+        this.setFirstName(firstName);
+        this.setLastName(lastName);
+        return null;
+    }
+
+    public abstract Integer getId();
+
+    public abstract void setId(Integer id);
+
+    public abstract String getFirstName();
+
+    public abstract void setFirstName(String firstName);
+
+    public abstract String getLastName();
+
+    public abstract void setLastName(String lastName);
+
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorLocalHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorLocalHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorLocalHome.java
new file mode 100644
index 0000000..a8f7dd0
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorLocalHome.java
@@ -0,0 +1,33 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+import java.util.Collection;
+
+/**
+ * @version $Revision$ $Date$
+ */
+interface ActorLocalHome extends javax.ejb.EJBLocalHome {
+
+    Actor create(String firstName, String lastName) throws CreateException;
+
+    Actor findByPrimaryKey(Integer primarykey) throws FinderException;
+
+    Collection findAll() throws FinderException;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorVO.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorVO.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorVO.java
new file mode 100644
index 0000000..a3c1a1d
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorVO.java
@@ -0,0 +1,68 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+import java.io.Serializable;
+
+public class ActorVO implements Serializable {
+
+    private Integer id;
+    private String firstName;
+    private String lastName;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    public String getLastName() {
+        return lastName;
+    }
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    public static ActorVO from (final Actor actor) {
+        final ActorVO actorVO = new ActorVO();
+        actorVO.setId(actor.getId());
+        actorVO.setFirstName(actor.getFirstName());
+        actorVO.setLastName(actor.getLastName());
+
+        return actorVO;
+    }
+
+    @Override
+    public String toString() {
+        return "ActorVO{" +
+                "id=" + id +
+                ", firstName='" + firstName + '\'' +
+                ", lastName='" + lastName + '\'' +
+                '}';
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
index e069536..138ba53 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
@@ -42,7 +42,8 @@ public class CustomOrmXmlTest {
     @Deployment(testable = false)
     public static WebArchive createDeployment() {
         WebArchive archive = ShrinkWrap.create(WebArchive.class, CustomOrmXmlTest.class.getSimpleName() + ".war")
-                .addClasses(MovieServlet.class, Movie.class, MovieBean.class, MovieException.class, MovieLocalHome.class, MoviesBusinessBean.class, MoviesBusinessLocal.class, MoviesBusinessLocalHome.class, MovieVO.class)
+                .addClasses(MovieServlet.class, Movie.class, MovieBean.class, MovieException.class, MovieLocalHome.class, MoviesBusinessBean.class,
+                        MoviesBusinessLocal.class, MoviesBusinessLocalHome.class, MovieVO.class, ActorBean.class, ActorLocalHome.class, Actor.class)
                 .addAsResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml"), "META-INF/custom-orm.xml")
                 .addAsResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml"), "META-INF/persistence.xml")
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml"), "openejb-jar.xml")

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Movie.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Movie.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Movie.java
index 405280c..1ff9285 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Movie.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Movie.java
@@ -16,6 +16,8 @@
  */
 package org.apache.openejb.arquillian.tests.cmp.sample;
 
+import java.util.Collection;
+
 /**
  * @version $Revision$ $Date$
  */
@@ -36,4 +38,8 @@ public interface Movie extends javax.ejb.EJBLocalObject {
     int getYear();
 
     void setYear(int year);
+
+    void addActor(String firstName, String lastName);
+
+    Collection getActorVO();
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
index 6f83ef8..edee309 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
@@ -16,7 +16,15 @@
  */
 package org.apache.openejb.arquillian.tests.cmp.sample;
 
+import javax.ejb.CreateException;
+import javax.ejb.EJBException;
 import javax.ejb.EntityBean;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
 
 public abstract class MovieBean implements EntityBean {
 
@@ -46,4 +54,37 @@ public abstract class MovieBean implements EntityBean {
 
     public abstract void setYear(int year);
 
+    public abstract Collection getActors();
+
+    public abstract void setActors(Collection actors);
+
+    public void addActor(String firstName, String lastName) {
+        try {
+            final InitialContext context = new InitialContext();
+
+            final ActorLocalHome actorBean = (ActorLocalHome) context.lookup("java:comp/env/ejb/ActorBean");
+            final Actor actor = actorBean.create(firstName, lastName);
+
+            final Collection actors = this.getActors();
+            actors.add(actor);
+
+        } catch (NamingException | CreateException e) {
+            throw new EJBException(e);
+        }
+    }
+
+    public Collection getActorVO() {
+        List result = new ArrayList();
+
+        final Collection actors = this.getActors();
+        final Iterator iterator = actors.iterator();
+
+        while (iterator.hasNext()) {
+            Actor actor = (Actor) iterator.next();
+            result.add(ActorVO.from(actor));
+        }
+
+        return result;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
index 0670ee5..9610abf 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
@@ -54,7 +54,9 @@ public class MovieServlet extends HttpServlet {
 
             final MoviesBusinessLocal bean = home.create();
 
-            bean.addMovie("Bad Boys", "Michael Bay", 1995);
+            final int id = bean.addMovie("Bad Boys", "Michael Bay", 1995);
+            bean.addActor(id, "Will", "Smith");
+            bean.addActor(id, "Martin", "Lawrence");
 
             pw.println("Movie added successfully");
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieVO.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieVO.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieVO.java
index ee59bf6..d7618dc 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieVO.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieVO.java
@@ -17,6 +17,9 @@
 package org.apache.openejb.arquillian.tests.cmp.sample;
 
 import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
 
 public class MovieVO implements Serializable {
 
@@ -24,6 +27,7 @@ public class MovieVO implements Serializable {
     private String title;
     private String director;
     private int year;
+    private List actors = new ArrayList();
 
     public Integer getId() {
         return id;
@@ -57,12 +61,17 @@ public class MovieVO implements Serializable {
         this.year = year;
     }
 
+    public Collection getActors() {
+        return actors;
+    }
+
     public static MovieVO from (final Movie movie) {
         final MovieVO movieVO = new MovieVO();
         movieVO.setId(movie.getId());
         movieVO.setTitle(movie.getTitle());
         movieVO.setDirector(movie.getDirector());
         movieVO.setYear(movie.getYear());
+        movieVO.getActors().addAll(movie.getActorVO());
 
         return movieVO;
     }
@@ -74,6 +83,7 @@ public class MovieVO implements Serializable {
                 ", title='" + title + '\'' +
                 ", director='" + director + '\'' +
                 ", year=" + year +
+                ", actors=" + actors +
                 '}';
     }
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
index b431826..6942d49 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
@@ -53,20 +53,35 @@ public class MoviesBusinessBean implements SessionBean {
     }
 
 
-    public void addMovie(final String title, final String director, int year) throws MovieException {
+    public int addMovie(final String title, final String director, int year) throws MovieException {
         try {
             final InitialContext context = new InitialContext();
             final MovieLocalHome home = (MovieLocalHome)
                     PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/MovieBean"), MovieLocalHome.class);
 
-
-            home.create(director, title, year);
+            final Movie movie = home.create(director, title, year);
+            return movie.getId();
 
         } catch (NamingException | CreateException e) {
             throw new MovieException(e);
         }
     }
 
+    public void addActor(final int movieId, final String firstName, final String lastName) throws MovieException {
+        try {
+            final InitialContext context = new InitialContext();
+            final MovieLocalHome home = (MovieLocalHome)
+                PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/MovieBean"), MovieLocalHome.class);
+
+            final Movie movie = home.findByPrimaryKey(movieId);
+            movie.addActor(firstName, lastName);
+        } catch (NamingException | FinderException e) {
+            throw new MovieException(e);
+        } catch (Throwable t) {
+            t.printStackTrace();
+        }
+    }
+
     public MovieVO findByPrimaryKey(final int id) throws MovieException {
         try {
             final InitialContext context = new InitialContext();

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
index f961fc3..40a75f5 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
@@ -21,7 +21,8 @@ import java.util.Collection;
 
 public interface MoviesBusinessLocal extends javax.ejb.EJBLocalObject {
 
-    void addMovie(final String title, final String director, int year) throws RemoteException, MovieException;
+    int addMovie(final String title, final String director, int year) throws RemoteException, MovieException;
+    int addActor(final int movieId, final String firstName, final String lastName) throws RemoteException, MovieException;
     Movie findByPrimaryKey(final int id) throws RemoteException, MovieException;
     Collection findAll() throws RemoteException, MovieException;
     void delete(Integer id) throws RemoteException, MovieException;

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/arquillian.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/arquillian.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/arquillian.xml
index b80f45d..fb0f5fd 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/arquillian.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/arquillian.xml
@@ -87,6 +87,7 @@
         # scan types by configuring a JarScanner with a nested JarScanFilter.
         tomcat.util.scan.StandardJarScanFilter.jarsToScan=\
         log4j-core*.jar,log4j-taglib*.jar,log4javascript*.jar,slf4j-taglib*.jar
+        openejb.descriptors.output = true
       </property>
     </configuration>
   </container>
@@ -108,6 +109,7 @@
 
         # try to save some permgen mem
         openejb.cdi.activated-on-ejb = false
+        openejb.descriptors.output = true
       </property>
     </configuration>
   </container>

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
index 2e60735..49b5e27 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
@@ -1,7 +1,24 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+    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.
+-->
 <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" version="1.0">
     <entity class="openejb.org.apache.openejb.arquillian.tests.cmp.sample.MovieBean" name="MovieBean">
-        <description>#MovieBean</description>
+        <description>CustomOrmXmlTest#MovieBean</description>
         <table/>
         <named-query name="MovieBean.findByDirector(java.lang.String)">
             <query>SELECT m FROM MovieBean m WHERE m.director = ?1</query>
@@ -15,9 +32,27 @@
             </id>
             <basic name="director"/>
             <basic name="year"/>
-            <basic name="title">
-                <column name="movie_title" length="250" />
-            </basic>
+            <basic name="title"/>
+            <one-to-many mapped-by="MovieBean_actors" name="actors"/>
+        </attributes>
+    </entity>
+    <entity class="openejb.org.apache.openejb.arquillian.tests.cmp.sample.ActorBean" name="ActorBean">
+        <description>CustomOrmXmlTest#ActorBean</description>
+        <table/>
+        <named-query name="ActorBean.findAll">
+            <query>SELECT a FROM ActorBean as a</query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <generated-value strategy="IDENTITY"/>
+            </id>
+            <basic name="firstName"/>
+            <basic name="lastName"/>
+            <many-to-one name="MovieBean_actors">
+                <cascade>
+                    <cascade-all/>
+                </cascade>
+            </many-to-one>
         </attributes>
     </entity>
 </entity-mappings>

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
index 3de83ad..0ca6a12 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
@@ -24,7 +24,7 @@
   <enterprise-beans>
     <session>
       <description>
-        A service that handles monetary payments.
+        A service that handles movie entities.
       </description>
       <ejb-name>MovieBusinessBean</ejb-name>
       <local-home>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessLocalHome</local-home>
@@ -39,6 +39,13 @@
         <local>org.apache.openejb.arquillian.tests.cmp.sample.Movie</local>
         <ejb-link>MovieBean</ejb-link>
       </ejb-local-ref>
+      <ejb-local-ref>
+        <ejb-ref-name>ejb/ActorBean</ejb-ref-name>
+        <ejb-ref-type>Entity</ejb-ref-type>
+        <local-home>org.apache.openejb.arquillian.tests.cmp.sample.ActorLocalHome</local-home>
+        <local>org.apache.openejb.arquillian.tests.cmp.sample.Actor</local>
+        <ejb-link>ActorBean</ejb-link>
+      </ejb-local-ref>
     </session>
     <entity>
       <ejb-name>MovieBean</ejb-name>
@@ -80,9 +87,58 @@
         <ejb-ql>SELECT m FROM MovieBean as m</ejb-ql>
       </query>
     </entity>
+    <entity>
+      <ejb-name>ActorBean</ejb-name>
+      <local-home>org.apache.openejb.arquillian.tests.cmp.sample.ActorLocalHome</local-home>
+      <local>org.apache.openejb.arquillian.tests.cmp.sample.Actor</local>
+      <ejb-class>org.apache.openejb.arquillian.tests.cmp.sample.ActorBean</ejb-class>
+      <persistence-type>Container</persistence-type>
+      <prim-key-class>java.lang.Integer</prim-key-class>
+      <reentrant>false</reentrant>
+      <cmp-version>2.x</cmp-version>
+      <abstract-schema-name>ActorBean</abstract-schema-name>
+      <cmp-field>
+        <field-name>id</field-name>
+      </cmp-field>
+      <cmp-field>
+        <field-name>firstName</field-name>
+      </cmp-field>
+      <cmp-field>
+        <field-name>lastName</field-name>
+      </cmp-field>
+      <primkey-field>id</primkey-field>
+      <query>
+        <query-method>
+          <method-name>findAll</method-name>
+          <method-params/>
+        </query-method>
+        <ejb-ql>SELECT a FROM ActorBean as a</ejb-ql>
+      </query>
+    </entity>
   </enterprise-beans>
-
-
+  <relationships>
+    <ejb-relation>
+      <ejb-relationship-role>
+        <ejb-relationship-role-name>Movie-has-many-actors</ejb-relationship-role-name>
+        <multiplicity>One</multiplicity>
+        <cascade-delete/>
+        <relationship-role-source>
+          <ejb-name>MovieBean</ejb-name>
+        </relationship-role-source>
+        <cmr-field>
+          <cmr-field-name>actors</cmr-field-name>
+          <cmr-field-type>java.util.Collection</cmr-field-type>
+        </cmr-field>
+      </ejb-relationship-role>
+      <ejb-relationship-role>
+        <ejb-relationship-role-name>Actor-acts-in-movie</ejb-relationship-role-name>
+        <multiplicity>Many</multiplicity>
+        <relationship-role-source>
+          <ejb-name>ActorBean</ejb-name>
+        </relationship-role-source>
+      </ejb-relationship-role>
+    </ejb-relation>
+  </relationships>
   <assembly-descriptor>
     <container-transaction>
       <method>
@@ -91,7 +147,6 @@
       </method>
       <trans-attribute>Required</trans-attribute>
     </container-transaction>
-
     <container-transaction>
       <method>
         <ejb-name>MovieBean</ejb-name>
@@ -99,5 +154,12 @@
       </method>
       <trans-attribute>Supports</trans-attribute>
     </container-transaction>
+    <container-transaction>
+      <method>
+        <ejb-name>ActorBean</ejb-name>
+        <method-name>*</method-name>
+      </method>
+      <trans-attribute>Supports</trans-attribute>
+    </container-transaction>
   </assembly-descriptor>
 </ejb-jar>

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
index f86990c..e01a3de 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
@@ -7,5 +7,11 @@
                 <uuid/>
             </key-generator>
         </entity>
+        <entity>
+            <ejb-name>ActorBean</ejb-name>
+            <key-generator xmlns="http://www.openejb.org/xml/ns/pkgen-2.1">
+                <uuid/>
+            </key-generator>
+        </entity>
     </enterprise-beans>
 </openejb-jar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/5d3efd69/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
index 97f2cc1..88e5765 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
@@ -1,14 +1,32 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+    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.
+-->
 <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
-    <persistence-unit name="cmp" transaction-type="JTA">
-        <jta-data-source>Default JDBC Database</jta-data-source>
-        <non-jta-data-source>Default Unmanaged JDBC Database</non-jta-data-source>
-        <mapping-file>META-INF/custom-orm.xml</mapping-file>
-        <class>openejb.org.apache.openejb.arquillian.tests.cmp.sample.MovieBean</class>
-        <properties>
-            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true, Indexes=false, IgnoreErrors=true)"/>
-            <property name="openjpa.Log" value="DefaultLevel=INFO"/>
-            <property name="eclipselink.ddl-generation" value="create-tables"/>
-        </properties>
-    </persistence-unit>
-</persistence>
+<persistence-unit name="cmp" transaction-type="JTA">
+    <jta-data-source>Default JDBC Database</jta-data-source>
+    <non-jta-data-source>Default Unmanaged JDBC Database</non-jta-data-source>
+    <mapping-file>META-INF/custom-orm.xml</mapping-file>
+    <class>openejb.org.apache.openejb.arquillian.tests.cmp.sample.MovieBean</class>
+    <class>openejb.org.apache.openejb.arquillian.tests.cmp.sample.ActorBean</class>
+    <properties>
+        <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true, Indexes=false, IgnoreErrors=true)"/>
+        <property name="openjpa.Log" value="DefaultLevel=INFO"/>
+        <property name="eclipselink.ddl-generation" value="create-tables"/>
+    </properties>
+</persistence-unit>
+</persistence>
\ No newline at end of file


[24/24] tomee git commit: Merge branch 'cmp-jpa'

Posted by jg...@apache.org.
Merge branch 'cmp-jpa'


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

Branch: refs/heads/master
Commit: c1f9d1976b27d2070af0174410fb27e1b57bb5a8
Parents: 1436a36 29c8208
Author: Jonathan Gallimore <jg...@tomitribe.com>
Authored: Thu Dec 6 17:32:55 2018 +0000
Committer: Jonathan Gallimore <jg...@tomitribe.com>
Committed: Thu Dec 6 17:32:55 2018 +0000

----------------------------------------------------------------------
 .../arquillian-tomee-webprofile-tests/pom.xml   |   2 +-
 .../arquillian/tests/cmp/sample/ActorBean.java  |  70 ++++++++
 .../tests/cmp/sample/ActorDetails.java          |  39 +++++
 .../tests/cmp/sample/CustomOrmXmlTest.java      |  76 +++++++++
 .../arquillian/tests/cmp/sample/LocalActor.java |  29 ++++
 .../tests/cmp/sample/LocalActorHome.java        |  31 ++++
 .../arquillian/tests/cmp/sample/LocalMovie.java |  39 +++++
 .../tests/cmp/sample/LocalMovieHome.java        |  33 ++++
 .../arquillian/tests/cmp/sample/MovieBean.java  | 118 +++++++++++++
 .../tests/cmp/sample/MovieDetails.java          |  45 +++++
 .../tests/cmp/sample/MoviesBusiness.java        |  25 +++
 .../tests/cmp/sample/MoviesBusinessBean.java    |  80 +++++++++
 .../tests/cmp/sample/MoviesBusinessHome.java    |  27 +++
 .../tests/cmp/sample/MoviesServlet.java         |  91 ++++++++++
 .../src/test/resources/arquillian.xml           |   2 +
 .../arquillian/tests/cmp/sample/custom-orm.xml  |  54 ++++++
 .../arquillian/tests/cmp/sample/ejb-jar.xml     | 164 +++++++++++++++++++
 .../arquillian/tests/cmp/sample/openejb-jar.xml |  34 ++++
 .../arquillian/tests/cmp/sample/persistence.xml |  32 ++++
 .../openejb/arquillian/tests/cmp/sample/web.xml |  48 ++++++
 .../apache/openejb/config/CmpJpaConversion.java |  96 ++++++++---
 .../src/main/resources/test-orm.xml             |  32 ++++
 .../openejb/core/LegacyInterfaceTest.java       |  73 ++++++++-
 23 files changed, 1218 insertions(+), 22 deletions(-)
----------------------------------------------------------------------



[10/24] tomee git commit: TOMEE-2295 this is redundant

Posted by jg...@apache.org.
TOMEE-2295 this is redundant


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

Branch: refs/heads/master
Commit: 86aec7f4f5a605389fe87c03d365667538c277c1
Parents: 5d3efd6
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Mon Dec 3 16:56:21 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Mon Dec 3 16:56:21 2018 +0000

----------------------------------------------------------------------
 .../openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java    | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/86aec7f4/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
index 6942d49..2b45cdd 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
@@ -77,8 +77,6 @@ public class MoviesBusinessBean implements SessionBean {
             movie.addActor(firstName, lastName);
         } catch (NamingException | FinderException e) {
             throw new MovieException(e);
-        } catch (Throwable t) {
-            t.printStackTrace();
         }
     }
 


[21/24] tomee git commit: TOMEE-2295 ensure this works across all profiles

Posted by jg...@apache.org.
TOMEE-2295 ensure this works across all profiles


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

Branch: refs/heads/master
Commit: 5aab80789590b920b14f6c092512c2977708a345
Parents: 46a731e
Author: Jonathan Gallimore <jg...@tomitribe.com>
Authored: Wed Dec 5 16:53:24 2018 +0000
Committer: Jonathan Gallimore <jg...@tomitribe.com>
Committed: Wed Dec 5 16:53:24 2018 +0000

----------------------------------------------------------------------
 .../apache/openejb/arquillian/tests/cmp/sample/persistence.xml  | 5 +++--
 .../org/apache/openejb/arquillian/tests/cmp/sample/web.xml      | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/5aab8078/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
index d184dd9..69b8971 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
@@ -18,14 +18,15 @@
 -->
 <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
     <persistence-unit name="cmp" transaction-type="JTA">
-        <jta-data-source>Default JDBC Database</jta-data-source>
-        <non-jta-data-source>Default Unmanaged JDBC Database</non-jta-data-source>
+        <jta-data-source>My DataSource</jta-data-source>
+        <non-jta-data-source>My Unmanaged DataSource</non-jta-data-source>
         <mapping-file>META-INF/custom-orm.xml</mapping-file>
         <class>openejb.org.apache.openejb.arquillian.tests.cmp.sample.Movie</class>
         <class>openejb.org.apache.openejb.arquillian.tests.cmp.sample.Actor</class>
         <properties>
             <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true, Indexes=false, IgnoreErrors=true)"/>
             <property name="openjpa.Log" value="DefaultLevel=INFO"/>
+            <property name="eclipselink.ddl-generation" value="create-tables"/>
         </properties>
     </persistence-unit>
 </persistence>

http://git-wip-us.apache.org/repos/asf/tomee/blob/5aab8078/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
index cd3c591..68cbacb 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
@@ -43,5 +43,6 @@
     <resource-ref>
         <res-ref-name>db/DataSource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
+        <mapped-name>My DataSource</mapped-name>
     </resource-ref>
 </web-app>
\ No newline at end of file


[06/24] tomee git commit: TOMEE-2295 add arquillian test using custom ORM file

Posted by jg...@apache.org.
TOMEE-2295 add arquillian test using custom ORM file


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

Branch: refs/heads/master
Commit: 24692436d004e212dd924b7e4812114762bd11b2
Parents: c8a7344
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Thu Nov 29 21:43:40 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Thu Nov 29 21:43:40 2018 +0000

----------------------------------------------------------------------
 .../tests/cmp/sample/CustomOrmXmlTest.java      |  65 +++++++++++
 .../arquillian/tests/cmp/sample/Movie.java      |  39 +++++++
 .../arquillian/tests/cmp/sample/MovieBean.java  |  49 ++++++++
 .../tests/cmp/sample/MovieException.java        |  35 ++++++
 .../tests/cmp/sample/MovieLocalHome.java        |  35 ++++++
 .../tests/cmp/sample/MovieServlet.java          |  79 +++++++++++++
 .../arquillian/tests/cmp/sample/MovieVO.java    |  79 +++++++++++++
 .../tests/cmp/sample/MoviesBusinessBean.java    | 115 +++++++++++++++++++
 .../tests/cmp/sample/MoviesBusinessLocal.java   |  28 +++++
 .../cmp/sample/MoviesBusinessLocalHome.java     |  26 +++++
 .../arquillian/tests/cmp/sample/custom-orm.xml  |  23 ++++
 .../arquillian/tests/cmp/sample/ejb-jar.xml     | 103 +++++++++++++++++
 .../arquillian/tests/cmp/sample/openejb-jar.xml |  11 ++
 .../arquillian/tests/cmp/sample/persistence.xml |  14 +++
 .../openejb/arquillian/tests/cmp/sample/web.xml |  42 +++++++
 15 files changed, 743 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
new file mode 100644
index 0000000..e069536
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
@@ -0,0 +1,65 @@
+/*
+ * 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.cmp.sample;
+
+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 CustomOrmXmlTest {
+
+    @ArquillianResource
+    private URL url;
+
+    @Deployment(testable = false)
+    public static WebArchive createDeployment() {
+        WebArchive archive = ShrinkWrap.create(WebArchive.class, CustomOrmXmlTest.class.getSimpleName() + ".war")
+                .addClasses(MovieServlet.class, Movie.class, MovieBean.class, MovieException.class, MovieLocalHome.class, MoviesBusinessBean.class, MoviesBusinessLocal.class, MoviesBusinessLocalHome.class, MovieVO.class)
+                .addAsResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml"), "META-INF/custom-orm.xml")
+                .addAsResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml"), "META-INF/persistence.xml")
+                .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml"), "openejb-jar.xml")
+                .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml"), "ejb-jar.xml")
+                .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/web.xml"), "web.xml");
+
+        System.out.println(archive.toString(true));
+        return archive;
+    }
+
+    @Test
+    @RunAsClient
+    public void checkCmpJpaEntityORMMappings() throws Exception {
+        final String output = IO.slurp(new URL(url.toExternalForm()));
+        System.out.println(output);
+        Assert.assertTrue(output.contains("Movie added successfully"));
+        Assert.assertTrue(output.contains("Movie removed successfully"));
+        Assert.assertTrue(output.contains("title='Bad Boys', director='Michael Bay', year=1995"));
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Movie.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Movie.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Movie.java
new file mode 100644
index 0000000..405280c
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Movie.java
@@ -0,0 +1,39 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface Movie extends javax.ejb.EJBLocalObject {
+
+    java.lang.Integer getId();
+
+    void setId(java.lang.Integer id);
+
+    String getDirector();
+
+    void setDirector(String director);
+
+    String getTitle();
+
+    void setTitle(String title);
+
+    int getYear();
+
+    void setYear(int year);
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
new file mode 100644
index 0000000..6f83ef8
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
@@ -0,0 +1,49 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+import javax.ejb.EntityBean;
+
+public abstract class MovieBean implements EntityBean {
+
+    public MovieBean() {
+    }
+
+    public Integer ejbCreate(final String director, String title, final int year) {
+        this.setDirector(director);
+        this.setTitle(title);
+        this.setYear(year);
+        return null;
+    }
+
+    public abstract java.lang.Integer getId();
+
+    public abstract void setId(java.lang.Integer id);
+
+    public abstract String getDirector();
+
+    public abstract void setDirector(String director);
+
+    public abstract String getTitle();
+
+    public abstract void setTitle(String title);
+
+    public abstract int getYear();
+
+    public abstract void setYear(int year);
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieException.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieException.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieException.java
new file mode 100644
index 0000000..cdf476c
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieException.java
@@ -0,0 +1,35 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+public class MovieException extends Exception {
+
+    public MovieException() {
+    }
+
+    public MovieException(String message) {
+        super(message);
+    }
+
+    public MovieException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public MovieException(Throwable cause) {
+        super(cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieLocalHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieLocalHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieLocalHome.java
new file mode 100644
index 0000000..dfcf910
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieLocalHome.java
@@ -0,0 +1,35 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+import java.util.Collection;
+
+/**
+ * @version $Revision$ $Date$
+ */
+interface MovieLocalHome extends javax.ejb.EJBLocalHome {
+
+    Movie create(String director, String title, int year) throws CreateException;
+
+    Movie findByPrimaryKey(Integer primarykey) throws FinderException;
+
+    Collection<Movie> findAll() throws FinderException;
+
+    Collection<Movie> findByDirector(String director) throws FinderException;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
new file mode 100644
index 0000000..0670ee5
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
@@ -0,0 +1,79 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+import javax.ejb.CreateException;
+import javax.ejb.RemoveException;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.rmi.PortableRemoteObject;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Collection;
+import java.util.Iterator;
+
+public class MovieServlet extends HttpServlet {
+
+
+    @Override
+    protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
+        process(req, resp);
+    }
+
+    @Override
+    protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
+        process(req, resp);
+    }
+
+    private void process(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
+
+        final PrintWriter pw = resp.getWriter();
+
+        try {
+            final InitialContext context = new InitialContext();
+            final MoviesBusinessLocalHome home = (MoviesBusinessLocalHome)
+                    PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/MoviesBusiness"), MoviesBusinessLocalHome.class);
+
+            final MoviesBusinessLocal bean = home.create();
+
+            bean.addMovie("Bad Boys", "Michael Bay", 1995);
+
+            pw.println("Movie added successfully");
+
+            final Collection allMovies = bean.findAll();
+
+            final Iterator iterator = allMovies.iterator();
+            while (iterator.hasNext()) {
+                final MovieVO movie = (MovieVO) iterator.next();
+                pw.println(movie.toString());
+
+                bean.delete(movie.getId());
+                pw.println("Movie removed successfully");
+            }
+
+            bean.remove();
+            pw.flush();
+
+        } catch (NamingException | CreateException | RemoveException | MovieException e) {
+            throw new ServletException(e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieVO.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieVO.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieVO.java
new file mode 100644
index 0000000..ee59bf6
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieVO.java
@@ -0,0 +1,79 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+import java.io.Serializable;
+
+public class MovieVO implements Serializable {
+
+    private Integer id;
+    private String title;
+    private String director;
+    private int year;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getDirector() {
+        return director;
+    }
+
+    public void setDirector(String director) {
+        this.director = director;
+    }
+
+    public int getYear() {
+        return year;
+    }
+
+    public void setYear(int year) {
+        this.year = year;
+    }
+
+    public static MovieVO from (final Movie movie) {
+        final MovieVO movieVO = new MovieVO();
+        movieVO.setId(movie.getId());
+        movieVO.setTitle(movie.getTitle());
+        movieVO.setDirector(movie.getDirector());
+        movieVO.setYear(movie.getYear());
+
+        return movieVO;
+    }
+
+    @Override
+    public String toString() {
+        return "MovieVO{" +
+                "id=" + id +
+                ", title='" + title + '\'' +
+                ", director='" + director + '\'' +
+                ", year=" + year +
+                '}';
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
new file mode 100644
index 0000000..b431826
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
@@ -0,0 +1,115 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBException;
+import javax.ejb.FinderException;
+import javax.ejb.RemoveException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.rmi.PortableRemoteObject;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
+public class MoviesBusinessBean implements SessionBean {
+
+    private SessionContext ctx;
+
+    @Override
+    public void ejbActivate() throws EJBException, RemoteException {
+    }
+
+    @Override
+    public void ejbPassivate() throws EJBException, RemoteException {
+    }
+
+    @Override
+    public void ejbRemove() throws EJBException, RemoteException {
+    }
+
+    @Override
+    public void setSessionContext(final SessionContext ctx) throws EJBException, RemoteException {
+
+        this.ctx = ctx;
+    }
+
+
+    public void addMovie(final String title, final String director, int year) throws MovieException {
+        try {
+            final InitialContext context = new InitialContext();
+            final MovieLocalHome home = (MovieLocalHome)
+                    PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/MovieBean"), MovieLocalHome.class);
+
+
+            home.create(director, title, year);
+
+        } catch (NamingException | CreateException e) {
+            throw new MovieException(e);
+        }
+    }
+
+    public MovieVO findByPrimaryKey(final int id) throws MovieException {
+        try {
+            final InitialContext context = new InitialContext();
+            final MovieLocalHome home = (MovieLocalHome)
+                    PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/MovieBean"), MovieLocalHome.class);
+
+
+            return MovieVO.from(home.findByPrimaryKey(id));
+        } catch (NamingException | FinderException e) {
+             throw new MovieException(e);
+        }
+    }
+
+    public Collection findAll() throws MovieException {
+        try {
+            final InitialContext context = new InitialContext();
+            final MovieLocalHome home = (MovieLocalHome)
+                    PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/MovieBean"), MovieLocalHome.class);
+
+            final Collection movies = home.findAll();
+
+            final Collection result = new ArrayList();
+            final Iterator iterator = movies.iterator();
+            while (iterator.hasNext()) {
+                Movie movie = (Movie) iterator.next();
+                result.add(MovieVO.from(movie));
+            }
+
+            return result;
+        } catch (NamingException | FinderException e) {
+            throw new MovieException(e);
+        }
+    }
+
+    public void delete(Integer id) throws MovieException {
+        try {
+            final InitialContext context = new InitialContext();
+            final MovieLocalHome home = (MovieLocalHome)
+                    PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/MovieBean"), MovieLocalHome.class);
+
+            home.remove(id);
+        } catch (NamingException | RemoveException e) {
+            throw new MovieException(e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
new file mode 100644
index 0000000..f961fc3
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
@@ -0,0 +1,28 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+import java.rmi.RemoteException;
+import java.util.Collection;
+
+public interface MoviesBusinessLocal extends javax.ejb.EJBLocalObject {
+
+    void addMovie(final String title, final String director, int year) throws RemoteException, MovieException;
+    Movie findByPrimaryKey(final int id) throws RemoteException, MovieException;
+    Collection findAll() throws RemoteException, MovieException;
+    void delete(Integer id) throws RemoteException, MovieException;
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocalHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocalHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocalHome.java
new file mode 100644
index 0000000..a7181b9
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocalHome.java
@@ -0,0 +1,26 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+import javax.ejb.CreateException;
+import java.rmi.RemoteException;
+
+public interface MoviesBusinessLocalHome extends javax.ejb.EJBLocalHome {
+
+    MoviesBusinessLocal create() throws RemoteException, CreateException;
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
new file mode 100644
index 0000000..2e60735
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/custom-orm.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" version="1.0">
+    <entity class="openejb.org.apache.openejb.arquillian.tests.cmp.sample.MovieBean" name="MovieBean">
+        <description>#MovieBean</description>
+        <table/>
+        <named-query name="MovieBean.findByDirector(java.lang.String)">
+            <query>SELECT m FROM MovieBean m WHERE m.director = ?1</query>
+        </named-query>
+        <named-query name="MovieBean.findAll">
+            <query>SELECT m FROM MovieBean as m</query>
+        </named-query>
+        <attributes>
+            <id name="id">
+                <generated-value strategy="IDENTITY"/>
+            </id>
+            <basic name="director"/>
+            <basic name="year"/>
+            <basic name="title">
+                <column name="movie_title" length="250" />
+            </basic>
+        </attributes>
+    </entity>
+</entity-mappings>

http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
new file mode 100644
index 0000000..3de83ad
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
@@ -0,0 +1,103 @@
+<?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 xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         version="3.1"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd">
+
+  <enterprise-beans>
+    <session>
+      <description>
+        A service that handles monetary payments.
+      </description>
+      <ejb-name>MovieBusinessBean</ejb-name>
+      <local-home>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessLocalHome</local-home>
+      <local>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessLocal</local>
+      <ejb-class>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessBean</ejb-class>
+      <session-type>Stateless</session-type>
+      <transaction-type>Container</transaction-type>
+      <ejb-local-ref>
+        <ejb-ref-name>ejb/MovieBean</ejb-ref-name>
+        <ejb-ref-type>Entity</ejb-ref-type>
+        <local-home>org.apache.openejb.arquillian.tests.cmp.sample.MovieLocalHome</local-home>
+        <local>org.apache.openejb.arquillian.tests.cmp.sample.Movie</local>
+        <ejb-link>MovieBean</ejb-link>
+      </ejb-local-ref>
+    </session>
+    <entity>
+      <ejb-name>MovieBean</ejb-name>
+      <local-home>org.apache.openejb.arquillian.tests.cmp.sample.MovieLocalHome</local-home>
+      <local>org.apache.openejb.arquillian.tests.cmp.sample.Movie</local>
+      <ejb-class>org.apache.openejb.arquillian.tests.cmp.sample.MovieBean</ejb-class>
+      <persistence-type>Container</persistence-type>
+      <prim-key-class>java.lang.Integer</prim-key-class>
+      <reentrant>false</reentrant>
+      <cmp-version>2.x</cmp-version>
+      <abstract-schema-name>MovieBean</abstract-schema-name>
+      <cmp-field>
+        <field-name>id</field-name>
+      </cmp-field>
+      <cmp-field>
+        <field-name>director</field-name>
+      </cmp-field>
+      <cmp-field>
+        <field-name>year</field-name>
+      </cmp-field>
+      <cmp-field>
+        <field-name>title</field-name>
+      </cmp-field>
+      <primkey-field>id</primkey-field>
+      <query>
+        <query-method>
+          <method-name>findByDirector</method-name>
+          <method-params>
+            <method-param>java.lang.String</method-param>
+          </method-params>
+        </query-method>
+        <ejb-ql>SELECT m FROM MovieBean m WHERE m.director = ?1</ejb-ql>
+      </query>
+      <query>
+        <query-method>
+          <method-name>findAll</method-name>
+          <method-params/>
+        </query-method>
+        <ejb-ql>SELECT m FROM MovieBean as m</ejb-ql>
+      </query>
+    </entity>
+  </enterprise-beans>
+
+
+  <assembly-descriptor>
+    <container-transaction>
+      <method>
+        <ejb-name>MovieBusinessBean</ejb-name>
+        <method-name>*</method-name>
+      </method>
+      <trans-attribute>Required</trans-attribute>
+    </container-transaction>
+
+    <container-transaction>
+      <method>
+        <ejb-name>MovieBean</ejb-name>
+        <method-name>*</method-name>
+      </method>
+      <trans-attribute>Supports</trans-attribute>
+    </container-transaction>
+  </assembly-descriptor>
+</ejb-jar>

http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
new file mode 100644
index 0000000..f86990c
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
+    <enterprise-beans>
+        <entity>
+            <ejb-name>MovieBean</ejb-name>
+            <key-generator xmlns="http://www.openejb.org/xml/ns/pkgen-2.1">
+                <uuid/>
+            </key-generator>
+        </entity>
+    </enterprise-beans>
+</openejb-jar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
new file mode 100644
index 0000000..97f2cc1
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/persistence.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+    <persistence-unit name="cmp" transaction-type="JTA">
+        <jta-data-source>Default JDBC Database</jta-data-source>
+        <non-jta-data-source>Default Unmanaged JDBC Database</non-jta-data-source>
+        <mapping-file>META-INF/custom-orm.xml</mapping-file>
+        <class>openejb.org.apache.openejb.arquillian.tests.cmp.sample.MovieBean</class>
+        <properties>
+            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true, Indexes=false, IgnoreErrors=true)"/>
+            <property name="openjpa.Log" value="DefaultLevel=INFO"/>
+            <property name="eclipselink.ddl-generation" value="create-tables"/>
+        </properties>
+    </persistence-unit>
+</persistence>

http://git-wip-us.apache.org/repos/asf/tomee/blob/24692436/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/web.xml
new file mode 100644
index 0000000..6d55e75
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/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>MovieServlet</servlet-name>
+        <servlet-class>org.apache.openejb.arquillian.tests.cmp.sample.MovieServlet</servlet-class>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>MovieServlet</servlet-name>
+        <url-pattern>/*</url-pattern>
+    </servlet-mapping>
+
+    <ejb-local-ref>
+        <ejb-ref-name>ejb/MoviesBusiness</ejb-ref-name>
+        <ejb-ref-type>Session</ejb-ref-type>
+        <local-home>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessLocalHome</local-home>
+        <local>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessLocal</local>
+    </ejb-local-ref>
+</web-app>
\ No newline at end of file


[14/24] tomee git commit: Ripped everything out

Posted by jg...@apache.org.
Ripped everything out


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

Branch: refs/heads/master
Commit: 7dfdc4ae4cc2755851f3a902b71ccae1bba86173
Parents: 4b28906
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Tue Dec 4 14:52:56 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Tue Dec 4 14:52:56 2018 +0000

----------------------------------------------------------------------
 .../tests/cmp/sample/CustomOrmXmlTest.java      |  2 +-
 .../tests/cmp/sample/MoviesBusinessBean.java    | 15 +----
 .../arquillian/tests/cmp/sample/Person.java     | 32 ----------
 .../arquillian/tests/cmp/sample/PersonBean.java | 64 --------------------
 .../tests/cmp/sample/PersonLocalHome.java       | 34 -----------
 .../arquillian/tests/cmp/sample/ejb-jar.xml     | 39 ------------
 .../arquillian/tests/cmp/sample/openejb-jar.xml |  9 +--
 7 files changed, 3 insertions(+), 192 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/7dfdc4ae/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
index 2a96925..c442bcc 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
@@ -43,7 +43,7 @@ public class CustomOrmXmlTest {
     public static WebArchive createDeployment() {
         WebArchive archive = ShrinkWrap.create(WebArchive.class, CustomOrmXmlTest.class.getSimpleName() + ".war")
                 .addClasses(MovieServlet.class, MovieException.class, MoviesBusinessBean.class,
-                        MoviesBusinessLocal.class, MoviesBusinessLocalHome.class, PersonBean.class, PersonLocalHome.class, Person.class)
+                        MoviesBusinessLocal.class, MoviesBusinessLocalHome.class)
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml"), "openejb-jar.xml")
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml"), "ejb-jar.xml")
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/web.xml"), "web.xml");

http://git-wip-us.apache.org/repos/asf/tomee/blob/7dfdc4ae/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
index 0f6cced..e4a9b8e 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
@@ -16,13 +16,9 @@
  */
 package org.apache.openejb.arquillian.tests.cmp.sample;
 
-import javax.ejb.CreateException;
 import javax.ejb.EJBException;
 import javax.ejb.SessionBean;
 import javax.ejb.SessionContext;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.rmi.PortableRemoteObject;
 import java.rmi.RemoteException;
 public class MoviesBusinessBean implements SessionBean {
 
@@ -46,16 +42,7 @@ public class MoviesBusinessBean implements SessionBean {
     }
 
     public void addActor(final String name) throws MovieException {
-        try {
-            final InitialContext context = new InitialContext();
-
-            final PersonLocalHome personLocalHome = (PersonLocalHome)
-                    PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/PersonBean"), PersonLocalHome.class);
-
-            final Person person = personLocalHome.create(name);
-        } catch (NamingException | CreateException e) {
-            throw new MovieException(e);
-        }
+        // this is literally a no-op now
     }
 
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/7dfdc4ae/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Person.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Person.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Person.java
deleted file mode 100644
index 31aeb87..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Person.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-/**
- * @version $Revision$ $Date$
- */
-public interface Person extends javax.ejb.EJBLocalObject {
-
-    Integer getId();
-
-    void setId(Integer id);
-
-    String getName();
-
-    void setName(String name);
-
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/7dfdc4ae/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonBean.java
deleted file mode 100644
index 39c0ef4..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonBean.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-import javax.ejb.CreateException;
-import javax.ejb.EntityBean;
-import javax.ejb.EntityContext;
-
-public abstract class PersonBean implements EntityBean {
-
-    public PersonBean() {
-    }
-
-    public Integer ejbCreate(final String name) {
-        this.setName(name);
-        return null;
-    }
-
-    public abstract Integer getId();
-
-    public abstract void setId(Integer id);
-
-    public abstract String getName();
-
-    public abstract void setName(String name);
-
-    public void ejbPostCreate(String name) throws CreateException {
-    }
-
-    public void setEntityContext(EntityContext ctx) {
-    }
-
-    public void unsetEntityContext() {
-    }
-
-    public void ejbRemove() {
-    }
-
-    public void ejbLoad() {
-    }
-
-    public void ejbStore() {
-    }
-
-    public void ejbPassivate() {
-    }
-
-    public void ejbActivate() {
-    }
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/7dfdc4ae/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonLocalHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonLocalHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonLocalHome.java
deleted file mode 100644
index c35a0ae..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonLocalHome.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-import javax.ejb.CreateException;
-import javax.ejb.FinderException;
-import java.util.Collection;
-
-/**
- * @version $Revision$ $Date$
- */
-interface PersonLocalHome extends javax.ejb.EJBLocalHome {
-
-    Person create(String name) throws CreateException;
-
-    Person findByPrimaryKey(Integer primarykey) throws FinderException;
-
-    Collection findAll() throws FinderException;
-
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/7dfdc4ae/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
index c5af41d..cb5f047 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
@@ -32,39 +32,7 @@
       <ejb-class>org.apache.openejb.arquillian.tests.cmp.sample.MoviesBusinessBean</ejb-class>
       <session-type>Stateless</session-type>
       <transaction-type>Container</transaction-type>
-      <ejb-local-ref>
-        <ejb-ref-name>ejb/PersonBean</ejb-ref-name>
-        <ejb-ref-type>Entity</ejb-ref-type>
-        <local-home>org.apache.openejb.arquillian.tests.cmp.sample.PersonLocalHome</local-home>
-        <local>org.apache.openejb.arquillian.tests.cmp.sample.Person</local>
-        <ejb-link>PersonBean</ejb-link>
-      </ejb-local-ref>
     </session>
-    <entity>
-      <ejb-name>PersonBean</ejb-name>
-      <local-home>org.apache.openejb.arquillian.tests.cmp.sample.PersonLocalHome</local-home>
-      <local>org.apache.openejb.arquillian.tests.cmp.sample.Person</local>
-      <ejb-class>org.apache.openejb.arquillian.tests.cmp.sample.PersonBean</ejb-class>
-      <persistence-type>Container</persistence-type>
-      <prim-key-class>java.lang.Integer</prim-key-class>
-      <reentrant>false</reentrant>
-      <cmp-version>2.x</cmp-version>
-      <abstract-schema-name>PersonBean</abstract-schema-name>
-      <cmp-field>
-        <field-name>id</field-name>
-      </cmp-field>
-      <cmp-field>
-        <field-name>name</field-name>
-      </cmp-field>
-      <primkey-field>id</primkey-field>
-      <query>
-        <query-method>
-          <method-name>findAll</method-name>
-          <method-params/>
-        </query-method>
-        <ejb-ql>SELECT p FROM PersonBean as p</ejb-ql>
-      </query>
-    </entity>
   </enterprise-beans>
   <assembly-descriptor>
     <container-transaction>
@@ -74,12 +42,5 @@
       </method>
       <trans-attribute>Required</trans-attribute>
     </container-transaction>
-    <container-transaction>
-      <method>
-        <ejb-name>PersonBean</ejb-name>
-        <method-name>*</method-name>
-      </method>
-      <trans-attribute>Supports</trans-attribute>
-    </container-transaction>
   </assembly-descriptor>
 </ejb-jar>

http://git-wip-us.apache.org/repos/asf/tomee/blob/7dfdc4ae/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
index 1de720e..166128c 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
@@ -1,11 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
-    <enterprise-beans>
-        <entity>
-            <ejb-name>PersonBean</ejb-name>
-            <key-generator xmlns="http://www.openejb.org/xml/ns/pkgen-2.1">
-                <uuid/>
-            </key-generator>
-        </entity>
-    </enterprise-beans>
+    <enterprise-beans/>
 </openejb-jar>
\ No newline at end of file


[02/24] tomee git commit: TOMEE-2295 Improvements for JPA/CMP mapping

Posted by jg...@apache.org.
TOMEE-2295 Improvements for JPA/CMP mapping


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

Branch: refs/heads/master
Commit: ddbae44e280cb9e8f0e10ea7754b5eed69733cb4
Parents: 9c585b0
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Wed Nov 28 13:53:40 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Wed Nov 28 13:53:40 2018 +0000

----------------------------------------------------------------------
 .../apache/openejb/config/CmpJpaConversion.java | 110 +++++++++++++------
 .../openejb/core/LegacyInterfaceTest.java       |  40 ++-----
 2 files changed, 84 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/ddbae44e/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java b/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
index 7f0e3f1..194bbd9 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/config/CmpJpaConversion.java
@@ -20,20 +20,7 @@ package org.apache.openejb.config;
 import org.apache.openejb.OpenEJBException;
 import org.apache.openejb.core.cmp.CmpUtil;
 import org.apache.openejb.core.cmp.jpa.JpaCmpEngine;
-import org.apache.openejb.jee.CmpField;
-import org.apache.openejb.jee.CmpVersion;
-import org.apache.openejb.jee.EjbJar;
-import org.apache.openejb.jee.EjbRelation;
-import org.apache.openejb.jee.EjbRelationshipRole;
-import org.apache.openejb.jee.EnterpriseBean;
-import org.apache.openejb.jee.EntityBean;
-import org.apache.openejb.jee.Multiplicity;
-import org.apache.openejb.jee.PersistenceContextRef;
-import org.apache.openejb.jee.PersistenceType;
-import org.apache.openejb.jee.Query;
-import org.apache.openejb.jee.QueryMethod;
-import org.apache.openejb.jee.RelationshipRoleSource;
-import org.apache.openejb.jee.Relationships;
+import org.apache.openejb.jee.*;
 import org.apache.openejb.jee.jpa.AttributeOverride;
 import org.apache.openejb.jee.jpa.Attributes;
 import org.apache.openejb.jee.jpa.Basic;
@@ -58,6 +45,7 @@ import org.apache.openejb.jee.jpa.unit.PersistenceUnit;
 import org.apache.openejb.jee.jpa.unit.TransactionType;
 import org.apache.openejb.jee.oejb3.EjbDeployment;
 import org.apache.openejb.jee.oejb3.OpenejbJar;
+import org.apache.openejb.loader.IO;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
@@ -67,6 +55,7 @@ import javax.ejb.EJBLocalObject;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
+import java.net.URL;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -99,15 +88,38 @@ public class CmpJpaConversion implements DynamicDeployer {
         "serialVersionUID"
     )));
 
+    public static EntityMappings readEntityMappings(final String location) {
+
+        // first try the classpath
+        EntityMappings entitymappings = null;
+
+        try {
+            final URL cpUrl = Thread.currentThread().getContextClassLoader().getResource(location);
+            entitymappings = (EntityMappings) JaxbJavaee.unmarshal(EntityMappings.class, IO.read(cpUrl));
+        } catch (Exception e) {
+            // ignore
+        }
+
+        if (entitymappings == null) {
+            // then try reading as a URL
+            try {
+                final URL url = new URL(location);
+                entitymappings = (EntityMappings) JaxbJavaee.unmarshal(EntityMappings.class, IO.read(url));
+            } catch (Exception e) {
+                logger.error("Unable to read entity mappings from " + location, e);
+            }
+        }
+
+        return entitymappings;
+    }
+
     public AppModule deploy(final AppModule appModule) throws OpenEJBException {
 
         if (!hasCmpEntities(appModule)) {
             return appModule;
         }
 
-        // todo scan existing persistence module for all entity mappings and don't generate mappings for them
-
-        // create mappings if no mappings currently exist 
+        // create mappings if no mappings currently exist
         EntityMappings cmpMappings = appModule.getCmpMappings();
         if (cmpMappings == null) {
             cmpMappings = new EntityMappings();
@@ -115,6 +127,23 @@ public class CmpJpaConversion implements DynamicDeployer {
             appModule.setCmpMappings(cmpMappings);
         }
 
+        // todo scan existing persistence module for all entity mappings and don't generate mappings for them
+
+        final Set<String> definedMappedClasses = new HashSet<>();
+
+        // check for an existing "cmp" persistence unit, and look at existing mappings
+        final PersistenceUnit cmpPersistenceUnit = findCmpPersistenceUnit(appModule);
+        if (cmpPersistenceUnit != null) {
+            if (cmpPersistenceUnit.getMappingFile() != null || cmpPersistenceUnit.getMappingFile().size() > 0) {
+                for (final String mappingFile : cmpPersistenceUnit.getMappingFile()) {
+                    final EntityMappings entityMappings = readEntityMappings(mappingFile);
+                    if (entityMappings != null) {
+                        definedMappedClasses.addAll(entityMappings.getEntityMap().keySet());
+                    }
+                }
+            }
+        }
+
         // we process this one jar-file at a time...each contributing to the 
         // app mapping data 
         for (final EjbModule ejbModule : appModule.getEjbModules()) {
@@ -123,7 +152,7 @@ public class CmpJpaConversion implements DynamicDeployer {
             // scan for CMP entity beans and merge the data into the collective set 
             for (final EnterpriseBean enterpriseBean : ejbJar.getEnterpriseBeans()) {
                 if (isCmpEntity(enterpriseBean)) {
-                    processEntityBean(ejbModule, cmpMappings, (EntityBean) enterpriseBean);
+                    processEntityBean(ejbModule, definedMappedClasses, cmpMappings, (EntityBean) enterpriseBean);
                 }
             }
 
@@ -152,7 +181,6 @@ public class CmpJpaConversion implements DynamicDeployer {
             for (final MappedSuperclass mapping : userMappings.getMappedSuperclass()) {
                 logger.warning("openejb-cmp-orm.xml mapping ignored: module=" + ejbModule.getModuleId() + ":  <mapped-superclass class=\"" + mapping.getClazz() + "\">");
             }
-
         }
 
         if (!cmpMappings.getEntity().isEmpty()) {
@@ -160,7 +188,9 @@ public class CmpJpaConversion implements DynamicDeployer {
 
             persistenceUnit.getMappingFile().add("META-INF/openejb-cmp-generated-orm.xml");
             for (final Entity entity : cmpMappings.getEntity()) {
-                persistenceUnit.getClazz().add(entity.getClazz());
+                if (! persistenceUnit.getClazz().contains(entity.getClazz())) {
+                    persistenceUnit.getClazz().add(entity.getClazz());
+                }
             }
         }
 
@@ -176,17 +206,7 @@ public class CmpJpaConversion implements DynamicDeployer {
 
     private PersistenceUnit getCmpPersistenceUnit(final AppModule appModule) {
         // search for the cmp persistence unit
-        PersistenceUnit persistenceUnit = null;
-        for (final PersistenceModule persistenceModule : appModule.getPersistenceModules()) {
-            final Persistence persistence = persistenceModule.getPersistence();
-            for (final PersistenceUnit unit : persistence.getPersistenceUnit()) {
-                if (CMP_PERSISTENCE_UNIT_NAME.equals(unit.getName())) {
-                    persistenceUnit = unit;
-                    break;
-                }
-
-            }
-        }
+        PersistenceUnit persistenceUnit = findCmpPersistenceUnit(appModule);
         // if not found create one
         if (persistenceUnit == null) {
             persistenceUnit = new PersistenceUnit();
@@ -215,6 +235,21 @@ public class CmpJpaConversion implements DynamicDeployer {
         return persistenceUnit;
     }
 
+    private PersistenceUnit findCmpPersistenceUnit(final AppModule appModule) {
+        PersistenceUnit persistenceUnit = null;
+        for (final PersistenceModule persistenceModule : appModule.getPersistenceModules()) {
+            final Persistence persistence = persistenceModule.getPersistence();
+            for (final PersistenceUnit unit : persistence.getPersistenceUnit()) {
+                if (CMP_PERSISTENCE_UNIT_NAME.equals(unit.getName())) {
+                    persistenceUnit = unit;
+                    break;
+                }
+
+            }
+        }
+        return persistenceUnit;
+    }
+
     private String getPersistenceModuleId(final AppModule appModule) {
         if (appModule.getModuleId() != null) {
             return appModule.getModuleId();
@@ -437,12 +472,14 @@ public class CmpJpaConversion implements DynamicDeployer {
     /**
      * Generate the CMP mapping data for an individual
      * EntityBean.
-     *
-     * @param ejbModule      The module containing the bean.
+     *  @param ejbModule      The module containing the bean.
+     * @param ignoreClasses
      * @param entityMappings The accumulated set of entity mappings.
      * @param bean           The been we're generating the mapping for.
      */
-    private void processEntityBean(final EjbModule ejbModule, final EntityMappings entityMappings, final EntityBean bean) {
+    private void processEntityBean(final EjbModule ejbModule, final Collection<String> ignoreClasses,
+                                   final EntityMappings entityMappings, final EntityBean bean) {
+
         // try to add a new persistence-context-ref for cmp
         if (!addPersistenceContextRef(bean)) {
             // Bean already has a persistence-context-ref for cmp
@@ -478,6 +515,11 @@ public class CmpJpaConversion implements DynamicDeployer {
             }
         }
 
+        // Check that this mapping hasn't already been defined in another mapping file on the persistence unit
+        if (ignoreClasses.contains(jpaEntityClassName)) {
+            return;
+        }
+
         // Look for an existing mapping using the openejb generated subclass name
         Entity entity = removeEntity(userMappings, jpaEntityClassName);
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/ddbae44e/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java b/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java
index 0b4b73f..0e1f2d7 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/core/LegacyInterfaceTest.java
@@ -253,43 +253,16 @@ public class LegacyInterfaceTest extends TestCase {
             throw new Exception("Failed to create test directory: " + f);
         }
 
-        final EntityMappings entityMappings = new EntityMappings();
-
-        final Entity entity = new Entity();
-        entity.setClazz("openejb.org.apache.openejb.core.MyCmpBean");
-        entity.setName("MyCmpBean");
-        entity.setDescription("MyCmpBean");
-        entity.setAttributes(new Attributes());
-
-        final NamedQuery namedQuery = new NamedQuery();
-        namedQuery.setQuery("SELECT OBJECT(DL) FROM License DL");
-        entity.getNamedQuery().add(namedQuery);
-
-        final Id id = new Id();
-        id.setName("id");
-        entity.getAttributes().getId().add(id);
-
-        final Basic basic = new Basic();
-        basic.setName("name");
-        final Column column = new Column();
-        column.setName("wNAME");
-        column.setLength(300);
-        basic.setColumn(column);
-        entity.getAttributes().getBasic().add(basic);
-
-        entityMappings.getEntity().add(entity);
-
         final AppModule module = new AppModule(this.getClass().getClassLoader(), f.getAbsolutePath());
         final EjbModule ejbModule = new EjbModule(ejbJar);
 
-
         Persistence persistence = new Persistence();
         PersistenceUnit pu = persistence.addPersistenceUnit("cmp");
         pu.setTransactionType(TransactionType.JTA);
         pu.setJtaDataSource("fake");
         pu.setNonJtaDataSource("fake");
         pu.getMappingFile().add("test-orm.xml");
-        pu.addClass("openejb.org.apache.openejb.core.MyCmpBean");
+        pu.getClazz().add("openejb.org.apache.openejb.core.MyCmpBean");
         module.addPersistenceModule(new PersistenceModule("pu", persistence));
 
         module.getEjbModules().add(ejbModule);
@@ -297,12 +270,15 @@ public class LegacyInterfaceTest extends TestCase {
         assertNull(module.getCmpMappings());
         assembler.createApplication(config.configureApplication(module));
         assertNotNull(module.getCmpMappings());
+
+        // no mapping should be automatically generated
+        assertTrue(module.getCmpMappings().getEntityMap().isEmpty());
+
+        // pu should not be modified, no duplicate classes
         assertEquals(1, pu.getClazz().size());
         assertEquals("openejb.org.apache.openejb.core.MyCmpBean", pu.getClazz().get(0));
-        final List<Basic> basicList = module.getCmpMappings().getEntityMap().get("openejb.org.apache.openejb.core.MyCmpBean").getAttributes().getBasic();
-        assertEquals(1, basicList.size());
-        assertEquals(300, basicList.get(0).getColumn().getLength().intValue());
-        assertEquals("wNAME", basicList.get(0).getColumn().getName());
+        assertEquals(1, pu.getMappingFile().size());
+        assertEquals("test-orm.xml", pu.getMappingFile().get(0));
     }
 
     @LocalHome(MyLocalHome.class)


[13/24] tomee git commit: TOMEE-2295 attempting something else

Posted by jg...@apache.org.
TOMEE-2295 attempting something else


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

Branch: refs/heads/master
Commit: 4b289065d571c0115499391d6574d263a7c81aca
Parents: 79d386f
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Tue Dec 4 14:45:20 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Tue Dec 4 14:45:20 2018 +0000

----------------------------------------------------------------------
 .../arquillian/tests/cmp/sample/Actor.java      | 35 -----------
 .../arquillian/tests/cmp/sample/ActorBean.java  | 45 --------------
 .../tests/cmp/sample/ActorLocalHome.java        | 34 -----------
 .../tests/cmp/sample/CustomOrmXmlTest.java      |  2 +-
 .../tests/cmp/sample/MovieServlet.java          |  4 +-
 .../tests/cmp/sample/MoviesBusinessBean.java    |  9 +--
 .../tests/cmp/sample/MoviesBusinessLocal.java   |  2 +-
 .../arquillian/tests/cmp/sample/Person.java     | 32 ++++++++++
 .../arquillian/tests/cmp/sample/PersonBean.java | 64 ++++++++++++++++++++
 .../tests/cmp/sample/PersonLocalHome.java       | 34 +++++++++++
 .../arquillian/tests/cmp/sample/ejb-jar.xml     | 27 ++++-----
 .../arquillian/tests/cmp/sample/openejb-jar.xml |  8 +--
 12 files changed, 152 insertions(+), 144 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/4b289065/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Actor.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Actor.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Actor.java
deleted file mode 100644
index 739b53c..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Actor.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-/**
- * @version $Revision$ $Date$
- */
-public interface Actor extends javax.ejb.EJBLocalObject {
-
-    Integer getId();
-
-    void setId(Integer id);
-
-    String getFirstname();
-
-    void setFirstname(String firstname);
-
-    String getLastname();
-
-    void setLastname(String lastname);
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/4b289065/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
deleted file mode 100644
index 3ac4087..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-import javax.ejb.EntityBean;
-
-public abstract class ActorBean implements EntityBean {
-
-    public ActorBean() {
-    }
-
-    public Integer ejbCreate(final String firstName, final String lastName) {
-        this.setFirstname(firstName);
-        this.setLastname(lastName);
-        return null;
-    }
-
-    public abstract Integer getId();
-
-    public abstract void setId(Integer id);
-
-    public abstract String getFirstname();
-
-    public abstract void setFirstname(String firstname);
-
-    public abstract String getLastname();
-
-    public abstract void setLastname(String lastname);
-
-
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/4b289065/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorLocalHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorLocalHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorLocalHome.java
deleted file mode 100644
index 9878d6f..0000000
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorLocalHome.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.cmp.sample;
-
-import javax.ejb.CreateException;
-import javax.ejb.FinderException;
-import java.util.Collection;
-
-/**
- * @version $Revision$ $Date$
- */
-interface ActorLocalHome extends javax.ejb.EJBLocalHome {
-
-    Actor create(String firstName, String lastName) throws CreateException;
-
-    Actor findByPrimaryKey(Integer primarykey) throws FinderException;
-
-    Collection findAll() throws FinderException;
-
-}

http://git-wip-us.apache.org/repos/asf/tomee/blob/4b289065/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
index 7a706f3..2a96925 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
@@ -43,7 +43,7 @@ public class CustomOrmXmlTest {
     public static WebArchive createDeployment() {
         WebArchive archive = ShrinkWrap.create(WebArchive.class, CustomOrmXmlTest.class.getSimpleName() + ".war")
                 .addClasses(MovieServlet.class, MovieException.class, MoviesBusinessBean.class,
-                        MoviesBusinessLocal.class, MoviesBusinessLocalHome.class, ActorBean.class, ActorLocalHome.class, Actor.class)
+                        MoviesBusinessLocal.class, MoviesBusinessLocalHome.class, PersonBean.class, PersonLocalHome.class, Person.class)
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml"), "openejb-jar.xml")
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml"), "ejb-jar.xml")
                 .addAsWebInfResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/cmp/sample/web.xml"), "web.xml");

http://git-wip-us.apache.org/repos/asf/tomee/blob/4b289065/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
index 730e78d..213439b 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieServlet.java
@@ -52,8 +52,8 @@ public class MovieServlet extends HttpServlet {
 
             final MoviesBusinessLocal bean = home.create();
 
-            bean.addActor("Will", "Smith");
-            pw.println("Actor added successfully");
+            bean.addActor("Will Smith");
+            pw.println("Person added successfully");
             bean.remove();
             pw.flush();
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/4b289065/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
index 3baa70a..0f6cced 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
@@ -45,16 +45,17 @@ public class MoviesBusinessBean implements SessionBean {
         this.ctx = ctx;
     }
 
-    public void addActor(final String firstName, final String lastName) throws MovieException {
+    public void addActor(final String name) throws MovieException {
         try {
             final InitialContext context = new InitialContext();
 
-            final ActorLocalHome actorLocalHome = (ActorLocalHome)
-                    PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/ActorBean"), ActorLocalHome.class);
+            final PersonLocalHome personLocalHome = (PersonLocalHome)
+                    PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/PersonBean"), PersonLocalHome.class);
 
-            final Actor actor = actorLocalHome.create(firstName, lastName);
+            final Person person = personLocalHome.create(name);
         } catch (NamingException | CreateException e) {
             throw new MovieException(e);
         }
     }
+
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/4b289065/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
index a924686..3e458a7 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessLocal.java
@@ -20,5 +20,5 @@ import java.rmi.RemoteException;
 
 public interface MoviesBusinessLocal extends javax.ejb.EJBLocalObject {
 
-    int addActor(final String firstName, final String lastName) throws RemoteException, MovieException;
+    int addActor(final String name) throws RemoteException, MovieException;
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/4b289065/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Person.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Person.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Person.java
new file mode 100644
index 0000000..31aeb87
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/Person.java
@@ -0,0 +1,32 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface Person extends javax.ejb.EJBLocalObject {
+
+    Integer getId();
+
+    void setId(Integer id);
+
+    String getName();
+
+    void setName(String name);
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/4b289065/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonBean.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonBean.java
new file mode 100644
index 0000000..39c0ef4
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonBean.java
@@ -0,0 +1,64 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+import javax.ejb.CreateException;
+import javax.ejb.EntityBean;
+import javax.ejb.EntityContext;
+
+public abstract class PersonBean implements EntityBean {
+
+    public PersonBean() {
+    }
+
+    public Integer ejbCreate(final String name) {
+        this.setName(name);
+        return null;
+    }
+
+    public abstract Integer getId();
+
+    public abstract void setId(Integer id);
+
+    public abstract String getName();
+
+    public abstract void setName(String name);
+
+    public void ejbPostCreate(String name) throws CreateException {
+    }
+
+    public void setEntityContext(EntityContext ctx) {
+    }
+
+    public void unsetEntityContext() {
+    }
+
+    public void ejbRemove() {
+    }
+
+    public void ejbLoad() {
+    }
+
+    public void ejbStore() {
+    }
+
+    public void ejbPassivate() {
+    }
+
+    public void ejbActivate() {
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/4b289065/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonLocalHome.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonLocalHome.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonLocalHome.java
new file mode 100644
index 0000000..c35a0ae
--- /dev/null
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/PersonLocalHome.java
@@ -0,0 +1,34 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.cmp.sample;
+
+import javax.ejb.CreateException;
+import javax.ejb.FinderException;
+import java.util.Collection;
+
+/**
+ * @version $Revision$ $Date$
+ */
+interface PersonLocalHome extends javax.ejb.EJBLocalHome {
+
+    Person create(String name) throws CreateException;
+
+    Person findByPrimaryKey(Integer primarykey) throws FinderException;
+
+    Collection findAll() throws FinderException;
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/4b289065/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
index 556dfc3..c5af41d 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/ejb-jar.xml
@@ -33,31 +33,28 @@
       <session-type>Stateless</session-type>
       <transaction-type>Container</transaction-type>
       <ejb-local-ref>
-        <ejb-ref-name>ejb/ActorBean</ejb-ref-name>
+        <ejb-ref-name>ejb/PersonBean</ejb-ref-name>
         <ejb-ref-type>Entity</ejb-ref-type>
-        <local-home>org.apache.openejb.arquillian.tests.cmp.sample.ActorLocalHome</local-home>
-        <local>org.apache.openejb.arquillian.tests.cmp.sample.Actor</local>
-        <ejb-link>ActorBean</ejb-link>
+        <local-home>org.apache.openejb.arquillian.tests.cmp.sample.PersonLocalHome</local-home>
+        <local>org.apache.openejb.arquillian.tests.cmp.sample.Person</local>
+        <ejb-link>PersonBean</ejb-link>
       </ejb-local-ref>
     </session>
     <entity>
-      <ejb-name>ActorBean</ejb-name>
-      <local-home>org.apache.openejb.arquillian.tests.cmp.sample.ActorLocalHome</local-home>
-      <local>org.apache.openejb.arquillian.tests.cmp.sample.Actor</local>
-      <ejb-class>org.apache.openejb.arquillian.tests.cmp.sample.ActorBean</ejb-class>
+      <ejb-name>PersonBean</ejb-name>
+      <local-home>org.apache.openejb.arquillian.tests.cmp.sample.PersonLocalHome</local-home>
+      <local>org.apache.openejb.arquillian.tests.cmp.sample.Person</local>
+      <ejb-class>org.apache.openejb.arquillian.tests.cmp.sample.PersonBean</ejb-class>
       <persistence-type>Container</persistence-type>
       <prim-key-class>java.lang.Integer</prim-key-class>
       <reentrant>false</reentrant>
       <cmp-version>2.x</cmp-version>
-      <abstract-schema-name>ActorBean</abstract-schema-name>
+      <abstract-schema-name>PersonBean</abstract-schema-name>
       <cmp-field>
         <field-name>id</field-name>
       </cmp-field>
       <cmp-field>
-        <field-name>firstname</field-name>
-      </cmp-field>
-      <cmp-field>
-        <field-name>lastname</field-name>
+        <field-name>name</field-name>
       </cmp-field>
       <primkey-field>id</primkey-field>
       <query>
@@ -65,7 +62,7 @@
           <method-name>findAll</method-name>
           <method-params/>
         </query-method>
-        <ejb-ql>SELECT a FROM ActorBean as a</ejb-ql>
+        <ejb-ql>SELECT p FROM PersonBean as p</ejb-ql>
       </query>
     </entity>
   </enterprise-beans>
@@ -79,7 +76,7 @@
     </container-transaction>
     <container-transaction>
       <method>
-        <ejb-name>ActorBean</ejb-name>
+        <ejb-name>PersonBean</ejb-name>
         <method-name>*</method-name>
       </method>
       <trans-attribute>Supports</trans-attribute>

http://git-wip-us.apache.org/repos/asf/tomee/blob/4b289065/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
index e01a3de..1de720e 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/org/apache/openejb/arquillian/tests/cmp/sample/openejb-jar.xml
@@ -2,13 +2,7 @@
 <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
     <enterprise-beans>
         <entity>
-            <ejb-name>MovieBean</ejb-name>
-            <key-generator xmlns="http://www.openejb.org/xml/ns/pkgen-2.1">
-                <uuid/>
-            </key-generator>
-        </entity>
-        <entity>
-            <ejb-name>ActorBean</ejb-name>
+            <ejb-name>PersonBean</ejb-name>
             <key-generator xmlns="http://www.openejb.org/xml/ns/pkgen-2.1">
                 <uuid/>
             </key-generator>


[23/24] tomee git commit: TOMEE-2295 fixing test

Posted by jg...@apache.org.
TOMEE-2295 fixing test


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

Branch: refs/heads/master
Commit: 29c8208d82c2d6312a1c7dc2228dec8420daae71
Parents: 4086d2c
Author: Jonathan Gallimore <jg...@tomitribe.com>
Authored: Wed Dec 5 21:56:49 2018 +0000
Committer: Jonathan Gallimore <jg...@tomitribe.com>
Committed: Wed Dec 5 21:56:49 2018 +0000

----------------------------------------------------------------------
 .../openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/29c8208d/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
index e8141b6..d48d27e 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
@@ -70,7 +70,7 @@ public class CustomOrmXmlTest {
         Assert.assertTrue(output.contains("TABLE_NAME: MOVIE, COLUMN_NAME: GENRE, DATA_TYPE: CHARACTER VARYING, CHARACTER_MAXIMUM_LENGTH: 255"));
         Assert.assertTrue(output.contains("TABLE_NAME: MOVIE, COLUMN_NAME: MOVIE_NAME, DATA_TYPE: CHARACTER VARYING, CHARACTER_MAXIMUM_LENGTH: 250"));
 
-        final String[] split = output.split("\r\n");
+        final String[] split = output.split("\r?\n");
         Assert.assertEquals(7, split.length);
     }
 }