tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andygumbre...@apache.org
Subject [04/33] tomee git commit: Align SNAPSHOT versions & reformat examples
Date Fri, 25 Sep 2015 10:42:39 GMT
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/ReadPermission.java
----------------------------------------------------------------------
diff --git a/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/ReadPermission.java b/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/ReadPermission.java
index 9614e09..b0e8a9d 100644
--- a/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/ReadPermission.java
+++ b/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/ReadPermission.java
@@ -1,40 +1,40 @@
-/**
- * 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.superbiz.injection.secure.api;
-
-import javax.annotation.security.PermitAll;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Metatype
-@Target(ElementType.METHOD)
-@Retention(RetentionPolicy.RUNTIME)
-
-public @interface ReadPermission {
-
-    public static interface $ {
-
-        @ReadPermission
-        @PermitAll
-        @TransactionAttribute(TransactionAttributeType.SUPPORTS)
-        public void method();
-    }
+/**
+ * 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.superbiz.injection.secure.api;
+
+import javax.annotation.security.PermitAll;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Metatype
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+
+public @interface ReadPermission {
+
+    public static interface $ {
+
+        @ReadPermission
+        @PermitAll
+        @TransactionAttribute(TransactionAttributeType.SUPPORTS)
+        public void method();
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/RunAsEmployee.java
----------------------------------------------------------------------
diff --git a/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/RunAsEmployee.java b/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/RunAsEmployee.java
index 1600c69..bba18b1 100644
--- a/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/RunAsEmployee.java
+++ b/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/RunAsEmployee.java
@@ -1,32 +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
- *
- *     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.superbiz.injection.secure.api;
-
-import javax.annotation.security.RunAs;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Metatype
-@Target({ElementType.TYPE, ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-
-@RunAs("Employee")
-public @interface RunAsEmployee {
-
+/**
+ * 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.superbiz.injection.secure.api;
+
+import javax.annotation.security.RunAs;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Metatype
+@Target({ElementType.TYPE, ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+
+@RunAs("Employee")
+public @interface RunAsEmployee {
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/RunAsManager.java
----------------------------------------------------------------------
diff --git a/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/RunAsManager.java b/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/RunAsManager.java
index 64e07db..3061ae8 100644
--- a/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/RunAsManager.java
+++ b/examples/testing-security-meta/src/main/java/org/superbiz/injection/secure/api/RunAsManager.java
@@ -1,32 +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
- *
- *     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.superbiz.injection.secure.api;
-
-import javax.annotation.security.RunAs;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Metatype
-@Target({ElementType.TYPE, ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-
-@RunAs("Manager")
-public @interface RunAsManager {
-
+/**
+ * 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.superbiz.injection.secure.api;
+
+import javax.annotation.security.RunAs;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Metatype
+@Target({ElementType.TYPE, ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+
+@RunAs("Manager")
+public @interface RunAsManager {
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/testing-security-meta/src/test/java/org/superbiz/injection/secure/MovieTest.java
----------------------------------------------------------------------
diff --git a/examples/testing-security-meta/src/test/java/org/superbiz/injection/secure/MovieTest.java b/examples/testing-security-meta/src/test/java/org/superbiz/injection/secure/MovieTest.java
index 47f6efd..e1e8a40 100644
--- a/examples/testing-security-meta/src/test/java/org/superbiz/injection/secure/MovieTest.java
+++ b/examples/testing-security-meta/src/test/java/org/superbiz/injection/secure/MovieTest.java
@@ -1,158 +1,158 @@
-/**
- * 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.superbiz.injection.secure;
-
-import junit.framework.TestCase;
-import org.superbiz.injection.secure.api.RunAsEmployee;
-import org.superbiz.injection.secure.api.RunAsManager;
-
-import javax.ejb.EJB;
-import javax.ejb.EJBAccessException;
-import javax.ejb.Stateless;
-import javax.ejb.embeddable.EJBContainer;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-
-//START SNIPPET: code
-
-public class MovieTest extends TestCase {
-
-    @EJB
-    private Movies movies;
-
-    @EJB(beanName = "ManagerBean")
-    private Caller manager;
-
-    @EJB(beanName = "EmployeeBean")
-    private Caller employee;
-
-    protected void setUp() throws Exception {
-        Properties p = new Properties();
-        p.put("movieDatabase", "new://Resource?type=DataSource");
-        p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
-        p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
-
-        EJBContainer.createEJBContainer(p).getContext().bind("inject", this);
-    }
-
-    public void testAsManager() throws Exception {
-        manager.call(new Callable() {
-            public Object call() throws Exception {
-
-                movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
-                movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
-                movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
-
-                List<Movie> list = movies.getMovies();
-                assertEquals("List.size()", 3, list.size());
-
-                for (Movie movie : list) {
-                    movies.deleteMovie(movie);
-                }
-
-                assertEquals("Movies.getMovies()", 0, movies.getMovies().size());
-                return null;
-            }
-        });
-    }
-
-    public void testAsEmployee() throws Exception {
-        employee.call(new Callable() {
-            public Object call() throws Exception {
-
-                movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
-                movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
-                movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
-
-                List<Movie> list = movies.getMovies();
-                assertEquals("List.size()", 3, list.size());
-
-                for (Movie movie : list) {
-                    try {
-                        movies.deleteMovie(movie);
-                        fail("Employees should not be allowed to delete");
-                    } catch (EJBAccessException e) {
-                        // Good, Employees cannot delete things
-                    }
-                }
-
-                // The list should still be three movies long
-                assertEquals("Movies.getMovies()", 3, movies.getMovies().size());
-                return null;
-            }
-        });
-    }
-
-    public void testUnauthenticated() throws Exception {
-        try {
-            movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
-            fail("Unauthenticated users should not be able to add movies");
-        } catch (EJBAccessException e) {
-            // Good, guests cannot add things
-        }
-
-        try {
-            movies.deleteMovie(null);
-            fail("Unauthenticated users should not be allowed to delete");
-        } catch (EJBAccessException e) {
-            // Good, Unauthenticated users cannot delete things
-        }
-
-        try {
-            // Read access should be allowed
-
-            List<Movie> list = movies.getMovies();
-
-        } catch (EJBAccessException e) {
-            fail("Read access should be allowed");
-        }
-
-    }
-
-    public interface Caller {
-
-        public <V> V call(Callable<V> callable) throws Exception;
-    }
-
-    /**
-     * This little bit of magic allows our test code to execute in
-     * the desired security scope.
-     */
-
-    @Stateless
-    @RunAsManager
-    public static class ManagerBean implements Caller {
-
-        public <V> V call(Callable<V> callable) throws Exception {
-            return callable.call();
-        }
-
-    }
-
-    @Stateless
-    @RunAsEmployee
-    public static class EmployeeBean implements Caller {
-
-        public <V> V call(Callable<V> callable) throws Exception {
-            return callable.call();
-        }
-
-    }
-
-}
-//END SNIPPET: code
+/**
+ * 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.superbiz.injection.secure;
+
+import junit.framework.TestCase;
+import org.superbiz.injection.secure.api.RunAsEmployee;
+import org.superbiz.injection.secure.api.RunAsManager;
+
+import javax.ejb.EJB;
+import javax.ejb.EJBAccessException;
+import javax.ejb.Stateless;
+import javax.ejb.embeddable.EJBContainer;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+
+//START SNIPPET: code
+
+public class MovieTest extends TestCase {
+
+    @EJB
+    private Movies movies;
+
+    @EJB(beanName = "ManagerBean")
+    private Caller manager;
+
+    @EJB(beanName = "EmployeeBean")
+    private Caller employee;
+
+    protected void setUp() throws Exception {
+        Properties p = new Properties();
+        p.put("movieDatabase", "new://Resource?type=DataSource");
+        p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
+        p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
+
+        EJBContainer.createEJBContainer(p).getContext().bind("inject", this);
+    }
+
+    public void testAsManager() throws Exception {
+        manager.call(new Callable() {
+            public Object call() throws Exception {
+
+                movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
+                movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
+                movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
+
+                List<Movie> list = movies.getMovies();
+                assertEquals("List.size()", 3, list.size());
+
+                for (Movie movie : list) {
+                    movies.deleteMovie(movie);
+                }
+
+                assertEquals("Movies.getMovies()", 0, movies.getMovies().size());
+                return null;
+            }
+        });
+    }
+
+    public void testAsEmployee() throws Exception {
+        employee.call(new Callable() {
+            public Object call() throws Exception {
+
+                movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
+                movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
+                movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
+
+                List<Movie> list = movies.getMovies();
+                assertEquals("List.size()", 3, list.size());
+
+                for (Movie movie : list) {
+                    try {
+                        movies.deleteMovie(movie);
+                        fail("Employees should not be allowed to delete");
+                    } catch (EJBAccessException e) {
+                        // Good, Employees cannot delete things
+                    }
+                }
+
+                // The list should still be three movies long
+                assertEquals("Movies.getMovies()", 3, movies.getMovies().size());
+                return null;
+            }
+        });
+    }
+
+    public void testUnauthenticated() throws Exception {
+        try {
+            movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
+            fail("Unauthenticated users should not be able to add movies");
+        } catch (EJBAccessException e) {
+            // Good, guests cannot add things
+        }
+
+        try {
+            movies.deleteMovie(null);
+            fail("Unauthenticated users should not be allowed to delete");
+        } catch (EJBAccessException e) {
+            // Good, Unauthenticated users cannot delete things
+        }
+
+        try {
+            // Read access should be allowed
+
+            List<Movie> list = movies.getMovies();
+
+        } catch (EJBAccessException e) {
+            fail("Read access should be allowed");
+        }
+
+    }
+
+    public interface Caller {
+
+        public <V> V call(Callable<V> callable) throws Exception;
+    }
+
+    /**
+     * This little bit of magic allows our test code to execute in
+     * the desired security scope.
+     */
+
+    @Stateless
+    @RunAsManager
+    public static class ManagerBean implements Caller {
+
+        public <V> V call(Callable<V> callable) throws Exception {
+            return callable.call();
+        }
+
+    }
+
+    @Stateless
+    @RunAsEmployee
+    public static class EmployeeBean implements Caller {
+
+        public <V> V call(Callable<V> callable) throws Exception {
+            return callable.call();
+        }
+
+    }
+
+}
+//END SNIPPET: code

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/testing-security/src/main/java/org/superbiz/injection/secure/Movie.java
----------------------------------------------------------------------
diff --git a/examples/testing-security/src/main/java/org/superbiz/injection/secure/Movie.java b/examples/testing-security/src/main/java/org/superbiz/injection/secure/Movie.java
index b5df45c..73fdf33 100644
--- a/examples/testing-security/src/main/java/org/superbiz/injection/secure/Movie.java
+++ b/examples/testing-security/src/main/java/org/superbiz/injection/secure/Movie.java
@@ -1,61 +1,61 @@
-/**
- * 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.superbiz.injection.secure;
-
-import javax.persistence.Entity;
-
-@Entity
-public class Movie {
-
-    private String director;
-    private String title;
-    private int year;
-
-    public Movie() {
-    }
-
-    public Movie(String director, String title, int year) {
-        this.director = director;
-        this.title = title;
-        this.year = year;
-    }
-
-    public String getDirector() {
-        return director;
-    }
-
-    public void setDirector(String director) {
-        this.director = director;
-    }
-
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    public int getYear() {
-        return year;
-    }
-
-    public void setYear(int year) {
-        this.year = year;
-    }
-
-}
+/**
+ * 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.superbiz.injection.secure;
+
+import javax.persistence.Entity;
+
+@Entity
+public class Movie {
+
+    private String director;
+    private String title;
+    private int year;
+
+    public Movie() {
+    }
+
+    public Movie(String director, String title, int year) {
+        this.director = director;
+        this.title = title;
+        this.year = year;
+    }
+
+    public String getDirector() {
+        return director;
+    }
+
+    public void setDirector(String director) {
+        this.director = director;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public int getYear() {
+        return year;
+    }
+
+    public void setYear(int year) {
+        this.year = year;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/testing-security/src/main/java/org/superbiz/injection/secure/Movies.java
----------------------------------------------------------------------
diff --git a/examples/testing-security/src/main/java/org/superbiz/injection/secure/Movies.java b/examples/testing-security/src/main/java/org/superbiz/injection/secure/Movies.java
index b3ba8e8..100598b 100644
--- a/examples/testing-security/src/main/java/org/superbiz/injection/secure/Movies.java
+++ b/examples/testing-security/src/main/java/org/superbiz/injection/secure/Movies.java
@@ -1,55 +1,55 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.superbiz.injection.secure;
-
-//START SNIPPET: code
-
-import javax.annotation.security.PermitAll;
-import javax.annotation.security.RolesAllowed;
-import javax.ejb.Stateful;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceContextType;
-import javax.persistence.Query;
-import java.util.List;
-
-@Stateful
-public class Movies {
-
-    @PersistenceContext(unitName = "movie-unit", type = PersistenceContextType.EXTENDED)
-    private EntityManager entityManager;
-
-    @RolesAllowed({"Employee", "Manager"})
-    public void addMovie(Movie movie) throws Exception {
-        entityManager.persist(movie);
-    }
-
-    @RolesAllowed({"Manager"})
-    public void deleteMovie(Movie movie) throws Exception {
-        entityManager.remove(movie);
-    }
-
-    @PermitAll
-    @TransactionAttribute(TransactionAttributeType.SUPPORTS)
-    public List<Movie> getMovies() throws Exception {
-        Query query = entityManager.createQuery("SELECT m from Movie as m");
-        return query.getResultList();
-    }
-}
-//END SNIPPET: code
+/**
+ * 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.superbiz.injection.secure;
+
+//START SNIPPET: code
+
+import javax.annotation.security.PermitAll;
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Stateful;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.PersistenceContextType;
+import javax.persistence.Query;
+import java.util.List;
+
+@Stateful
+public class Movies {
+
+    @PersistenceContext(unitName = "movie-unit", type = PersistenceContextType.EXTENDED)
+    private EntityManager entityManager;
+
+    @RolesAllowed({"Employee", "Manager"})
+    public void addMovie(Movie movie) throws Exception {
+        entityManager.persist(movie);
+    }
+
+    @RolesAllowed({"Manager"})
+    public void deleteMovie(Movie movie) throws Exception {
+        entityManager.remove(movie);
+    }
+
+    @PermitAll
+    @TransactionAttribute(TransactionAttributeType.SUPPORTS)
+    public List<Movie> getMovies() throws Exception {
+        Query query = entityManager.createQuery("SELECT m from Movie as m");
+        return query.getResultList();
+    }
+}
+//END SNIPPET: code

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/testing-security/src/test/java/org/superbiz/injection/secure/MovieTest.java
----------------------------------------------------------------------
diff --git a/examples/testing-security/src/test/java/org/superbiz/injection/secure/MovieTest.java b/examples/testing-security/src/test/java/org/superbiz/injection/secure/MovieTest.java
index 303d513..49ddb21 100644
--- a/examples/testing-security/src/test/java/org/superbiz/injection/secure/MovieTest.java
+++ b/examples/testing-security/src/test/java/org/superbiz/injection/secure/MovieTest.java
@@ -1,167 +1,167 @@
-/**
- * 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.superbiz.injection.secure;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-import javax.annotation.security.RunAs;
-import javax.ejb.EJB;
-import javax.ejb.EJBAccessException;
-import javax.ejb.Stateless;
-import javax.ejb.embeddable.EJBContainer;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-
-//START SNIPPET: code
-
-public class MovieTest {
-
-    @EJB
-    private Movies movies;
-
-    @EJB(name = "ManagerBean")
-    private Caller manager;
-
-    @EJB(name = "EmployeeBean")
-    private Caller employee;
-
-    private EJBContainer container;
-
-    @Before
-    public void setUp() throws Exception {
-        Properties p = new Properties();
-        p.put("movieDatabase", "new://Resource?type=DataSource");
-        p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
-        p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
-
-        this.container = EJBContainer.createEJBContainer(p);
-        this.container.getContext().bind("inject", this);
-    }
-
-    @After
-    public void tearDown() {
-        this.container.close();
-    }
-
-    @Test
-    public void testAsManager() throws Exception {
-        manager.call(new Callable() {
-            public Object call() throws Exception {
-
-                movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
-                movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
-                movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
-
-                List<Movie> list = movies.getMovies();
-                Assert.assertEquals("List.size()", 3, list.size());
-
-                for (Movie movie : list) {
-                    movies.deleteMovie(movie);
-                }
-
-                Assert.assertEquals("Movies.getMovies()", 0, movies.getMovies().size());
-                return null;
-            }
-        });
-    }
-
-    @Test
-    public void testAsEmployee() throws Exception {
-        employee.call(new Callable() {
-            public Object call() throws Exception {
-
-                movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
-                movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
-                movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
-
-                List<Movie> list = movies.getMovies();
-                Assert.assertEquals("List.size()", 3, list.size());
-
-                for (Movie movie : list) {
-                    try {
-                        movies.deleteMovie(movie);
-                        Assert.fail("Employees should not be allowed to delete");
-                    } catch (EJBAccessException e) {
-                        // Good, Employees cannot delete things
-                    }
-                }
-
-                // The list should still be three movies long
-                Assert.assertEquals("Movies.getMovies()", 3, movies.getMovies().size());
-                return null;
-            }
-        });
-    }
-
-    @Test
-    public void testUnauthenticated() throws Exception {
-        try {
-            movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
-            Assert.fail("Unauthenticated users should not be able to add movies");
-        } catch (EJBAccessException e) {
-            // Good, guests cannot add things
-        }
-
-        try {
-            movies.deleteMovie(null);
-            Assert.fail("Unauthenticated users should not be allowed to delete");
-        } catch (EJBAccessException e) {
-            // Good, Unauthenticated users cannot delete things
-        }
-
-        try {
-            // Read access should be allowed
-
-            movies.getMovies();
-
-        } catch (EJBAccessException e) {
-            Assert.fail("Read access should be allowed");
-        }
-
-    }
-
-    public static interface Caller {
-        public <V> V call(Callable<V> callable) throws Exception;
-    }
-
-    /**
-     * This little bit of magic allows our test code to execute in
-     * the desired security scope.
-     */
-
-    @Stateless
-    @RunAs("Manager")
-    public static class ManagerBean implements Caller {
-        public <V> V call(Callable<V> callable) throws Exception {
-            return callable.call();
-        }
-    }
-
-    @Stateless
-    @RunAs("Employee")
-    public static class EmployeeBean implements Caller {
-        public <V> V call(Callable<V> callable) throws Exception {
-            return callable.call();
-        }
-    }
-
-}
-//END SNIPPET: code
+/**
+ * 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.superbiz.injection.secure;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import javax.annotation.security.RunAs;
+import javax.ejb.EJB;
+import javax.ejb.EJBAccessException;
+import javax.ejb.Stateless;
+import javax.ejb.embeddable.EJBContainer;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+
+//START SNIPPET: code
+
+public class MovieTest {
+
+    @EJB
+    private Movies movies;
+
+    @EJB(name = "ManagerBean")
+    private Caller manager;
+
+    @EJB(name = "EmployeeBean")
+    private Caller employee;
+
+    private EJBContainer container;
+
+    @Before
+    public void setUp() throws Exception {
+        Properties p = new Properties();
+        p.put("movieDatabase", "new://Resource?type=DataSource");
+        p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
+        p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
+
+        this.container = EJBContainer.createEJBContainer(p);
+        this.container.getContext().bind("inject", this);
+    }
+
+    @After
+    public void tearDown() {
+        this.container.close();
+    }
+
+    @Test
+    public void testAsManager() throws Exception {
+        manager.call(new Callable() {
+            public Object call() throws Exception {
+
+                movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
+                movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
+                movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
+
+                List<Movie> list = movies.getMovies();
+                Assert.assertEquals("List.size()", 3, list.size());
+
+                for (Movie movie : list) {
+                    movies.deleteMovie(movie);
+                }
+
+                Assert.assertEquals("Movies.getMovies()", 0, movies.getMovies().size());
+                return null;
+            }
+        });
+    }
+
+    @Test
+    public void testAsEmployee() throws Exception {
+        employee.call(new Callable() {
+            public Object call() throws Exception {
+
+                movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
+                movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
+                movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
+
+                List<Movie> list = movies.getMovies();
+                Assert.assertEquals("List.size()", 3, list.size());
+
+                for (Movie movie : list) {
+                    try {
+                        movies.deleteMovie(movie);
+                        Assert.fail("Employees should not be allowed to delete");
+                    } catch (EJBAccessException e) {
+                        // Good, Employees cannot delete things
+                    }
+                }
+
+                // The list should still be three movies long
+                Assert.assertEquals("Movies.getMovies()", 3, movies.getMovies().size());
+                return null;
+            }
+        });
+    }
+
+    @Test
+    public void testUnauthenticated() throws Exception {
+        try {
+            movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
+            Assert.fail("Unauthenticated users should not be able to add movies");
+        } catch (EJBAccessException e) {
+            // Good, guests cannot add things
+        }
+
+        try {
+            movies.deleteMovie(null);
+            Assert.fail("Unauthenticated users should not be allowed to delete");
+        } catch (EJBAccessException e) {
+            // Good, Unauthenticated users cannot delete things
+        }
+
+        try {
+            // Read access should be allowed
+
+            movies.getMovies();
+
+        } catch (EJBAccessException e) {
+            Assert.fail("Read access should be allowed");
+        }
+
+    }
+
+    public static interface Caller {
+        public <V> V call(Callable<V> callable) throws Exception;
+    }
+
+    /**
+     * This little bit of magic allows our test code to execute in
+     * the desired security scope.
+     */
+
+    @Stateless
+    @RunAs("Manager")
+    public static class ManagerBean implements Caller {
+        public <V> V call(Callable<V> callable) throws Exception {
+            return callable.call();
+        }
+    }
+
+    @Stateless
+    @RunAs("Employee")
+    public static class EmployeeBean implements Caller {
+        public <V> V call(Callable<V> callable) throws Exception {
+            return callable.call();
+        }
+    }
+
+}
+//END SNIPPET: code

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/testing-transactions-bmt/src/main/java/org/superbiz/injection/tx/Movie.java
----------------------------------------------------------------------
diff --git a/examples/testing-transactions-bmt/src/main/java/org/superbiz/injection/tx/Movie.java b/examples/testing-transactions-bmt/src/main/java/org/superbiz/injection/tx/Movie.java
index 454196b..a9c3e47 100644
--- a/examples/testing-transactions-bmt/src/main/java/org/superbiz/injection/tx/Movie.java
+++ b/examples/testing-transactions-bmt/src/main/java/org/superbiz/injection/tx/Movie.java
@@ -1,74 +1,74 @@
-/**
- * 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.superbiz.injection.tx;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-
-@Entity
-public class Movie {
-
-    @Id
-    @GeneratedValue
-    private Long id;
-    private String director;
-    private String title;
-    private int year;
-
-    public Movie(final String director, final String title, int year) {
-        this.director = director;
-        this.title = title;
-        this.year = year;
-    }
-
-    public Movie() {
-
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getDirector() {
-        return director;
-    }
-
-    public void setDirector(String director) {
-        this.director = director;
-    }
-
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    public int getYear() {
-        return year;
-    }
-
-    public void setYear(final int year) {
-        this.year = year;
-    }
-}
+/**
+ * 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.superbiz.injection.tx;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+@Entity
+public class Movie {
+
+    @Id
+    @GeneratedValue
+    private Long id;
+    private String director;
+    private String title;
+    private int year;
+
+    public Movie(final String director, final String title, int year) {
+        this.director = director;
+        this.title = title;
+        this.year = year;
+    }
+
+    public Movie() {
+
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getDirector() {
+        return director;
+    }
+
+    public void setDirector(String director) {
+        this.director = director;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public int getYear() {
+        return year;
+    }
+
+    public void setYear(final int year) {
+        this.year = year;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/testing-transactions-bmt/src/main/java/org/superbiz/injection/tx/Movies.java
----------------------------------------------------------------------
diff --git a/examples/testing-transactions-bmt/src/main/java/org/superbiz/injection/tx/Movies.java b/examples/testing-transactions-bmt/src/main/java/org/superbiz/injection/tx/Movies.java
index 964eafc..8c0eeb5 100644
--- a/examples/testing-transactions-bmt/src/main/java/org/superbiz/injection/tx/Movies.java
+++ b/examples/testing-transactions-bmt/src/main/java/org/superbiz/injection/tx/Movies.java
@@ -1,62 +1,62 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.superbiz.injection.tx;
-
-import javax.annotation.Resource;
-import javax.ejb.Stateful;
-import javax.ejb.TransactionManagement;
-import javax.ejb.TransactionManagementType;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceContextType;
-import javax.persistence.Query;
-import javax.transaction.UserTransaction;
-
-@Stateful(name = "Movies")
-@TransactionManagement(TransactionManagementType.BEAN)
-public class Movies {
-
-    @PersistenceContext(unitName = "movie-unit", type = PersistenceContextType.TRANSACTION)
-    private EntityManager entityManager;
-
-    @Resource
-    private UserTransaction userTransaction;
-
-    public void addMovie(Movie movie) throws Exception {
-        try {
-            userTransaction.begin();
-            entityManager.persist(movie);
-
-            //For some dummy reason, this db can have only 5 titles. :O)
-            if (countMovies() > 5) {
-                userTransaction.rollback();
-            } else {
-                userTransaction.commit();
-            }
-
-        } catch (Exception e) {
-            e.printStackTrace();
-            userTransaction.rollback();
-        }
-    }
-
-    public Long countMovies() throws Exception {
-        Query query = entityManager.createQuery("SELECT COUNT(m) FROM Movie m");
-        return Long.class.cast(query.getSingleResult());
-    }
-}
-
+/**
+ * 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.superbiz.injection.tx;
+
+import javax.annotation.Resource;
+import javax.ejb.Stateful;
+import javax.ejb.TransactionManagement;
+import javax.ejb.TransactionManagementType;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.PersistenceContextType;
+import javax.persistence.Query;
+import javax.transaction.UserTransaction;
+
+@Stateful(name = "Movies")
+@TransactionManagement(TransactionManagementType.BEAN)
+public class Movies {
+
+    @PersistenceContext(unitName = "movie-unit", type = PersistenceContextType.TRANSACTION)
+    private EntityManager entityManager;
+
+    @Resource
+    private UserTransaction userTransaction;
+
+    public void addMovie(Movie movie) throws Exception {
+        try {
+            userTransaction.begin();
+            entityManager.persist(movie);
+
+            //For some dummy reason, this db can have only 5 titles. :O)
+            if (countMovies() > 5) {
+                userTransaction.rollback();
+            } else {
+                userTransaction.commit();
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            userTransaction.rollback();
+        }
+    }
+
+    public Long countMovies() throws Exception {
+        Query query = entityManager.createQuery("SELECT COUNT(m) FROM Movie m");
+        return Long.class.cast(query.getSingleResult());
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/testing-transactions-bmt/src/test/java/org/superbiz/injection/tx/MoviesTest.java
----------------------------------------------------------------------
diff --git a/examples/testing-transactions-bmt/src/test/java/org/superbiz/injection/tx/MoviesTest.java b/examples/testing-transactions-bmt/src/test/java/org/superbiz/injection/tx/MoviesTest.java
index 3315153..e4262be 100644
--- a/examples/testing-transactions-bmt/src/test/java/org/superbiz/injection/tx/MoviesTest.java
+++ b/examples/testing-transactions-bmt/src/test/java/org/superbiz/injection/tx/MoviesTest.java
@@ -1,50 +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.superbiz.injection.tx;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import javax.ejb.EJB;
-import javax.ejb.embeddable.EJBContainer;
-import java.util.Properties;
-
-public class MoviesTest {
-
-    @EJB
-    private Movies movies;
-
-    @Test
-    public void testMe() throws Exception {
-        final Properties p = new Properties();
-        p.put("movieDatabase", "new://Resource?type=DataSource");
-        p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
-        p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
-
-        EJBContainer.createEJBContainer(p).getContext().bind("inject", this);
-
-        movies.addMovie(new Movie("Asif Kapadia", "Senna", 2010));
-        movies.addMovie(new Movie("José Padilha", "Tropa de Elite", 2007));
-        movies.addMovie(new Movie("Andy Wachowski/Lana Wachowski", "The Matrix", 1999));
-        movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
-        movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
-        movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
-
-        Assert.assertEquals(5L, movies.countMovies().longValue());
-    }
-
-}
+/**
+ * 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.superbiz.injection.tx;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import javax.ejb.EJB;
+import javax.ejb.embeddable.EJBContainer;
+import java.util.Properties;
+
+public class MoviesTest {
+
+    @EJB
+    private Movies movies;
+
+    @Test
+    public void testMe() throws Exception {
+        final Properties p = new Properties();
+        p.put("movieDatabase", "new://Resource?type=DataSource");
+        p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
+        p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
+
+        EJBContainer.createEJBContainer(p).getContext().bind("inject", this);
+
+        movies.addMovie(new Movie("Asif Kapadia", "Senna", 2010));
+        movies.addMovie(new Movie("José Padilha", "Tropa de Elite", 2007));
+        movies.addMovie(new Movie("Andy Wachowski/Lana Wachowski", "The Matrix", 1999));
+        movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
+        movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
+        movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
+
+        Assert.assertEquals(5L, movies.countMovies().longValue());
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/testing-transactions/src/main/java/org/superbiz/injection/tx/Movie.java
----------------------------------------------------------------------
diff --git a/examples/testing-transactions/src/main/java/org/superbiz/injection/tx/Movie.java b/examples/testing-transactions/src/main/java/org/superbiz/injection/tx/Movie.java
index 1d0c359..5b880ba 100644
--- a/examples/testing-transactions/src/main/java/org/superbiz/injection/tx/Movie.java
+++ b/examples/testing-transactions/src/main/java/org/superbiz/injection/tx/Movie.java
@@ -1,61 +1,61 @@
-/**
- * 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.superbiz.injection.tx;
-
-import javax.persistence.Entity;
-
-@Entity
-public class Movie {
-
-    private String director;
-    private String title;
-    private int year;
-
-    public Movie() {
-    }
-
-    public Movie(String director, String title, int year) {
-        this.director = director;
-        this.title = title;
-        this.year = year;
-    }
-
-    public String getDirector() {
-        return director;
-    }
-
-    public void setDirector(String director) {
-        this.director = director;
-    }
-
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    public int getYear() {
-        return year;
-    }
-
-    public void setYear(int year) {
-        this.year = year;
-    }
-
-}
+/**
+ * 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.superbiz.injection.tx;
+
+import javax.persistence.Entity;
+
+@Entity
+public class Movie {
+
+    private String director;
+    private String title;
+    private int year;
+
+    public Movie() {
+    }
+
+    public Movie(String director, String title, int year) {
+        this.director = director;
+        this.title = title;
+        this.year = year;
+    }
+
+    public String getDirector() {
+        return director;
+    }
+
+    public void setDirector(String director) {
+        this.director = director;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public int getYear() {
+        return year;
+    }
+
+    public void setYear(int year) {
+        this.year = year;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/testing-transactions/src/main/java/org/superbiz/injection/tx/Movies.java
----------------------------------------------------------------------
diff --git a/examples/testing-transactions/src/main/java/org/superbiz/injection/tx/Movies.java b/examples/testing-transactions/src/main/java/org/superbiz/injection/tx/Movies.java
index 6c5ace4..e998d3f 100644
--- a/examples/testing-transactions/src/main/java/org/superbiz/injection/tx/Movies.java
+++ b/examples/testing-transactions/src/main/java/org/superbiz/injection/tx/Movies.java
@@ -1,50 +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.superbiz.injection.tx;
-
-import javax.ejb.Stateful;
-import javax.ejb.TransactionAttribute;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceContextType;
-import javax.persistence.Query;
-import java.util.List;
-
-import static javax.ejb.TransactionAttributeType.MANDATORY;
-
-//START SNIPPET: code
-@Stateful(name = "Movies")
-@TransactionAttribute(MANDATORY)
-public class Movies {
-
-    @PersistenceContext(unitName = "movie-unit", type = PersistenceContextType.TRANSACTION)
-    private EntityManager entityManager;
-
-    public void addMovie(Movie movie) throws Exception {
-        entityManager.persist(movie);
-    }
-
-    public void deleteMovie(Movie movie) throws Exception {
-        entityManager.remove(movie);
-    }
-
-    public List<Movie> getMovies() throws Exception {
-        Query query = entityManager.createQuery("SELECT m from Movie as m");
-        return query.getResultList();
-    }
-}
-//END SNIPPET: code
+/**
+ * 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.superbiz.injection.tx;
+
+import javax.ejb.Stateful;
+import javax.ejb.TransactionAttribute;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.PersistenceContextType;
+import javax.persistence.Query;
+import java.util.List;
+
+import static javax.ejb.TransactionAttributeType.MANDATORY;
+
+//START SNIPPET: code
+@Stateful(name = "Movies")
+@TransactionAttribute(MANDATORY)
+public class Movies {
+
+    @PersistenceContext(unitName = "movie-unit", type = PersistenceContextType.TRANSACTION)
+    private EntityManager entityManager;
+
+    public void addMovie(Movie movie) throws Exception {
+        entityManager.persist(movie);
+    }
+
+    public void deleteMovie(Movie movie) throws Exception {
+        entityManager.remove(movie);
+    }
+
+    public List<Movie> getMovies() throws Exception {
+        Query query = entityManager.createQuery("SELECT m from Movie as m");
+        return query.getResultList();
+    }
+}
+//END SNIPPET: code

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/testing-transactions/src/test/java/org/superbiz/injection/tx/MoviesTest.java
----------------------------------------------------------------------
diff --git a/examples/testing-transactions/src/test/java/org/superbiz/injection/tx/MoviesTest.java b/examples/testing-transactions/src/test/java/org/superbiz/injection/tx/MoviesTest.java
index 15928bc..f9e1f92 100644
--- a/examples/testing-transactions/src/test/java/org/superbiz/injection/tx/MoviesTest.java
+++ b/examples/testing-transactions/src/test/java/org/superbiz/injection/tx/MoviesTest.java
@@ -1,107 +1,107 @@
-/**
- * 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.superbiz.injection.tx;
-
-import junit.framework.TestCase;
-
-import javax.ejb.EJB;
-import javax.ejb.Stateless;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.embeddable.EJBContainer;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-
-import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;
-
-/**
- * See the transaction-rollback example as it does the same thing
- * via UserTransaction and shows more techniques for rollback
- */
-//START SNIPPET: code
-public class MoviesTest extends TestCase {
-
-    @EJB
-    private Movies movies;
-
-    @EJB
-    private Caller transactionalCaller;
-
-    protected void setUp() throws Exception {
-        final Properties p = new Properties();
-        p.put("movieDatabase", "new://Resource?type=DataSource");
-        p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
-        p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
-
-        EJBContainer.createEJBContainer(p).getContext().bind("inject", this);
-    }
-
-    private void doWork() throws Exception {
-
-        movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
-        movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
-        movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
-
-        List<Movie> list = movies.getMovies();
-        assertEquals("List.size()", 3, list.size());
-
-        for (Movie movie : list) {
-            movies.deleteMovie(movie);
-        }
-
-        assertEquals("Movies.getMovies()", 0, movies.getMovies().size());
-    }
-
-    public void testWithTransaction() throws Exception {
-        transactionalCaller.call(new Callable() {
-            public Object call() throws Exception {
-                doWork();
-                return null;
-            }
-        });
-    }
-
-    public void testWithoutTransaction() throws Exception {
-        try {
-            doWork();
-            fail("The Movies bean should be using TransactionAttributeType.MANDATORY");
-        } catch (javax.ejb.EJBTransactionRequiredException e) {
-            // good, our Movies bean is using TransactionAttributeType.MANDATORY as we want
-        }
-    }
-
-    public static interface Caller {
-
-        public <V> V call(Callable<V> callable) throws Exception;
-    }
-
-    /**
-     * This little bit of magic allows our test code to execute in
-     * the scope of a container controlled transaction.
-     */
-    @Stateless
-    @TransactionAttribute(REQUIRES_NEW)
-    public static class TransactionBean implements Caller {
-
-        public <V> V call(Callable<V> callable) throws Exception {
-            return callable.call();
-        }
-
-    }
-
-}
-//END SNIPPET: code
+/**
+ * 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.superbiz.injection.tx;
+
+import junit.framework.TestCase;
+
+import javax.ejb.EJB;
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.embeddable.EJBContainer;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+
+import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;
+
+/**
+ * See the transaction-rollback example as it does the same thing
+ * via UserTransaction and shows more techniques for rollback
+ */
+//START SNIPPET: code
+public class MoviesTest extends TestCase {
+
+    @EJB
+    private Movies movies;
+
+    @EJB
+    private Caller transactionalCaller;
+
+    protected void setUp() throws Exception {
+        final Properties p = new Properties();
+        p.put("movieDatabase", "new://Resource?type=DataSource");
+        p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
+        p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
+
+        EJBContainer.createEJBContainer(p).getContext().bind("inject", this);
+    }
+
+    private void doWork() throws Exception {
+
+        movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
+        movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
+        movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
+
+        List<Movie> list = movies.getMovies();
+        assertEquals("List.size()", 3, list.size());
+
+        for (Movie movie : list) {
+            movies.deleteMovie(movie);
+        }
+
+        assertEquals("Movies.getMovies()", 0, movies.getMovies().size());
+    }
+
+    public void testWithTransaction() throws Exception {
+        transactionalCaller.call(new Callable() {
+            public Object call() throws Exception {
+                doWork();
+                return null;
+            }
+        });
+    }
+
+    public void testWithoutTransaction() throws Exception {
+        try {
+            doWork();
+            fail("The Movies bean should be using TransactionAttributeType.MANDATORY");
+        } catch (javax.ejb.EJBTransactionRequiredException e) {
+            // good, our Movies bean is using TransactionAttributeType.MANDATORY as we want
+        }
+    }
+
+    public static interface Caller {
+
+        public <V> V call(Callable<V> callable) throws Exception;
+    }
+
+    /**
+     * This little bit of magic allows our test code to execute in
+     * the scope of a container controlled transaction.
+     */
+    @Stateless
+    @TransactionAttribute(REQUIRES_NEW)
+    public static class TransactionBean implements Caller {
+
+        public <V> V call(Callable<V> callable) throws Exception {
+            return callable.call();
+        }
+
+    }
+
+}
+//END SNIPPET: code

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/dao/PersonDAO.java
----------------------------------------------------------------------
diff --git a/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/dao/PersonDAO.java b/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/dao/PersonDAO.java
index c5cbc80..6fe326c 100644
--- a/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/dao/PersonDAO.java
+++ b/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/dao/PersonDAO.java
@@ -1,45 +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.superbiz.dao;
-
-import org.superbiz.domain.Person;
-
-import javax.ejb.Lock;
-import javax.ejb.LockType;
-import javax.ejb.Singleton;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-import java.util.List;
-
-@Singleton
-@Lock(LockType.READ)
-public class PersonDAO {
-
-    @PersistenceContext
-    private EntityManager em;
-
-    public Person save(final String name) {
-        final Person person = new Person();
-        person.setName(name);
-        em.persist(person);
-        return person;
-    }
-
-    public List<Person> findAll() {
-        return em.createNamedQuery("Person.findAll", Person.class).getResultList();
-    }
-}
+/**
+ * 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.superbiz.dao;
+
+import org.superbiz.domain.Person;
+
+import javax.ejb.Lock;
+import javax.ejb.LockType;
+import javax.ejb.Singleton;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import java.util.List;
+
+@Singleton
+@Lock(LockType.READ)
+public class PersonDAO {
+
+    @PersistenceContext
+    private EntityManager em;
+
+    public Person save(final String name) {
+        final Person person = new Person();
+        person.setName(name);
+        em.persist(person);
+        return person;
+    }
+
+    public List<Person> findAll() {
+        return em.createNamedQuery("Person.findAll", Person.class).getResultList();
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/domain/Person.java
----------------------------------------------------------------------
diff --git a/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/domain/Person.java b/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/domain/Person.java
index a74732c..516d57b 100644
--- a/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/domain/Person.java
+++ b/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/domain/Person.java
@@ -1,50 +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.superbiz.domain;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@Entity
-@XmlRootElement
-@NamedQuery(name = "Person.findAll", query = "select p from Person p")
-public class Person {
-
-    @Id
-    @GeneratedValue
-    private long id;
-    private String name;
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-}
+/**
+ * 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.superbiz.domain;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.NamedQuery;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@Entity
+@XmlRootElement
+@NamedQuery(name = "Person.findAll", query = "select p from Person p")
+public class Person {
+
+    @Id
+    @GeneratedValue
+    private long id;
+    private String name;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/init/Initializer.java
----------------------------------------------------------------------
diff --git a/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/init/Initializer.java b/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/init/Initializer.java
index 5077838..76087fd 100644
--- a/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/init/Initializer.java
+++ b/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/init/Initializer.java
@@ -1,38 +1,38 @@
-/**
- * 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.superbiz.init;
-
-import org.eclipse.persistence.transaction.JTATransactionController;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.Resource;
-import javax.ejb.Singleton;
-import javax.ejb.Startup;
-import javax.transaction.TransactionManager;
-
-@Startup
-@Singleton // tomee does it itself if eclipselink is in common.lib otherwise it is to be done by the app
-public class Initializer {
-
-    @Resource
-    private TransactionManager tm;
-
-    @PostConstruct
-    private void init() {
-        JTATransactionController.setDefaultTransactionManager(tm);
-    }
-}
+/**
+ * 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.superbiz.init;
+
+import org.eclipse.persistence.transaction.JTATransactionController;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import javax.ejb.Singleton;
+import javax.ejb.Startup;
+import javax.transaction.TransactionManager;
+
+@Startup
+@Singleton // tomee does it itself if eclipselink is in common.lib otherwise it is to be done by the app
+public class Initializer {
+
+    @Resource
+    private TransactionManager tm;
+
+    @PostConstruct
+    private void init() {
+        JTATransactionController.setDefaultTransactionManager(tm);
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/service/JerseyApplication.java
----------------------------------------------------------------------
diff --git a/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/service/JerseyApplication.java b/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/service/JerseyApplication.java
index bb355e6..7f56b4d 100644
--- a/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/service/JerseyApplication.java
+++ b/examples/tomee-jersey-eclipselink/src/main/java/org/superbiz/service/JerseyApplication.java
@@ -1,31 +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.superbiz.service;
-
-import javax.ws.rs.core.Application;
-import java.util.HashSet;
-import java.util.Set;
-
-public class JerseyApplication extends Application {
-
-    @Override
-    public Set<Class<?>> getClasses() {
-        final Set<Class<?>> classes = new HashSet<Class<?>>();
-        classes.add(PersonService.class);
-        return classes;
-    }
-}
+/**
+ * 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.superbiz.service;
+
+import javax.ws.rs.core.Application;
+import java.util.HashSet;
+import java.util.Set;
+
+public class JerseyApplication extends Application {
+
+    @Override
+    public Set<Class<?>> getClasses() {
+        final Set<Class<?>> classes = new HashSet<Class<?>>();
+        classes.add(PersonService.class);
+        return classes;
+    }
+}


Mime
View raw message