tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgallim...@apache.org
Subject [13/30] tomee git commit: TOMEE-2295 - ripping a lot of stuff out of this. Still not working.
Date Wed, 19 Dec 2018 22:10:57 GMT
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/f3406e01
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/f3406e01
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/f3406e01

Branch: refs/heads/tomee-7.1.x
Commit: f3406e015c372de66629e5448018e19176d00eea
Parents: bb3aa32
Author: Jonathan Gallimore <jon@jrg.me.uk>
Authored: Tue Dec 4 14:29:14 2018 +0000
Committer: Otavio Santana <otaviopolianasantana@gmail.com>
Committed: Mon Dec 17 13:57:45 2018 -0200

----------------------------------------------------------------------
 .../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/f3406e01/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 866840e..49f6d57 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/pom.xml
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/pom.xml
@@ -50,6 +50,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/f3406e01/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/f3406e01/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/f3406e01/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/f3406e01/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/f3406e01/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/f3406e01/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/f3406e01/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/f3406e01/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/f3406e01/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/f3406e01/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/f3406e01/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/f3406e01/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/f3406e01/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/f3406e01/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/f3406e01/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


Mime
View raw message