You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by an...@apache.org on 2015/09/25 12:42:53 UTC
[18/33] tomee git commit: Align SNAPSHOT versions & reformat examples
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/interceptors/src/test/java/org/superbiz/interceptors/ThirdSLSBeanTest.java
----------------------------------------------------------------------
diff --git a/examples/interceptors/src/test/java/org/superbiz/interceptors/ThirdSLSBeanTest.java b/examples/interceptors/src/test/java/org/superbiz/interceptors/ThirdSLSBeanTest.java
index df3b9e7..e775612 100755
--- a/examples/interceptors/src/test/java/org/superbiz/interceptors/ThirdSLSBeanTest.java
+++ b/examples/interceptors/src/test/java/org/superbiz/interceptors/ThirdSLSBeanTest.java
@@ -1,78 +1,78 @@
-/**
- * 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.interceptors;
-
-import junit.framework.TestCase;
-import org.junit.Before;
-import org.junit.Test;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * @version $Rev$ $Date$
- */
-public class ThirdSLSBeanTest extends TestCase {
-
- private InitialContext initCtx;
-
- @Before
- public void setUp() throws Exception {
- Properties properties = new Properties();
- properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.core.LocalInitialContextFactory");
- properties.setProperty("openejb.deployments.classpath.include", ".*interceptors/target/classes.*");
-
- initCtx = new InitialContext(properties);
- }
-
- @Test
- public void testMethodWithDefaultInterceptorsExcluded() throws Exception {
- ThirdSLSBeanLocal bean = (ThirdSLSBeanLocal) initCtx.lookup("ThirdSLSBeanLocal");
-
- assert bean != null;
-
- List<String> expected = new ArrayList<String>();
- expected.add("ClassLevelInterceptorOne");
- expected.add("ClassLevelInterceptorTwo");
- expected.add("MethodLevelInterceptorOne");
- expected.add("MethodLevelInterceptorTwo");
- expected.add("ThirdSLSBean");
- expected.add("businessMethod");
-
- List<String> actual = bean.businessMethod();
- assert expected.equals(actual) : "Expected " + expected + ", but got " + actual;
- }
-
- @Test
- public void testMethodWithDefaultAndClassInterceptorsExcluded() throws Exception {
- ThirdSLSBeanLocal bean = (ThirdSLSBeanLocal) initCtx.lookup("ThirdSLSBeanLocal");
-
- assert bean != null;
-
- List<String> expected = new ArrayList<String>();
- expected.add("MethodLevelInterceptorOne");
- expected.add("MethodLevelInterceptorTwo");
- expected.add("ThirdSLSBean");
- expected.add("anotherBusinessMethod");
-
- List<String> actual = bean.anotherBusinessMethod();
- assert expected.equals(actual) : "Expected " + expected + ", but got " + actual;
- }
-}
+/**
+ * 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.interceptors;
+
+import junit.framework.TestCase;
+import org.junit.Before;
+import org.junit.Test;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ThirdSLSBeanTest extends TestCase {
+
+ private InitialContext initCtx;
+
+ @Before
+ public void setUp() throws Exception {
+ Properties properties = new Properties();
+ properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.core.LocalInitialContextFactory");
+ properties.setProperty("openejb.deployments.classpath.include", ".*interceptors/target/classes.*");
+
+ initCtx = new InitialContext(properties);
+ }
+
+ @Test
+ public void testMethodWithDefaultInterceptorsExcluded() throws Exception {
+ ThirdSLSBeanLocal bean = (ThirdSLSBeanLocal) initCtx.lookup("ThirdSLSBeanLocal");
+
+ assert bean != null;
+
+ List<String> expected = new ArrayList<String>();
+ expected.add("ClassLevelInterceptorOne");
+ expected.add("ClassLevelInterceptorTwo");
+ expected.add("MethodLevelInterceptorOne");
+ expected.add("MethodLevelInterceptorTwo");
+ expected.add("ThirdSLSBean");
+ expected.add("businessMethod");
+
+ List<String> actual = bean.businessMethod();
+ assert expected.equals(actual) : "Expected " + expected + ", but got " + actual;
+ }
+
+ @Test
+ public void testMethodWithDefaultAndClassInterceptorsExcluded() throws Exception {
+ ThirdSLSBeanLocal bean = (ThirdSLSBeanLocal) initCtx.lookup("ThirdSLSBeanLocal");
+
+ assert bean != null;
+
+ List<String> expected = new ArrayList<String>();
+ expected.add("MethodLevelInterceptorOne");
+ expected.add("MethodLevelInterceptorTwo");
+ expected.add("ThirdSLSBean");
+ expected.add("anotherBusinessMethod");
+
+ List<String> actual = bean.anotherBusinessMethod();
+ assert expected.equals(actual) : "Expected " + expected + ", but got " + actual;
+ }
+}
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/javamail/src/main/java/org/superbiz/rest/EmailService.java
----------------------------------------------------------------------
diff --git a/examples/javamail/src/main/java/org/superbiz/rest/EmailService.java b/examples/javamail/src/main/java/org/superbiz/rest/EmailService.java
index 504ea16..5d037a9 100644
--- a/examples/javamail/src/main/java/org/superbiz/rest/EmailService.java
+++ b/examples/javamail/src/main/java/org/superbiz/rest/EmailService.java
@@ -5,14 +5,14 @@
* 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.
+ * <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.rest;
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/javamail/src/test/java/org/superbiz/rest/EmailServiceTest.java
----------------------------------------------------------------------
diff --git a/examples/javamail/src/test/java/org/superbiz/rest/EmailServiceTest.java b/examples/javamail/src/test/java/org/superbiz/rest/EmailServiceTest.java
index 856cce5..53798f8 100644
--- a/examples/javamail/src/test/java/org/superbiz/rest/EmailServiceTest.java
+++ b/examples/javamail/src/test/java/org/superbiz/rest/EmailServiceTest.java
@@ -5,14 +5,14 @@
* 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.
+ * <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.rest;
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/jpa-eclipselink/src/main/java/org/superbiz/eclipselink/Movie.java
----------------------------------------------------------------------
diff --git a/examples/jpa-eclipselink/src/main/java/org/superbiz/eclipselink/Movie.java b/examples/jpa-eclipselink/src/main/java/org/superbiz/eclipselink/Movie.java
index 5811bf2..f2b119c 100644
--- a/examples/jpa-eclipselink/src/main/java/org/superbiz/eclipselink/Movie.java
+++ b/examples/jpa-eclipselink/src/main/java/org/superbiz/eclipselink/Movie.java
@@ -1,68 +1,68 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * 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.eclipselink;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-
-@Entity
-public class Movie {
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- private long id;
-
- 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.eclipselink;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+@Entity
+public class Movie {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private long id;
+
+ 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/jpa-eclipselink/src/main/java/org/superbiz/eclipselink/Movies.java
----------------------------------------------------------------------
diff --git a/examples/jpa-eclipselink/src/main/java/org/superbiz/eclipselink/Movies.java b/examples/jpa-eclipselink/src/main/java/org/superbiz/eclipselink/Movies.java
index 2b0cad2..af0e412 100644
--- a/examples/jpa-eclipselink/src/main/java/org/superbiz/eclipselink/Movies.java
+++ b/examples/jpa-eclipselink/src/main/java/org/superbiz/eclipselink/Movies.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.eclipselink;
-
-import javax.ejb.Stateful;
-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;
-
- 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();
- }
-
-}
+/**
+ * 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.eclipselink;
+
+import javax.ejb.Stateful;
+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;
+
+ 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();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/jpa-eclipselink/src/test/java/org/superbiz/eclipselink/MoviesTest.java
----------------------------------------------------------------------
diff --git a/examples/jpa-eclipselink/src/test/java/org/superbiz/eclipselink/MoviesTest.java b/examples/jpa-eclipselink/src/test/java/org/superbiz/eclipselink/MoviesTest.java
index ad3701d..c6584148 100644
--- a/examples/jpa-eclipselink/src/test/java/org/superbiz/eclipselink/MoviesTest.java
+++ b/examples/jpa-eclipselink/src/test/java/org/superbiz/eclipselink/MoviesTest.java
@@ -1,54 +1,54 @@
-/**
- * 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.eclipselink;
-
-import junit.framework.TestCase;
-
-import javax.ejb.embeddable.EJBContainer;
-import javax.naming.Context;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * @version $Revision: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
- */
-public class MoviesTest extends TestCase {
-
- public void test() 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");
-
- final Context context = EJBContainer.createEJBContainer(p).getContext();
-
- Movies movies = (Movies) context.lookup("java:global/jpa-eclipselink/Movies");
-
- 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());
- }
-}
+/**
+ * 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.eclipselink;
+
+import junit.framework.TestCase;
+
+import javax.ejb.embeddable.EJBContainer;
+import javax.naming.Context;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * @version $Revision: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+ */
+public class MoviesTest extends TestCase {
+
+ public void test() 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");
+
+ final Context context = EJBContainer.createEJBContainer(p).getContext();
+
+ Movies movies = (Movies) context.lookup("java:global/jpa-eclipselink/Movies");
+
+ 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());
+ }
+}
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/jpa-enumerated/src/main/java/org/superbiz/jpa/enums/Movie.java
----------------------------------------------------------------------
diff --git a/examples/jpa-enumerated/src/main/java/org/superbiz/jpa/enums/Movie.java b/examples/jpa-enumerated/src/main/java/org/superbiz/jpa/enums/Movie.java
index 90ed7bc..1e1c21f 100644
--- a/examples/jpa-enumerated/src/main/java/org/superbiz/jpa/enums/Movie.java
+++ b/examples/jpa-enumerated/src/main/java/org/superbiz/jpa/enums/Movie.java
@@ -1,79 +1,79 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * 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.jpa.enums;
-
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-
-@Entity
-public class Movie {
-
- @Id
- @GeneratedValue
- private int id;
- private String director;
- private String title;
- private int year;
-
- @Enumerated(EnumType.STRING)
- private Rating rating;
-
- public Movie() {
- }
-
- public Movie(String director, String title, int year, Rating rating) {
- this.director = director;
- this.title = title;
- this.year = year;
- this.rating = rating;
- }
-
- 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;
- }
-
- public Rating getRating() {
- return rating;
- }
-
- public void setRating(Rating rating) {
- this.rating = rating;
- }
-}
+/**
+ * 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.jpa.enums;
+
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+@Entity
+public class Movie {
+
+ @Id
+ @GeneratedValue
+ private int id;
+ private String director;
+ private String title;
+ private int year;
+
+ @Enumerated(EnumType.STRING)
+ private Rating rating;
+
+ public Movie() {
+ }
+
+ public Movie(String director, String title, int year, Rating rating) {
+ this.director = director;
+ this.title = title;
+ this.year = year;
+ this.rating = rating;
+ }
+
+ 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;
+ }
+
+ public Rating getRating() {
+ return rating;
+ }
+
+ public void setRating(Rating rating) {
+ this.rating = rating;
+ }
+}
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/jpa-enumerated/src/main/java/org/superbiz/jpa/enums/Movies.java
----------------------------------------------------------------------
diff --git a/examples/jpa-enumerated/src/main/java/org/superbiz/jpa/enums/Movies.java b/examples/jpa-enumerated/src/main/java/org/superbiz/jpa/enums/Movies.java
index 5ea03d4..46fc1c0 100644
--- a/examples/jpa-enumerated/src/main/java/org/superbiz/jpa/enums/Movies.java
+++ b/examples/jpa-enumerated/src/main/java/org/superbiz/jpa/enums/Movies.java
@@ -1,54 +1,54 @@
-/**
- * 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.jpa.enums;
-
-//START SNIPPET: code
-
-import javax.ejb.Stateful;
-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;
-
- public void addMovie(Movie movie) {
- entityManager.persist(movie);
- }
-
- public void deleteMovie(Movie movie) {
- entityManager.remove(movie);
- }
-
- public List<Movie> findByRating(Rating rating) {
- final Query query = entityManager.createQuery("SELECT m FROM Movie as m WHERE m.rating = :rating");
- query.setParameter("rating", rating);
- return query.getResultList();
- }
-
- 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.jpa.enums;
+
+//START SNIPPET: code
+
+import javax.ejb.Stateful;
+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;
+
+ public void addMovie(Movie movie) {
+ entityManager.persist(movie);
+ }
+
+ public void deleteMovie(Movie movie) {
+ entityManager.remove(movie);
+ }
+
+ public List<Movie> findByRating(Rating rating) {
+ final Query query = entityManager.createQuery("SELECT m FROM Movie as m WHERE m.rating = :rating");
+ query.setParameter("rating", rating);
+ return query.getResultList();
+ }
+
+ 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/jpa-enumerated/src/test/java/org/superbiz/jpa/enums/MoviesTest.java
----------------------------------------------------------------------
diff --git a/examples/jpa-enumerated/src/test/java/org/superbiz/jpa/enums/MoviesTest.java b/examples/jpa-enumerated/src/test/java/org/superbiz/jpa/enums/MoviesTest.java
index 82eaebd..dd90258 100644
--- a/examples/jpa-enumerated/src/test/java/org/superbiz/jpa/enums/MoviesTest.java
+++ b/examples/jpa-enumerated/src/test/java/org/superbiz/jpa/enums/MoviesTest.java
@@ -1,54 +1,54 @@
-/**
- * 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.jpa.enums;
-
-import junit.framework.TestCase;
-
-import javax.ejb.embeddable.EJBContainer;
-import javax.naming.Context;
-import java.util.Properties;
-
-public class MoviesTest extends TestCase {
-
- public void test() 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 container = EJBContainer.createEJBContainer(p);
- final Context context = container.getContext();
-
- final Movies movies = (Movies) context.lookup("java:global/jpa-enumerated/Movies");
-
- movies.addMovie(new Movie("James Frawley", "The Muppet Movie", 1979, Rating.G));
- movies.addMovie(new Movie("Jim Henson", "The Great Muppet Caper", 1981, Rating.G));
- movies.addMovie(new Movie("Frank Oz", "The Muppets Take Manhattan", 1984, Rating.G));
- movies.addMovie(new Movie("James Bobin", "The Muppets", 2011, Rating.PG));
-
- assertEquals("List.size()", 4, movies.getMovies().size());
-
- assertEquals("List.size()", 3, movies.findByRating(Rating.G).size());
-
- assertEquals("List.size()", 1, movies.findByRating(Rating.PG).size());
-
- assertEquals("List.size()", 0, movies.findByRating(Rating.R).size());
-
- container.close();
- }
-}
+/**
+ * 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.jpa.enums;
+
+import junit.framework.TestCase;
+
+import javax.ejb.embeddable.EJBContainer;
+import javax.naming.Context;
+import java.util.Properties;
+
+public class MoviesTest extends TestCase {
+
+ public void test() 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 container = EJBContainer.createEJBContainer(p);
+ final Context context = container.getContext();
+
+ final Movies movies = (Movies) context.lookup("java:global/jpa-enumerated/Movies");
+
+ movies.addMovie(new Movie("James Frawley", "The Muppet Movie", 1979, Rating.G));
+ movies.addMovie(new Movie("Jim Henson", "The Great Muppet Caper", 1981, Rating.G));
+ movies.addMovie(new Movie("Frank Oz", "The Muppets Take Manhattan", 1984, Rating.G));
+ movies.addMovie(new Movie("James Bobin", "The Muppets", 2011, Rating.PG));
+
+ assertEquals("List.size()", 4, movies.getMovies().size());
+
+ assertEquals("List.size()", 3, movies.findByRating(Rating.G).size());
+
+ assertEquals("List.size()", 1, movies.findByRating(Rating.PG).size());
+
+ assertEquals("List.size()", 0, movies.findByRating(Rating.R).size());
+
+ container.close();
+ }
+}
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/jpa-hibernate/src/main/java/org/superbiz/injection/h3jpa/Movie.java
----------------------------------------------------------------------
diff --git a/examples/jpa-hibernate/src/main/java/org/superbiz/injection/h3jpa/Movie.java b/examples/jpa-hibernate/src/main/java/org/superbiz/injection/h3jpa/Movie.java
index 6135344..8d6eed4 100644
--- a/examples/jpa-hibernate/src/main/java/org/superbiz/injection/h3jpa/Movie.java
+++ b/examples/jpa-hibernate/src/main/java/org/superbiz/injection/h3jpa/Movie.java
@@ -1,68 +1,68 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * 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.h3jpa;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-
-@Entity
-public class Movie {
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- private long id;
-
- 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.h3jpa;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+@Entity
+public class Movie {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private long id;
+
+ 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/jpa-hibernate/src/main/java/org/superbiz/injection/h3jpa/Movies.java
----------------------------------------------------------------------
diff --git a/examples/jpa-hibernate/src/main/java/org/superbiz/injection/h3jpa/Movies.java b/examples/jpa-hibernate/src/main/java/org/superbiz/injection/h3jpa/Movies.java
index 62624f5..af15cff 100644
--- a/examples/jpa-hibernate/src/main/java/org/superbiz/injection/h3jpa/Movies.java
+++ b/examples/jpa-hibernate/src/main/java/org/superbiz/injection/h3jpa/Movies.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.injection.h3jpa;
-
-import javax.ejb.Stateful;
-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;
-
- 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();
- }
-
-}
+/**
+ * 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.h3jpa;
+
+import javax.ejb.Stateful;
+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;
+
+ 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();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/jpa-hibernate/src/test/java/org/superbiz/injection/h3jpa/MoviesTest.java
----------------------------------------------------------------------
diff --git a/examples/jpa-hibernate/src/test/java/org/superbiz/injection/h3jpa/MoviesTest.java b/examples/jpa-hibernate/src/test/java/org/superbiz/injection/h3jpa/MoviesTest.java
index 556840b..4f73ead 100644
--- a/examples/jpa-hibernate/src/test/java/org/superbiz/injection/h3jpa/MoviesTest.java
+++ b/examples/jpa-hibernate/src/test/java/org/superbiz/injection/h3jpa/MoviesTest.java
@@ -1,53 +1,53 @@
-/**
- * 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.h3jpa;
-
-import junit.framework.TestCase;
-
-import javax.ejb.embeddable.EJBContainer;
-import javax.naming.Context;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * @version $Revision: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
- */
-public class MoviesTest extends TestCase {
-
- public void test() 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");
-
- final Context context = EJBContainer.createEJBContainer(p).getContext();
- Movies movies = (Movies) context.lookup("java:global/jpa-hibernate/Movies");
-
- 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());
- }
-}
+/**
+ * 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.h3jpa;
+
+import junit.framework.TestCase;
+
+import javax.ejb.embeddable.EJBContainer;
+import javax.naming.Context;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * @version $Revision: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $
+ */
+public class MoviesTest extends TestCase {
+
+ public void test() 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");
+
+ final Context context = EJBContainer.createEJBContainer(p).getContext();
+ Movies movies = (Movies) context.lookup("java:global/jpa-hibernate/Movies");
+
+ 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());
+ }
+}
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/jsf-cdi-and-ejb/src/main/java/org/superbiz/jsf/Calculator.java
----------------------------------------------------------------------
diff --git a/examples/jsf-cdi-and-ejb/src/main/java/org/superbiz/jsf/Calculator.java b/examples/jsf-cdi-and-ejb/src/main/java/org/superbiz/jsf/Calculator.java
index 109b6e6..817be8a 100644
--- a/examples/jsf-cdi-and-ejb/src/main/java/org/superbiz/jsf/Calculator.java
+++ b/examples/jsf-cdi-and-ejb/src/main/java/org/superbiz/jsf/Calculator.java
@@ -1,29 +1,28 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * 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.jsf;
-
-import javax.ejb.Stateless;
-
-@Stateless
-public class Calculator {
-
- public double add(double x, double y) {
- return x + y;
- }
-
-}
+/**
+ * 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.jsf;
+
+import javax.ejb.Stateless;
+
+@Stateless
+public class Calculator {
+
+ public double add(double x, double y) {
+ return x + y;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/jsf-managedBean-and-ejb/src/main/java/org/superbiz/jsf/Calculator.java
----------------------------------------------------------------------
diff --git a/examples/jsf-managedBean-and-ejb/src/main/java/org/superbiz/jsf/Calculator.java b/examples/jsf-managedBean-and-ejb/src/main/java/org/superbiz/jsf/Calculator.java
index 4acd132..4dc2a16 100644
--- a/examples/jsf-managedBean-and-ejb/src/main/java/org/superbiz/jsf/Calculator.java
+++ b/examples/jsf-managedBean-and-ejb/src/main/java/org/superbiz/jsf/Calculator.java
@@ -1,26 +1,25 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.superbiz.jsf;
-
-import javax.ejb.Remote;
-
-@Remote
-public interface Calculator {
-
- public double add(double x, double y);
-}
+/**
+ * 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.jsf;
+
+import javax.ejb.Remote;
+
+@Remote
+public interface Calculator {
+
+ public double add(double x, double y);
+}
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/jsf-managedBean-and-ejb/src/main/java/org/superbiz/jsf/CalculatorImpl.java
----------------------------------------------------------------------
diff --git a/examples/jsf-managedBean-and-ejb/src/main/java/org/superbiz/jsf/CalculatorImpl.java b/examples/jsf-managedBean-and-ejb/src/main/java/org/superbiz/jsf/CalculatorImpl.java
index 59ce782..43bedd0 100644
--- a/examples/jsf-managedBean-and-ejb/src/main/java/org/superbiz/jsf/CalculatorImpl.java
+++ b/examples/jsf-managedBean-and-ejb/src/main/java/org/superbiz/jsf/CalculatorImpl.java
@@ -1,29 +1,28 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * 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.jsf;
-
-import javax.ejb.Stateless;
-
-@Stateless
-public class CalculatorImpl implements Calculator {
-
- public double add(double x, double y) {
- return x + y;
- }
-
-}
+/**
+ * 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.jsf;
+
+import javax.ejb.Stateless;
+
+@Stateless
+public class CalculatorImpl implements Calculator {
+
+ public double add(double x, double y) {
+ return x + y;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/BlueBean.java
----------------------------------------------------------------------
diff --git a/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/BlueBean.java b/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/BlueBean.java
index 1006dd6..468cba0 100644
--- a/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/BlueBean.java
+++ b/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/BlueBean.java
@@ -1,39 +1,39 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.superbiz.ejblookup;
-
-import javax.ejb.EJBException;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-//START SNIPPET: code
-public class BlueBean implements Friend {
-
- public String sayHello() {
- return "Blue says, Hello!";
- }
-
- public String helloFromFriend() {
- try {
- Friend friend = (Friend) new InitialContext().lookup("java:comp/env/myFriend");
- return "My friend " + friend.sayHello();
- } catch (NamingException e) {
- throw new EJBException(e);
- }
- }
-}
-//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.ejblookup;
+
+import javax.ejb.EJBException;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+//START SNIPPET: code
+public class BlueBean implements Friend {
+
+ public String sayHello() {
+ return "Blue says, Hello!";
+ }
+
+ public String helloFromFriend() {
+ try {
+ Friend friend = (Friend) new InitialContext().lookup("java:comp/env/myFriend");
+ return "My friend " + friend.sayHello();
+ } catch (NamingException e) {
+ throw new EJBException(e);
+ }
+ }
+}
+//END SNIPPET: code
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/Friend.java
----------------------------------------------------------------------
diff --git a/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/Friend.java b/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/Friend.java
index 33a88a4..7778acc 100644
--- a/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/Friend.java
+++ b/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/Friend.java
@@ -1,34 +1,34 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * 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.ejblookup;
-
-/**
- * This is an EJB 3 local business interface
- * A local business interface may be annotated with the @Local
- * annotation, but it's optional. A business interface which is
- * not annotated with @Local or @Remote is assumed to be Local
- * if the bean does not implement any other interfaces
- */
-//START SNIPPET: code
-public interface Friend {
-
- public String sayHello();
-
- public String helloFromFriend();
-
-}
-//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.ejblookup;
+
+/**
+ * This is an EJB 3 local business interface
+ * A local business interface may be annotated with the @Local
+ * annotation, but it's optional. A business interface which is
+ * not annotated with @Local or @Remote is assumed to be Local
+ * if the bean does not implement any other interfaces
+ */
+//START SNIPPET: code
+public interface Friend {
+
+ public String sayHello();
+
+ public String helloFromFriend();
+
+}
+//END SNIPPET: code
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/RedBean.java
----------------------------------------------------------------------
diff --git a/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/RedBean.java b/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/RedBean.java
index 6f27003..4c95b70 100644
--- a/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/RedBean.java
+++ b/examples/lookup-of-ejbs-with-descriptor/src/main/java/org/superbiz/ejblookup/RedBean.java
@@ -1,39 +1,39 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.superbiz.ejblookup;
-
-import javax.ejb.EJBException;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-//START SNIPPET: code
-public class RedBean implements Friend {
-
- public String sayHello() {
- return "Red says, Hello!";
- }
-
- public String helloFromFriend() {
- try {
- Friend friend = (Friend) new InitialContext().lookup("java:comp/env/myFriend");
- return "My friend " + friend.sayHello();
- } catch (NamingException e) {
- throw new EJBException(e);
- }
- }
-}
+/**
+ * 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.ejblookup;
+
+import javax.ejb.EJBException;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+//START SNIPPET: code
+public class RedBean implements Friend {
+
+ public String sayHello() {
+ return "Red says, Hello!";
+ }
+
+ public String helloFromFriend() {
+ try {
+ Friend friend = (Friend) new InitialContext().lookup("java:comp/env/myFriend");
+ return "My friend " + friend.sayHello();
+ } catch (NamingException e) {
+ throw new EJBException(e);
+ }
+ }
+}
//END SNIPPET: code
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/lookup-of-ejbs-with-descriptor/src/test/java/org/superbiz/ejblookup/EjbDependencyTest.java
----------------------------------------------------------------------
diff --git a/examples/lookup-of-ejbs-with-descriptor/src/test/java/org/superbiz/ejblookup/EjbDependencyTest.java b/examples/lookup-of-ejbs-with-descriptor/src/test/java/org/superbiz/ejblookup/EjbDependencyTest.java
index 7f119a9..78f5686 100644
--- a/examples/lookup-of-ejbs-with-descriptor/src/test/java/org/superbiz/ejblookup/EjbDependencyTest.java
+++ b/examples/lookup-of-ejbs-with-descriptor/src/test/java/org/superbiz/ejblookup/EjbDependencyTest.java
@@ -1,54 +1,54 @@
-/**
- * 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.ejblookup;
-
-import junit.framework.TestCase;
-
-import javax.ejb.embeddable.EJBContainer;
-import javax.naming.Context;
-
-//START SNIPPET: code
-public class EjbDependencyTest extends TestCase {
-
- private Context context;
-
- protected void setUp() throws Exception {
- context = EJBContainer.createEJBContainer().getContext();
- }
-
- public void testRed() throws Exception {
-
- Friend red = (Friend) context.lookup("java:global/wombat/RedBean");
-
- assertNotNull(red);
- assertEquals("Red says, Hello!", red.sayHello());
- assertEquals("My friend Blue says, Hello!", red.helloFromFriend());
-
- }
-
- public void testBlue() throws Exception {
-
- Friend blue = (Friend) context.lookup("java:global/wombat/BlueBean");
-
- assertNotNull(blue);
- assertEquals("Blue says, Hello!", blue.sayHello());
- assertEquals("My friend Red says, Hello!", blue.helloFromFriend());
-
- }
-
-}
-//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.ejblookup;
+
+import junit.framework.TestCase;
+
+import javax.ejb.embeddable.EJBContainer;
+import javax.naming.Context;
+
+//START SNIPPET: code
+public class EjbDependencyTest extends TestCase {
+
+ private Context context;
+
+ protected void setUp() throws Exception {
+ context = EJBContainer.createEJBContainer().getContext();
+ }
+
+ public void testRed() throws Exception {
+
+ Friend red = (Friend) context.lookup("java:global/wombat/RedBean");
+
+ assertNotNull(red);
+ assertEquals("Red says, Hello!", red.sayHello());
+ assertEquals("My friend Blue says, Hello!", red.helloFromFriend());
+
+ }
+
+ public void testBlue() throws Exception {
+
+ Friend blue = (Friend) context.lookup("java:global/wombat/BlueBean");
+
+ assertNotNull(blue);
+ assertEquals("Blue says, Hello!", blue.sayHello());
+ assertEquals("My friend Red says, Hello!", blue.helloFromFriend());
+
+ }
+
+}
+//END SNIPPET: code
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/BlueBean.java
----------------------------------------------------------------------
diff --git a/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/BlueBean.java b/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/BlueBean.java
index f5dfa1a..e84823c 100644
--- a/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/BlueBean.java
+++ b/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/BlueBean.java
@@ -1,43 +1,43 @@
-/**
- * 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.ejblookup;
-
-import javax.ejb.EJB;
-import javax.ejb.EJBException;
-import javax.ejb.Stateless;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-//START SNIPPET: code
-@Stateless
-@EJB(beanInterface = Friend.class, beanName = "RedBean", name = "myFriend")
-public class BlueBean implements Friend {
-
- public String sayHello() {
- return "Blue says, Hello!";
- }
-
- public String helloFromFriend() {
- try {
- Friend friend = (Friend) new InitialContext().lookup("java:comp/env/myFriend");
- return "My friend " + friend.sayHello();
- } catch (NamingException e) {
- throw new EJBException(e);
- }
- }
-}
-//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.ejblookup;
+
+import javax.ejb.EJB;
+import javax.ejb.EJBException;
+import javax.ejb.Stateless;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+//START SNIPPET: code
+@Stateless
+@EJB(beanInterface = Friend.class, beanName = "RedBean", name = "myFriend")
+public class BlueBean implements Friend {
+
+ public String sayHello() {
+ return "Blue says, Hello!";
+ }
+
+ public String helloFromFriend() {
+ try {
+ Friend friend = (Friend) new InitialContext().lookup("java:comp/env/myFriend");
+ return "My friend " + friend.sayHello();
+ } catch (NamingException e) {
+ throw new EJBException(e);
+ }
+ }
+}
+//END SNIPPET: code
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/Friend.java
----------------------------------------------------------------------
diff --git a/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/Friend.java b/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/Friend.java
index c0601b6..8a3c836 100644
--- a/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/Friend.java
+++ b/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/Friend.java
@@ -1,37 +1,37 @@
-/**
- * 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.ejblookup;
-
-import javax.ejb.Local;
-
-/**
- * This is an EJB 3 local business interface
- * A local business interface may be annotated with the @Local
- * annotation, but it's optional. A business interface which is
- * not annotated with @Local or @Remote is assumed to be Local
- * if the bean does not implement any other interfaces
- */
-//START SNIPPET: code
-@Local
-public interface Friend {
-
- public String sayHello();
-
- public String helloFromFriend();
-
-}
-//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.ejblookup;
+
+import javax.ejb.Local;
+
+/**
+ * This is an EJB 3 local business interface
+ * A local business interface may be annotated with the @Local
+ * annotation, but it's optional. A business interface which is
+ * not annotated with @Local or @Remote is assumed to be Local
+ * if the bean does not implement any other interfaces
+ */
+//START SNIPPET: code
+@Local
+public interface Friend {
+
+ public String sayHello();
+
+ public String helloFromFriend();
+
+}
+//END SNIPPET: code
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/RedBean.java
----------------------------------------------------------------------
diff --git a/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/RedBean.java b/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/RedBean.java
index b75bd6c..6e76c893 100644
--- a/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/RedBean.java
+++ b/examples/lookup-of-ejbs/src/main/java/org/superbiz/ejblookup/RedBean.java
@@ -1,43 +1,43 @@
-/**
- * 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.ejblookup;
-
-import javax.ejb.EJB;
-import javax.ejb.EJBException;
-import javax.ejb.Stateless;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-//START SNIPPET: code
-@Stateless
-@EJB(beanInterface = Friend.class, beanName = "BlueBean", name = "myFriend")
-public class RedBean implements Friend {
-
- public String sayHello() {
- return "Red says, Hello!";
- }
-
- public String helloFromFriend() {
- try {
- Friend friend = (Friend) new InitialContext().lookup("java:comp/env/myFriend");
- return "My friend " + friend.sayHello();
- } catch (NamingException e) {
- throw new EJBException(e);
- }
- }
-}
+/**
+ * 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.ejblookup;
+
+import javax.ejb.EJB;
+import javax.ejb.EJBException;
+import javax.ejb.Stateless;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+//START SNIPPET: code
+@Stateless
+@EJB(beanInterface = Friend.class, beanName = "BlueBean", name = "myFriend")
+public class RedBean implements Friend {
+
+ public String sayHello() {
+ return "Red says, Hello!";
+ }
+
+ public String helloFromFriend() {
+ try {
+ Friend friend = (Friend) new InitialContext().lookup("java:comp/env/myFriend");
+ return "My friend " + friend.sayHello();
+ } catch (NamingException e) {
+ throw new EJBException(e);
+ }
+ }
+}
//END SNIPPET: code
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1b8ad/examples/lookup-of-ejbs/src/test/java/org/superbiz/ejblookup/EjbDependencyTest.java
----------------------------------------------------------------------
diff --git a/examples/lookup-of-ejbs/src/test/java/org/superbiz/ejblookup/EjbDependencyTest.java b/examples/lookup-of-ejbs/src/test/java/org/superbiz/ejblookup/EjbDependencyTest.java
index c70564c..b3b6504 100644
--- a/examples/lookup-of-ejbs/src/test/java/org/superbiz/ejblookup/EjbDependencyTest.java
+++ b/examples/lookup-of-ejbs/src/test/java/org/superbiz/ejblookup/EjbDependencyTest.java
@@ -1,54 +1,54 @@
-/**
- * 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.ejblookup;
-
-import junit.framework.TestCase;
-
-import javax.ejb.embeddable.EJBContainer;
-import javax.naming.Context;
-
-//START SNIPPET: code
-public class EjbDependencyTest extends TestCase {
-
- private Context context;
-
- protected void setUp() throws Exception {
- context = EJBContainer.createEJBContainer().getContext();
- }
-
- public void testRed() throws Exception {
-
- final Friend red = (Friend) context.lookup("java:global/lookup-of-ejbs/RedBean");
-
- assertNotNull(red);
- assertEquals("Red says, Hello!", red.sayHello());
- assertEquals("My friend Blue says, Hello!", red.helloFromFriend());
-
- }
-
- public void testBlue() throws Exception {
-
- final Friend blue = (Friend) context.lookup("java:global/lookup-of-ejbs/BlueBean");
-
- assertNotNull(blue);
- assertEquals("Blue says, Hello!", blue.sayHello());
- assertEquals("My friend Red says, Hello!", blue.helloFromFriend());
-
- }
-
-}
-//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.ejblookup;
+
+import junit.framework.TestCase;
+
+import javax.ejb.embeddable.EJBContainer;
+import javax.naming.Context;
+
+//START SNIPPET: code
+public class EjbDependencyTest extends TestCase {
+
+ private Context context;
+
+ protected void setUp() throws Exception {
+ context = EJBContainer.createEJBContainer().getContext();
+ }
+
+ public void testRed() throws Exception {
+
+ final Friend red = (Friend) context.lookup("java:global/lookup-of-ejbs/RedBean");
+
+ assertNotNull(red);
+ assertEquals("Red says, Hello!", red.sayHello());
+ assertEquals("My friend Blue says, Hello!", red.helloFromFriend());
+
+ }
+
+ public void testBlue() throws Exception {
+
+ final Friend blue = (Friend) context.lookup("java:global/lookup-of-ejbs/BlueBean");
+
+ assertNotNull(blue);
+ assertEquals("Blue says, Hello!", blue.sayHello());
+ assertEquals("My friend Red says, Hello!", blue.helloFromFriend());
+
+ }
+
+}
+//END SNIPPET: code