http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/injection-of-entitymanager/src/main/java/org/superbiz/injection/jpa/Movie.java ---------------------------------------------------------------------- diff --git a/examples/injection-of-entitymanager/src/main/java/org/superbiz/injection/jpa/Movie.java b/examples/injection-of-entitymanager/src/main/java/org/superbiz/injection/jpa/Movie.java index 2d40541..1bc65eb 100644 --- a/examples/injection-of-entitymanager/src/main/java/org/superbiz/injection/jpa/Movie.java +++ b/examples/injection-of-entitymanager/src/main/java/org/superbiz/injection/jpa/Movie.java @@ -1,76 +1,76 @@ -/** - * 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.jpa; -//START SNIPPET: code - -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() { - } - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - 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; - } -} -//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.jpa; +//START SNIPPET: code + +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() { + } + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + 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; + } +} +//END SNIPPET: code
http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/injection-of-entitymanager/src/main/java/org/superbiz/injection/jpa/Movies.java ---------------------------------------------------------------------- diff --git a/examples/injection-of-entitymanager/src/main/java/org/superbiz/injection/jpa/Movies.java b/examples/injection-of-entitymanager/src/main/java/org/superbiz/injection/jpa/Movies.java index be34072..71847c3 100644 --- a/examples/injection-of-entitymanager/src/main/java/org/superbiz/injection/jpa/Movies.java +++ b/examples/injection-of-entitymanager/src/main/java/org/superbiz/injection/jpa/Movies.java @@ -1,48 +1,48 @@ -/** - * 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.jpa; - -//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) 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.jpa; + +//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) 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/6e2a4f7c/examples/injection-of-entitymanager/src/test/java/org/superbiz/injection/jpa/MoviesTest.java ---------------------------------------------------------------------- diff --git a/examples/injection-of-entitymanager/src/test/java/org/superbiz/injection/jpa/MoviesTest.java b/examples/injection-of-entitymanager/src/test/java/org/superbiz/injection/jpa/MoviesTest.java index bdb36b7..a5fa5c6 100644 --- a/examples/injection-of-entitymanager/src/test/java/org/superbiz/injection/jpa/MoviesTest.java +++ b/examples/injection-of-entitymanager/src/test/java/org/superbiz/injection/jpa/MoviesTest.java @@ -1,57 +1,57 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * <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.jpa; - -import junit.framework.TestCase; - -import javax.ejb.embeddable.EJBContainer; -import javax.naming.Context; -import java.util.List; -import java.util.Properties; - -//START SNIPPET: code -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(); - - Movies movies = (Movies) context.lookup("java:global/injection-of-entitymanager/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()); - - container.close(); - } -} -//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.jpa; + +import junit.framework.TestCase; + +import javax.ejb.embeddable.EJBContainer; +import javax.naming.Context; +import java.util.List; +import java.util.Properties; + +//START SNIPPET: code +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(); + + Movies movies = (Movies) context.lookup("java:global/injection-of-entitymanager/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()); + + container.close(); + } +} +//END SNIPPET: code http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/enventry/Configuration.java ---------------------------------------------------------------------- diff --git a/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/enventry/Configuration.java b/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/enventry/Configuration.java index 49fcf1d..ea49a4a 100644 --- a/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/enventry/Configuration.java +++ b/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/enventry/Configuration.java @@ -1,63 +1,63 @@ -/** - * 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.enventry; - -import javax.annotation.Resource; -import javax.ejb.Singleton; -import java.util.Date; - -/** - * This example demostrates the use of the injection of environment entries - * using <b>Resource</b> annotation. - * <p/> - * "EJB Core Contracts and Requirements" specification section 16.4.1.1. - * - * @version $Rev$ $Date$ - */ -//START SNIPPET: code -@Singleton -public class Configuration { - - @Resource - private String color; - - @Resource - private Shape shape; - - @Resource - private Class strategy; - - @Resource(name = "date") - private long date; - - public String getColor() { - return color; - } - - public Shape getShape() { - return shape; - } - - public Class getStrategy() { - return strategy; - } - - public Date getDate() { - return new Date(date); - } -} -//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.enventry; + +import javax.annotation.Resource; +import javax.ejb.Singleton; +import java.util.Date; + +/** + * This example demostrates the use of the injection of environment entries + * using <b>Resource</b> annotation. + * <p/> + * "EJB Core Contracts and Requirements" specification section 16.4.1.1. + * + * @version $Rev$ $Date$ + */ +//START SNIPPET: code +@Singleton +public class Configuration { + + @Resource + private String color; + + @Resource + private Shape shape; + + @Resource + private Class strategy; + + @Resource(name = "date") + private long date; + + public String getColor() { + return color; + } + + public Shape getShape() { + return shape; + } + + public Class getStrategy() { + return strategy; + } + + public Date getDate() { + return new Date(date); + } +} +//END SNIPPET: code http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/enventry/Widget.java ---------------------------------------------------------------------- diff --git a/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/enventry/Widget.java b/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/enventry/Widget.java index d65a82c..000cfc4 100644 --- a/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/enventry/Widget.java +++ b/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/enventry/Widget.java @@ -1,27 +1,27 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * <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.enventry; - -/** - * Exists to show that any class object can be injected and does - * not need to be loaded directly in app code. - * - * @version $Revision$ $Date$ - */ -public class Widget { - -} +/** + * 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.enventry; + +/** + * Exists to show that any class object can be injected and does + * not need to be loaded directly in app code. + * + * @version $Revision$ $Date$ + */ +public class Widget { + +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/injection-of-env-entry/src/test/java/org/superbiz/injection/enventry/ConfigurationTest.java ---------------------------------------------------------------------- diff --git a/examples/injection-of-env-entry/src/test/java/org/superbiz/injection/enventry/ConfigurationTest.java b/examples/injection-of-env-entry/src/test/java/org/superbiz/injection/enventry/ConfigurationTest.java index eb1d2f4..e43209d 100644 --- a/examples/injection-of-env-entry/src/test/java/org/superbiz/injection/enventry/ConfigurationTest.java +++ b/examples/injection-of-env-entry/src/test/java/org/superbiz/injection/enventry/ConfigurationTest.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 - * <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.enventry; - -import junit.framework.TestCase; - -import javax.ejb.embeddable.EJBContainer; -import javax.naming.Context; -import java.util.Date; - -//START SNIPPET: code -public class ConfigurationTest extends TestCase { - - public void test() throws Exception { - final Context context = EJBContainer.createEJBContainer().getContext(); - - final Configuration configuration = (Configuration) context.lookup("java:global/injection-of-env-entry/Configuration"); - - assertEquals("orange", configuration.getColor()); - - assertEquals(Shape.TRIANGLE, configuration.getShape()); - - assertEquals(Widget.class, configuration.getStrategy()); - - assertEquals(new Date(123456789), configuration.getDate()); - } -} -//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.enventry; + +import junit.framework.TestCase; + +import javax.ejb.embeddable.EJBContainer; +import javax.naming.Context; +import java.util.Date; + +//START SNIPPET: code +public class ConfigurationTest extends TestCase { + + public void test() throws Exception { + final Context context = EJBContainer.createEJBContainer().getContext(); + + final Configuration configuration = (Configuration) context.lookup("java:global/injection-of-env-entry/Configuration"); + + assertEquals("orange", configuration.getColor()); + + assertEquals(Shape.TRIANGLE, configuration.getShape()); + + assertEquals(Widget.class, configuration.getStrategy()); + + assertEquals(new Date(123456789), configuration.getDate()); + } +} +//END SNIPPET: code + + + http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorOne.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorOne.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorOne.java index 324f2d8..8781872 100755 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorOne.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorOne.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 - * <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 javax.interceptor.AroundInvoke; -import javax.interceptor.InvocationContext; - -/** - * @version $Rev$ $Date$ - */ -public class ClassLevelInterceptorOne { - - @AroundInvoke - protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { - return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); - } - -} +/** + * 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 javax.interceptor.AroundInvoke; +import javax.interceptor.InvocationContext; + +/** + * @version $Rev$ $Date$ + */ +public class ClassLevelInterceptorOne { + + @AroundInvoke + protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { + return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); + } + +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorSuperClassOne.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorSuperClassOne.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorSuperClassOne.java index e09fb34..28dfd8e 100755 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorSuperClassOne.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorSuperClassOne.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 - * <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 javax.interceptor.AroundInvoke; -import javax.interceptor.InvocationContext; - -/** - * @version $Rev$ $Date$ - */ -public class ClassLevelInterceptorSuperClassOne { - - @AroundInvoke - protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { - return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); - } - -} +/** + * 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 javax.interceptor.AroundInvoke; +import javax.interceptor.InvocationContext; + +/** + * @version $Rev$ $Date$ + */ +public class ClassLevelInterceptorSuperClassOne { + + @AroundInvoke + protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { + return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); + } + +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorSuperClassTwo.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorSuperClassTwo.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorSuperClassTwo.java index 35f0d4e..d8d62ae 100755 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorSuperClassTwo.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorSuperClassTwo.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 - * <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 javax.interceptor.AroundInvoke; -import javax.interceptor.InvocationContext; - -/** - * @version $Rev$ $Date$ - */ -public class ClassLevelInterceptorSuperClassTwo extends SuperClassOfClassLevelInterceptor { - - @AroundInvoke - protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { - return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); - } - -} +/** + * 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 javax.interceptor.AroundInvoke; +import javax.interceptor.InvocationContext; + +/** + * @version $Rev$ $Date$ + */ +public class ClassLevelInterceptorSuperClassTwo extends SuperClassOfClassLevelInterceptor { + + @AroundInvoke + protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { + return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); + } + +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorTwo.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorTwo.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorTwo.java index f8c7bf9..39f8837 100755 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorTwo.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/ClassLevelInterceptorTwo.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 - * <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 javax.interceptor.AroundInvoke; -import javax.interceptor.InvocationContext; - -/** - * @version $Rev$ $Date$ - */ -public class ClassLevelInterceptorTwo { - - @AroundInvoke - protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { - return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); - } - -} +/** + * 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 javax.interceptor.AroundInvoke; +import javax.interceptor.InvocationContext; + +/** + * @version $Rev$ $Date$ + */ +public class ClassLevelInterceptorTwo { + + @AroundInvoke + protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { + return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); + } + +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/DefaultInterceptorOne.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/DefaultInterceptorOne.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/DefaultInterceptorOne.java index adfc493..818baf0 100755 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/DefaultInterceptorOne.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/DefaultInterceptorOne.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 - * <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 javax.annotation.PostConstruct; -import javax.interceptor.AroundInvoke; -import javax.interceptor.InvocationContext; - -/** - * @version $Rev$ $Date$ - */ -public class DefaultInterceptorOne { - - @AroundInvoke - protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { - return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); - } - - @PostConstruct - protected void postConstructInterceptor(InvocationContext ic) throws Exception { - Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); - } -} +/** + * 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 javax.annotation.PostConstruct; +import javax.interceptor.AroundInvoke; +import javax.interceptor.InvocationContext; + +/** + * @version $Rev$ $Date$ + */ +public class DefaultInterceptorOne { + + @AroundInvoke + protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { + return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); + } + + @PostConstruct + protected void postConstructInterceptor(InvocationContext ic) throws Exception { + Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); + } +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/DefaultInterceptorTwo.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/DefaultInterceptorTwo.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/DefaultInterceptorTwo.java index 6390771..3f2b72a 100755 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/DefaultInterceptorTwo.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/DefaultInterceptorTwo.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 - * <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 javax.interceptor.AroundInvoke; -import javax.interceptor.InvocationContext; - -/** - * @version $Rev$ $Date$ - */ -public class DefaultInterceptorTwo { - - @AroundInvoke - protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { - return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); - } - -} +/** + * 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 javax.interceptor.AroundInvoke; +import javax.interceptor.InvocationContext; + +/** + * @version $Rev$ $Date$ + */ +public class DefaultInterceptorTwo { + + @AroundInvoke + protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { + return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); + } + +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyIntercepted.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyIntercepted.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyIntercepted.java index 14b34bc..5a5138c 100644 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyIntercepted.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyIntercepted.java @@ -1,30 +1,30 @@ -/** - * 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 java.util.List; - -/** - * @version $Rev$ $Date$ - */ -public interface FullyIntercepted { - - List<String> businessMethod(); - - List<String> methodWithDefaultInterceptorsExcluded(); - -} +/** + * 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 java.util.List; + +/** + * @version $Rev$ $Date$ + */ +public interface FullyIntercepted { + + List<String> businessMethod(); + + List<String> methodWithDefaultInterceptorsExcluded(); + +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyInterceptedBean.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyInterceptedBean.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyInterceptedBean.java index 2dca44c..68192d7 100644 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyInterceptedBean.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyInterceptedBean.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 - * <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 javax.ejb.Local; -import javax.ejb.Stateless; -import javax.interceptor.AroundInvoke; -import javax.interceptor.Interceptors; -import javax.interceptor.InvocationContext; -import java.util.ArrayList; -import java.util.List; - -/** - * @version $Rev$ $Date$ - */ -@Stateless -@Local -@Interceptors({ClassLevelInterceptorOne.class, ClassLevelInterceptorTwo.class}) -public class FullyInterceptedBean extends FullyInterceptedSuperClass implements FullyIntercepted { - - @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) - public List<String> businessMethod() { - List<String> list = new ArrayList<String>(); - list.add("businessMethod"); - return list; - } - - @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) - public List<String> methodWithDefaultInterceptorsExcluded() { - List<String> list = new ArrayList<String>(); - list.add("methodWithDefaultInterceptorsExcluded"); - return list; - } - - @AroundInvoke - protected Object beanClassBusinessMethodInterceptor(InvocationContext ic) throws Exception { - return Utils.addClassSimpleName(ic, "beanClassBusinessMethodInterceptor"); - } -} +/** + * 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 javax.ejb.Local; +import javax.ejb.Stateless; +import javax.interceptor.AroundInvoke; +import javax.interceptor.Interceptors; +import javax.interceptor.InvocationContext; +import java.util.ArrayList; +import java.util.List; + +/** + * @version $Rev$ $Date$ + */ +@Stateless +@Local +@Interceptors({ClassLevelInterceptorOne.class, ClassLevelInterceptorTwo.class}) +public class FullyInterceptedBean extends FullyInterceptedSuperClass implements FullyIntercepted { + + @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) + public List<String> businessMethod() { + List<String> list = new ArrayList<String>(); + list.add("businessMethod"); + return list; + } + + @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) + public List<String> methodWithDefaultInterceptorsExcluded() { + List<String> list = new ArrayList<String>(); + list.add("methodWithDefaultInterceptorsExcluded"); + return list; + } + + @AroundInvoke + protected Object beanClassBusinessMethodInterceptor(InvocationContext ic) throws Exception { + return Utils.addClassSimpleName(ic, "beanClassBusinessMethodInterceptor"); + } +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyInterceptedSuperClass.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyInterceptedSuperClass.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyInterceptedSuperClass.java index c4a4bd6..0153210 100755 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyInterceptedSuperClass.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/FullyInterceptedSuperClass.java @@ -1,27 +1,27 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * <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 javax.interceptor.Interceptors; - -/** - * @version $Rev$ $Date$ - */ -@Interceptors({ClassLevelInterceptorSuperClassOne.class, ClassLevelInterceptorSuperClassTwo.class}) -public class FullyInterceptedSuperClass { - -} +/** + * 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 javax.interceptor.Interceptors; + +/** + * @version $Rev$ $Date$ + */ +@Interceptors({ClassLevelInterceptorSuperClassOne.class, ClassLevelInterceptorSuperClassTwo.class}) +public class FullyInterceptedSuperClass { + +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOne.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOne.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOne.java index fdd2059..dd601cd 100755 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOne.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOne.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 - * <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 javax.interceptor.AroundInvoke; -import javax.interceptor.InvocationContext; - -/** - * @version $Rev$ $Date$ - */ -public class MethodLevelInterceptorOne { - - @AroundInvoke - protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { - return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); - } -} +/** + * 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 javax.interceptor.AroundInvoke; +import javax.interceptor.InvocationContext; + +/** + * @version $Rev$ $Date$ + */ +public class MethodLevelInterceptorOne { + + @AroundInvoke + protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { + return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); + } +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlyIntf.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlyIntf.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlyIntf.java index f0e595e..c7e7841 100644 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlyIntf.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlyIntf.java @@ -1,25 +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 - * <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 java.io.Serializable; -import java.util.List; - -public interface MethodLevelInterceptorOnlyIntf<T extends Serializable> { - - public List<T> makePersistent(T entity); -} +/** + * 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 java.io.Serializable; +import java.util.List; + +public interface MethodLevelInterceptorOnlyIntf<T extends Serializable> { + + public List<T> makePersistent(T entity); +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlyParent.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlyParent.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlyParent.java index bde8c10..61b1136 100644 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlyParent.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlyParent.java @@ -1,24 +1,24 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * <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 java.util.List; - -public interface MethodLevelInterceptorOnlyParent extends MethodLevelInterceptorOnlyIntf<String> { - - public List<String> makePersistent(String entity); -} +/** + * 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 java.util.List; + +public interface MethodLevelInterceptorOnlyParent extends MethodLevelInterceptorOnlyIntf<String> { + + public List<String> makePersistent(String entity); +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlySLSBean.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlySLSBean.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlySLSBean.java index c5a2086..92cd641 100644 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlySLSBean.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorOnlySLSBean.java @@ -1,35 +1,35 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * <p/> - * http://www.apache.org/licenses/LICENSE-2.0 - * <p/> - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.superbiz.interceptors; - -import javax.ejb.Local; -import javax.ejb.Stateless; -import javax.interceptor.Interceptors; -import java.util.ArrayList; -import java.util.List; - -@Local(MethodLevelInterceptorOnlyParent.class) -@Stateless -public class MethodLevelInterceptorOnlySLSBean implements MethodLevelInterceptorOnlyParent { - - @Interceptors(MethodLevelInterceptorOne.class) - public List<String> makePersistent(String entity) { - List<String> list = new ArrayList<String>(); - list.add("makePersistent"); - return list; - } -} +/** + * 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 javax.ejb.Local; +import javax.ejb.Stateless; +import javax.interceptor.Interceptors; +import java.util.ArrayList; +import java.util.List; + +@Local(MethodLevelInterceptorOnlyParent.class) +@Stateless +public class MethodLevelInterceptorOnlySLSBean implements MethodLevelInterceptorOnlyParent { + + @Interceptors(MethodLevelInterceptorOne.class) + public List<String> makePersistent(String entity) { + List<String> list = new ArrayList<String>(); + list.add("makePersistent"); + return list; + } +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorTwo.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorTwo.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorTwo.java index 1569f58..df58bf6 100755 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorTwo.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/MethodLevelInterceptorTwo.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 - * <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 javax.interceptor.AroundInvoke; -import javax.interceptor.InvocationContext; - -/** - * @version $Rev$ $Date$ - */ -public class MethodLevelInterceptorTwo { - - @AroundInvoke - protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { - return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); - } -} +/** + * 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 javax.interceptor.AroundInvoke; +import javax.interceptor.InvocationContext; + +/** + * @version $Rev$ $Date$ + */ +public class MethodLevelInterceptorTwo { + + @AroundInvoke + protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { + return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); + } +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/SecondStatelessInterceptedBean.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/SecondStatelessInterceptedBean.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/SecondStatelessInterceptedBean.java index 2a028dd..a2dc9ad 100644 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/SecondStatelessInterceptedBean.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/SecondStatelessInterceptedBean.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 - * <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 javax.ejb.Stateless; -import javax.interceptor.AroundInvoke; -import javax.interceptor.Interceptors; -import javax.interceptor.InvocationContext; -import java.util.ArrayList; -import java.util.List; - -/** - * @version $Rev$ $Date$ - */ -@Stateless -@Interceptors({ClassLevelInterceptorOne.class, ClassLevelInterceptorTwo.class}) -public class SecondStatelessInterceptedBean implements SecondStatelessInterceptedLocal { - - @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) - public List<String> methodWithDefaultInterceptorsExcluded() { - List<String> list = new ArrayList<String>(); - list.add("methodWithDefaultInterceptorsExcluded"); - return list; - - } - - @AroundInvoke - protected Object beanClassBusinessMethodInterceptor(InvocationContext ic) throws Exception { - return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); - } -} +/** + * 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 javax.ejb.Stateless; +import javax.interceptor.AroundInvoke; +import javax.interceptor.Interceptors; +import javax.interceptor.InvocationContext; +import java.util.ArrayList; +import java.util.List; + +/** + * @version $Rev$ $Date$ + */ +@Stateless +@Interceptors({ClassLevelInterceptorOne.class, ClassLevelInterceptorTwo.class}) +public class SecondStatelessInterceptedBean implements SecondStatelessInterceptedLocal { + + @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) + public List<String> methodWithDefaultInterceptorsExcluded() { + List<String> list = new ArrayList<String>(); + list.add("methodWithDefaultInterceptorsExcluded"); + return list; + + } + + @AroundInvoke + protected Object beanClassBusinessMethodInterceptor(InvocationContext ic) throws Exception { + return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); + } +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/SecondStatelessInterceptedLocal.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/SecondStatelessInterceptedLocal.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/SecondStatelessInterceptedLocal.java index b85aaa5..45db243 100644 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/SecondStatelessInterceptedLocal.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/SecondStatelessInterceptedLocal.java @@ -1,27 +1,27 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * <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 java.util.List; - -/** - * @version $Rev$ $Date$ - */ -public interface SecondStatelessInterceptedLocal { - - List<String> methodWithDefaultInterceptorsExcluded(); -} +/** + * 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 java.util.List; + +/** + * @version $Rev$ $Date$ + */ +public interface SecondStatelessInterceptedLocal { + + List<String> methodWithDefaultInterceptorsExcluded(); +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/SuperClassOfClassLevelInterceptor.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/SuperClassOfClassLevelInterceptor.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/SuperClassOfClassLevelInterceptor.java index f80daa6..79d1088 100755 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/SuperClassOfClassLevelInterceptor.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/SuperClassOfClassLevelInterceptor.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 - * <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 javax.annotation.PostConstruct; -import javax.interceptor.AroundInvoke; -import javax.interceptor.InvocationContext; - -/** - * @version $Rev$ $Date$ - */ -public class SuperClassOfClassLevelInterceptor { - - @AroundInvoke - protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { - return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); - } - - @PostConstruct - protected void postConstructInterceptor(InvocationContext ic) throws Exception { - Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); - } -} +/** + * 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 javax.annotation.PostConstruct; +import javax.interceptor.AroundInvoke; +import javax.interceptor.InvocationContext; + +/** + * @version $Rev$ $Date$ + */ +public class SuperClassOfClassLevelInterceptor { + + @AroundInvoke + protected Object businessMethodInterceptor(InvocationContext ic) throws Exception { + return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); + } + + @PostConstruct + protected void postConstructInterceptor(InvocationContext ic) throws Exception { + Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); + } +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/ThirdSLSBean.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/ThirdSLSBean.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/ThirdSLSBean.java index 84ed7e1..acf2614 100755 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/ThirdSLSBean.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/ThirdSLSBean.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 - * <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 javax.ejb.Stateless; -import javax.interceptor.AroundInvoke; -import javax.interceptor.ExcludeClassInterceptors; -import javax.interceptor.ExcludeDefaultInterceptors; -import javax.interceptor.Interceptors; -import javax.interceptor.InvocationContext; -import java.util.ArrayList; -import java.util.List; - -/** - * @version $Rev$ $Date$ - */ -@Stateless -@Interceptors({ClassLevelInterceptorOne.class, ClassLevelInterceptorTwo.class}) -@ExcludeDefaultInterceptors -public class ThirdSLSBean implements ThirdSLSBeanLocal { - - @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) - public List<String> businessMethod() { - List<String> list = new ArrayList<String>(); - list.add("businessMethod"); - return list; - } - - @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) - @ExcludeClassInterceptors - public List<String> anotherBusinessMethod() { - List<String> list = new ArrayList<String>(); - list.add("anotherBusinessMethod"); - return list; - } - - @AroundInvoke - protected Object beanClassBusinessMethodInterceptor(InvocationContext ic) throws Exception { - return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); - } -} +/** + * 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 javax.ejb.Stateless; +import javax.interceptor.AroundInvoke; +import javax.interceptor.ExcludeClassInterceptors; +import javax.interceptor.ExcludeDefaultInterceptors; +import javax.interceptor.Interceptors; +import javax.interceptor.InvocationContext; +import java.util.ArrayList; +import java.util.List; + +/** + * @version $Rev$ $Date$ + */ +@Stateless +@Interceptors({ClassLevelInterceptorOne.class, ClassLevelInterceptorTwo.class}) +@ExcludeDefaultInterceptors +public class ThirdSLSBean implements ThirdSLSBeanLocal { + + @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) + public List<String> businessMethod() { + List<String> list = new ArrayList<String>(); + list.add("businessMethod"); + return list; + } + + @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) + @ExcludeClassInterceptors + public List<String> anotherBusinessMethod() { + List<String> list = new ArrayList<String>(); + list.add("anotherBusinessMethod"); + return list; + } + + @AroundInvoke + protected Object beanClassBusinessMethodInterceptor(InvocationContext ic) throws Exception { + return Utils.addClassSimpleName(ic, this.getClass().getSimpleName()); + } +} http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/interceptors/src/main/java/org/superbiz/interceptors/ThirdSLSBeanLocal.java ---------------------------------------------------------------------- diff --git a/examples/interceptors/src/main/java/org/superbiz/interceptors/ThirdSLSBeanLocal.java b/examples/interceptors/src/main/java/org/superbiz/interceptors/ThirdSLSBeanLocal.java index f903f41..0dd9fe6 100755 --- a/examples/interceptors/src/main/java/org/superbiz/interceptors/ThirdSLSBeanLocal.java +++ b/examples/interceptors/src/main/java/org/superbiz/interceptors/ThirdSLSBeanLocal.java @@ -1,29 +1,29 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * <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 java.util.List; - -/** - * @version $Rev$ $Date$ - */ -public interface ThirdSLSBeanLocal { - - List<String> businessMethod(); - - List<String> anotherBusinessMethod(); -} +/** + * 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 java.util.List; + +/** + * @version $Rev$ $Date$ + */ +public interface ThirdSLSBeanLocal { + + List<String> businessMethod(); + + List<String> anotherBusinessMethod(); +}