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/12/01 23:03:28 UTC

[16/77] [abbrv] [partial] tomee git commit: removing ^M (windows eol)

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/async-methods/README.md
----------------------------------------------------------------------
diff --git a/examples/async-methods/README.md b/examples/async-methods/README.md
index 69c93ad..ad5744a 100644
--- a/examples/async-methods/README.md
+++ b/examples/async-methods/README.md
@@ -1,154 +1,154 @@
-Title: @Asynchronous Methods
-
-The @Asynchronous annotation was introduced in EJB 3.1 as a simple way of creating asynchronous processing.
-
-Every time a method annotated `@Asynchronous` is invoked by anyone it will immediately return regardless of how long the method actually takes.  Each invocation returns a [Future][1] object that essentially starts out *empty* and will later have its value filled in by the container when the related method call actually completes.  Returning a `Future` object is not required and `@Asynchronous` methods can of course return `void`.
-
-# Example
-
-Here, in `JobProcessorTest`,
-
-`final Future<String> red = processor.addJob("red");`
-proceeds to the next statement,
-
-`final Future<String> orange = processor.addJob("orange");`
-
-without waiting for the addJob() method to complete. And later we could ask for the result using the `Future<?>.get()` method like
-
-`assertEquals("blue", blue.get());`
-
-It waits for the processing to complete (if its not completed already) and gets the result. If you did not care about the result, you could simply have your asynchronous method as a void method.
-
-[Future][1] Object from docs,
-
-> A Future represents the result of an asynchronous computation. Methods are provided to check if the computation is complete, to wait for its completion, and to retrieve the result of the computation. The result can only be retrieved using method get when the computation has completed, blocking if necessary until it is ready. Cancellation is performed by the cancel method. Additional methods are provided to determine if the task completed normally or was cancelled. Once a computation has completed, the computation cannot be cancelled. If you would like to use a Future for the sake of cancellability but not provide a usable result, you can declare types of the form Future<?> and return null as a result of the underlying task
-
-
-
-# The code
-    @Singleton
-    public class JobProcessor {
-    @Asynchronous
-    @Lock(READ)
-    @AccessTimeout(-1)
-    public Future<String> addJob(String jobName) {
-
-        // Pretend this job takes a while
-        doSomeHeavyLifting();
-
-        // Return our result
-        return new AsyncResult<String>(jobName);
-    }
-
-    private void doSomeHeavyLifting() {
-        try {
-            Thread.sleep(SECONDS.toMillis(10));
-        } catch (InterruptedException e) {
-            Thread.interrupted();
-            throw new IllegalStateException(e);
-        }
-      }
-    }
-# Test
-    public class JobProcessorTest extends TestCase {
-
-    public void test() throws Exception {
-
-        final Context context = EJBContainer.createEJBContainer().getContext();
-
-        final JobProcessor processor = (JobProcessor) context.lookup("java:global/async-methods/JobProcessor");
-
-        final long start = System.nanoTime();
-
-        // Queue up a bunch of work
-        final Future<String> red = processor.addJob("red");
-        final Future<String> orange = processor.addJob("orange");
-        final Future<String> yellow = processor.addJob("yellow");
-        final Future<String> green = processor.addJob("green");
-        final Future<String> blue = processor.addJob("blue");
-        final Future<String> violet = processor.addJob("violet");
-
-        // Wait for the result -- 1 minute worth of work
-        assertEquals("blue", blue.get());
-        assertEquals("orange", orange.get());
-        assertEquals("green", green.get());
-        assertEquals("red", red.get());
-        assertEquals("yellow", yellow.get());
-        assertEquals("violet", violet.get());
-
-        // How long did it take?
-        final long total = TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - start);
-
-        // Execution should be around 9 - 21 seconds
-		// The execution time depends on the number of threads available for asynchronous execution.
-		// In the best case it is 10s plus some minimal processing time. 
-        assertTrue("Expected > 9 but was: " + total, total > 9);
-        assertTrue("Expected < 21 but was: " + total, total < 21);
-
-      }
-    }
-#Running
-    -------------------------------------------------------
-     T E S T S
-    -------------------------------------------------------
-    Running org.superbiz.async.JobProcessorTest
-    Apache OpenEJB 7.0.0-SNAPSHOT    build: 20110801-04:02
-    http://tomee.apache.org/
-    INFO - openejb.home = G:\Workspace\fullproject\openejb3\examples\async-methods
-    INFO - openejb.base = G:\Workspace\fullproject\openejb3\examples\async-methods
-    INFO - Using 'javax.ejb.embeddable.EJBContainer=true'
-    INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
-    INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
-    INFO - Found EjbModule in classpath: g:\Workspace\fullproject\openejb3\examples\async-methods\target\classes
-    INFO - Beginning load: g:\Workspace\fullproject\openejb3\examples\async-methods\target\classes
-    INFO - Configuring enterprise application: g:\Workspace\fullproject\openejb3\examples\async-methods
-    INFO - Configuring Service(id=Default Singleton Container, type=Container, provider-id=Default Singleton Container)
-    INFO - Auto-creating a container for bean JobProcessor: Container(type=SINGLETON, id=Default Singleton Container)
-    INFO - Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container)
-    INFO - Auto-creating a container for bean org.superbiz.async.JobProcessorTest: Container(type=MANAGED, id=Default Managed Container)
-    INFO - Enterprise application "g:\Workspace\fullproject\openejb3\examples\async-methods" loaded.
-    INFO - Assembling app: g:\Workspace\fullproject\openejb3\examples\async-methods
-    INFO - Jndi(name="java:global/async-methods/JobProcessor!org.superbiz.async.JobProcessor")
-    INFO - Jndi(name="java:global/async-methods/JobProcessor")
-    INFO - Jndi(name="java:global/EjbModule100568296/org.superbiz.async.JobProcessorTest!org.superbiz.async.JobProcessorTest")
-    INFO - Jndi(name="java:global/EjbModule100568296/org.superbiz.async.JobProcessorTest")
-    INFO - Created Ejb(deployment-id=org.superbiz.async.JobProcessorTest, ejb-name=org.superbiz.async.JobProcessorTest, container=Default Managed Container)
-    INFO - Created Ejb(deployment-id=JobProcessor, ejb-name=JobProcessor, container=Default Singleton Container)
-    INFO - Started Ejb(deployment-id=org.superbiz.async.JobProcessorTest, ejb-name=org.superbiz.async.JobProcessorTest, container=Default Managed Container)
-    INFO - Started Ejb(deployment-id=JobProcessor, ejb-name=JobProcessor, container=Default Singleton Container)
-    INFO - Deployed Application(path=g:\Workspace\fullproject\openejb3\examples\async-methods)
-    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.305 sec
-
-    Results :
-
-    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-    [INFO] ------------------------------------------------------------------------
-    [INFO] BUILD SUCCESS
-    [INFO] ------------------------------------------------------------------------
-    [INFO] Total time: 21.097s
-    [INFO] Finished at: Wed Aug 03 22:48:26 IST 2011
-    [INFO] Final Memory: 13M/145M
-    [INFO] ------------------------------------------------------------------------
-
-# How it works <small>under the covers</small>
-
-Under the covers what makes this work is:
-
-  - The `JobProcessor` the caller sees is not actually an instance of `JobProcessor`.  Rather it's a subclass or proxy that has all the methods overridden.  Methods that are supposed to be asynchronous are handled differently.
-  - Calls to an asynchronous method simply result in a `Runnable` being created that wraps the method and parameters you gave.  This runnable is given to an [Executor][3] which is simply a work queue attached to a thread pool.
-  - After adding the work to the queue, the proxied version of the method returns an implementation of `Future` that is linked to the `Runnable` which is now waiting on the queue.
-  - When the `Runnable` finally executes the method on the *real* `JobProcessor` instance, it will take the return value and set it into the `Future` making it available to the caller.
-
-Important to note that the `AsyncResult` object the `JobProcessor` returns is not the same `Future` object the caller is holding.  It would have been neat if the real `JobProcessor` could just return `String` and the caller's version of `JobProcessor` could return `Future<String>`, but we didn't see any way to do that without adding more complexity.  So the `AsyncResult` is a simple wrapper object.  The container will pull the `String` out, throw the `AsyncResult` away, then put the `String` in the *real* `Future` that the caller is holding.
-
-To get progress along the way, simply pass a thread-safe object like [AtomicInteger][4] to the `@Asynchronous` method and have the bean code periodically update it with the percent complete.
-
-#Related Examples
-
-For complex asynchronous processing, JavaEE's answer is `@MessageDrivenBean`. Have a look at the [simple-mdb](../simple-mdb/README.html) example
-
-[1]: http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Future.html
-[3]: http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Executor.html
-[4]: http://download.oracle.com/javase/6/docs/api/java/util/concurrent/atomic/AtomicInteger.html
-
+Title: @Asynchronous Methods
+
+The @Asynchronous annotation was introduced in EJB 3.1 as a simple way of creating asynchronous processing.
+
+Every time a method annotated `@Asynchronous` is invoked by anyone it will immediately return regardless of how long the method actually takes.  Each invocation returns a [Future][1] object that essentially starts out *empty* and will later have its value filled in by the container when the related method call actually completes.  Returning a `Future` object is not required and `@Asynchronous` methods can of course return `void`.
+
+# Example
+
+Here, in `JobProcessorTest`,
+
+`final Future<String> red = processor.addJob("red");`
+proceeds to the next statement,
+
+`final Future<String> orange = processor.addJob("orange");`
+
+without waiting for the addJob() method to complete. And later we could ask for the result using the `Future<?>.get()` method like
+
+`assertEquals("blue", blue.get());`
+
+It waits for the processing to complete (if its not completed already) and gets the result. If you did not care about the result, you could simply have your asynchronous method as a void method.
+
+[Future][1] Object from docs,
+
+> A Future represents the result of an asynchronous computation. Methods are provided to check if the computation is complete, to wait for its completion, and to retrieve the result of the computation. The result can only be retrieved using method get when the computation has completed, blocking if necessary until it is ready. Cancellation is performed by the cancel method. Additional methods are provided to determine if the task completed normally or was cancelled. Once a computation has completed, the computation cannot be cancelled. If you would like to use a Future for the sake of cancellability but not provide a usable result, you can declare types of the form Future<?> and return null as a result of the underlying task
+
+
+
+# The code
+    @Singleton
+    public class JobProcessor {
+    @Asynchronous
+    @Lock(READ)
+    @AccessTimeout(-1)
+    public Future<String> addJob(String jobName) {
+
+        // Pretend this job takes a while
+        doSomeHeavyLifting();
+
+        // Return our result
+        return new AsyncResult<String>(jobName);
+    }
+
+    private void doSomeHeavyLifting() {
+        try {
+            Thread.sleep(SECONDS.toMillis(10));
+        } catch (InterruptedException e) {
+            Thread.interrupted();
+            throw new IllegalStateException(e);
+        }
+      }
+    }
+# Test
+    public class JobProcessorTest extends TestCase {
+
+    public void test() throws Exception {
+
+        final Context context = EJBContainer.createEJBContainer().getContext();
+
+        final JobProcessor processor = (JobProcessor) context.lookup("java:global/async-methods/JobProcessor");
+
+        final long start = System.nanoTime();
+
+        // Queue up a bunch of work
+        final Future<String> red = processor.addJob("red");
+        final Future<String> orange = processor.addJob("orange");
+        final Future<String> yellow = processor.addJob("yellow");
+        final Future<String> green = processor.addJob("green");
+        final Future<String> blue = processor.addJob("blue");
+        final Future<String> violet = processor.addJob("violet");
+
+        // Wait for the result -- 1 minute worth of work
+        assertEquals("blue", blue.get());
+        assertEquals("orange", orange.get());
+        assertEquals("green", green.get());
+        assertEquals("red", red.get());
+        assertEquals("yellow", yellow.get());
+        assertEquals("violet", violet.get());
+
+        // How long did it take?
+        final long total = TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - start);
+
+        // Execution should be around 9 - 21 seconds
+		// The execution time depends on the number of threads available for asynchronous execution.
+		// In the best case it is 10s plus some minimal processing time. 
+        assertTrue("Expected > 9 but was: " + total, total > 9);
+        assertTrue("Expected < 21 but was: " + total, total < 21);
+
+      }
+    }
+#Running
+    -------------------------------------------------------
+     T E S T S
+    -------------------------------------------------------
+    Running org.superbiz.async.JobProcessorTest
+    Apache OpenEJB 7.0.0-SNAPSHOT    build: 20110801-04:02
+    http://tomee.apache.org/
+    INFO - openejb.home = G:\Workspace\fullproject\openejb3\examples\async-methods
+    INFO - openejb.base = G:\Workspace\fullproject\openejb3\examples\async-methods
+    INFO - Using 'javax.ejb.embeddable.EJBContainer=true'
+    INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
+    INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
+    INFO - Found EjbModule in classpath: g:\Workspace\fullproject\openejb3\examples\async-methods\target\classes
+    INFO - Beginning load: g:\Workspace\fullproject\openejb3\examples\async-methods\target\classes
+    INFO - Configuring enterprise application: g:\Workspace\fullproject\openejb3\examples\async-methods
+    INFO - Configuring Service(id=Default Singleton Container, type=Container, provider-id=Default Singleton Container)
+    INFO - Auto-creating a container for bean JobProcessor: Container(type=SINGLETON, id=Default Singleton Container)
+    INFO - Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container)
+    INFO - Auto-creating a container for bean org.superbiz.async.JobProcessorTest: Container(type=MANAGED, id=Default Managed Container)
+    INFO - Enterprise application "g:\Workspace\fullproject\openejb3\examples\async-methods" loaded.
+    INFO - Assembling app: g:\Workspace\fullproject\openejb3\examples\async-methods
+    INFO - Jndi(name="java:global/async-methods/JobProcessor!org.superbiz.async.JobProcessor")
+    INFO - Jndi(name="java:global/async-methods/JobProcessor")
+    INFO - Jndi(name="java:global/EjbModule100568296/org.superbiz.async.JobProcessorTest!org.superbiz.async.JobProcessorTest")
+    INFO - Jndi(name="java:global/EjbModule100568296/org.superbiz.async.JobProcessorTest")
+    INFO - Created Ejb(deployment-id=org.superbiz.async.JobProcessorTest, ejb-name=org.superbiz.async.JobProcessorTest, container=Default Managed Container)
+    INFO - Created Ejb(deployment-id=JobProcessor, ejb-name=JobProcessor, container=Default Singleton Container)
+    INFO - Started Ejb(deployment-id=org.superbiz.async.JobProcessorTest, ejb-name=org.superbiz.async.JobProcessorTest, container=Default Managed Container)
+    INFO - Started Ejb(deployment-id=JobProcessor, ejb-name=JobProcessor, container=Default Singleton Container)
+    INFO - Deployed Application(path=g:\Workspace\fullproject\openejb3\examples\async-methods)
+    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.305 sec
+
+    Results :
+
+    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+
+    [INFO] ------------------------------------------------------------------------
+    [INFO] BUILD SUCCESS
+    [INFO] ------------------------------------------------------------------------
+    [INFO] Total time: 21.097s
+    [INFO] Finished at: Wed Aug 03 22:48:26 IST 2011
+    [INFO] Final Memory: 13M/145M
+    [INFO] ------------------------------------------------------------------------
+
+# How it works <small>under the covers</small>
+
+Under the covers what makes this work is:
+
+  - The `JobProcessor` the caller sees is not actually an instance of `JobProcessor`.  Rather it's a subclass or proxy that has all the methods overridden.  Methods that are supposed to be asynchronous are handled differently.
+  - Calls to an asynchronous method simply result in a `Runnable` being created that wraps the method and parameters you gave.  This runnable is given to an [Executor][3] which is simply a work queue attached to a thread pool.
+  - After adding the work to the queue, the proxied version of the method returns an implementation of `Future` that is linked to the `Runnable` which is now waiting on the queue.
+  - When the `Runnable` finally executes the method on the *real* `JobProcessor` instance, it will take the return value and set it into the `Future` making it available to the caller.
+
+Important to note that the `AsyncResult` object the `JobProcessor` returns is not the same `Future` object the caller is holding.  It would have been neat if the real `JobProcessor` could just return `String` and the caller's version of `JobProcessor` could return `Future<String>`, but we didn't see any way to do that without adding more complexity.  So the `AsyncResult` is a simple wrapper object.  The container will pull the `String` out, throw the `AsyncResult` away, then put the `String` in the *real* `Future` that the caller is holding.
+
+To get progress along the way, simply pass a thread-safe object like [AtomicInteger][4] to the `@Asynchronous` method and have the bean code periodically update it with the percent complete.
+
+#Related Examples
+
+For complex asynchronous processing, JavaEE's answer is `@MessageDrivenBean`. Have a look at the [simple-mdb](../simple-mdb/README.html) example
+
+[1]: http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Future.html
+[3]: http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Executor.html
+[4]: http://download.oracle.com/javase/6/docs/api/java/util/concurrent/atomic/AtomicInteger.html
+

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/async-methods/src/main/java/org/superbiz/async/JobProcessor.java
----------------------------------------------------------------------
diff --git a/examples/async-methods/src/main/java/org/superbiz/async/JobProcessor.java b/examples/async-methods/src/main/java/org/superbiz/async/JobProcessor.java
index 8389fcf..9713c91 100644
--- a/examples/async-methods/src/main/java/org/superbiz/async/JobProcessor.java
+++ b/examples/async-methods/src/main/java/org/superbiz/async/JobProcessor.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.async;
-
-import javax.ejb.AccessTimeout;
-import javax.ejb.AsyncResult;
-import javax.ejb.Asynchronous;
-import javax.ejb.Lock;
-import javax.ejb.Singleton;
-import java.util.concurrent.Future;
-
-import static java.util.concurrent.TimeUnit.SECONDS;
-import static javax.ejb.LockType.READ;
-
-/**
- * @version $Revision$ $Date$
- */
-@Singleton
-public class JobProcessor {
-
-    @Asynchronous
-    @Lock(READ)
-    @AccessTimeout(-1)
-    public Future<String> addJob(String jobName) {
-
-        // Pretend this job takes a while
-        doSomeHeavyLifting();
-
-        // Return our result
-        return new AsyncResult<String>(jobName);
-    }
-
-    private void doSomeHeavyLifting() {
-        try {
-            Thread.sleep(SECONDS.toMillis(10));
-        } catch (InterruptedException e) {
-            Thread.interrupted();
-            throw new IllegalStateException(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.async;
+
+import javax.ejb.AccessTimeout;
+import javax.ejb.AsyncResult;
+import javax.ejb.Asynchronous;
+import javax.ejb.Lock;
+import javax.ejb.Singleton;
+import java.util.concurrent.Future;
+
+import static java.util.concurrent.TimeUnit.SECONDS;
+import static javax.ejb.LockType.READ;
+
+/**
+ * @version $Revision$ $Date$
+ */
+@Singleton
+public class JobProcessor {
+
+    @Asynchronous
+    @Lock(READ)
+    @AccessTimeout(-1)
+    public Future<String> addJob(String jobName) {
+
+        // Pretend this job takes a while
+        doSomeHeavyLifting();
+
+        // Return our result
+        return new AsyncResult<String>(jobName);
+    }
+
+    private void doSomeHeavyLifting() {
+        try {
+            Thread.sleep(SECONDS.toMillis(10));
+        } catch (InterruptedException e) {
+            Thread.interrupted();
+            throw new IllegalStateException(e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/async-methods/src/test/java/org/superbiz/async/JobProcessorTest.java
----------------------------------------------------------------------
diff --git a/examples/async-methods/src/test/java/org/superbiz/async/JobProcessorTest.java b/examples/async-methods/src/test/java/org/superbiz/async/JobProcessorTest.java
index e3bf30f..47c6902 100644
--- a/examples/async-methods/src/test/java/org/superbiz/async/JobProcessorTest.java
+++ b/examples/async-methods/src/test/java/org/superbiz/async/JobProcessorTest.java
@@ -1,66 +1,66 @@
-/**
- * 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.async;
-
-import junit.framework.TestCase;
-
-import javax.ejb.embeddable.EJBContainer;
-import javax.naming.Context;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-
-/**
- * @version $Revision$ $Date$
- */
-public class JobProcessorTest extends TestCase {
-
-    public void test() throws Exception {
-
-        final Context context = EJBContainer.createEJBContainer().getContext();
-
-        final JobProcessor processor = (JobProcessor) context.lookup("java:global/async-methods/JobProcessor");
-
-        final long start = System.nanoTime();
-
-        // Queue up a bunch of work
-        final Future<String> red = processor.addJob("red");
-        final Future<String> orange = processor.addJob("orange");
-        final Future<String> yellow = processor.addJob("yellow");
-        final Future<String> green = processor.addJob("green");
-        final Future<String> blue = processor.addJob("blue");
-        final Future<String> violet = processor.addJob("violet");
-
-        // Wait for the result -- 1 minute worth of work
-        assertEquals("blue", blue.get());
-        assertEquals("orange", orange.get());
-        assertEquals("green", green.get());
-        assertEquals("red", red.get());
-        assertEquals("yellow", yellow.get());
-        assertEquals("violet", violet.get());
-
-        // How long did it take?
-        final long total = TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - start);
-
-        // Execution should be around 9 - 21 seconds
-        // The execution time depends on the number of threads available for asynchronous execution.
-        // In the best case it is 10s plus some minimal processing time.
-        assertTrue("Expected > 9 but was: " + total, total > 9);
-        assertTrue("Expected < 21 but was: " + total, total < 21);
-
-    }
-
-}
+/**
+ * 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.async;
+
+import junit.framework.TestCase;
+
+import javax.ejb.embeddable.EJBContainer;
+import javax.naming.Context;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class JobProcessorTest extends TestCase {
+
+    public void test() throws Exception {
+
+        final Context context = EJBContainer.createEJBContainer().getContext();
+
+        final JobProcessor processor = (JobProcessor) context.lookup("java:global/async-methods/JobProcessor");
+
+        final long start = System.nanoTime();
+
+        // Queue up a bunch of work
+        final Future<String> red = processor.addJob("red");
+        final Future<String> orange = processor.addJob("orange");
+        final Future<String> yellow = processor.addJob("yellow");
+        final Future<String> green = processor.addJob("green");
+        final Future<String> blue = processor.addJob("blue");
+        final Future<String> violet = processor.addJob("violet");
+
+        // Wait for the result -- 1 minute worth of work
+        assertEquals("blue", blue.get());
+        assertEquals("orange", orange.get());
+        assertEquals("green", green.get());
+        assertEquals("red", red.get());
+        assertEquals("yellow", yellow.get());
+        assertEquals("violet", violet.get());
+
+        // How long did it take?
+        final long total = TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - start);
+
+        // Execution should be around 9 - 21 seconds
+        // The execution time depends on the number of threads available for asynchronous execution.
+        // In the best case it is 10s plus some minimal processing time.
+        assertTrue("Expected > 9 but was: " + total, total > 9);
+        assertTrue("Expected < 21 but was: " + total, total < 21);
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/OlympicGamesManager.java
----------------------------------------------------------------------
diff --git a/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/OlympicGamesManager.java b/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/OlympicGamesManager.java
index 11ae3d3..704c04b 100755
--- a/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/OlympicGamesManager.java
+++ b/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/OlympicGamesManager.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.designbycontract;
-
-import javax.ejb.Stateless;
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Size;
-
-@Stateless
-public class OlympicGamesManager {
-
-    public String addSportMan(@Pattern(regexp = "^[A-Za-z]+$") String name, @Size(min = 2, max = 4) String country) {
-        if (country.equals("USA")) {
-            return null;
-        }
-        return new StringBuilder(name).append(" [").append(country).append("]").toString();
-    }
-}
+/**
+ * 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.designbycontract;
+
+import javax.ejb.Stateless;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+
+@Stateless
+public class OlympicGamesManager {
+
+    public String addSportMan(@Pattern(regexp = "^[A-Za-z]+$") String name, @Size(min = 2, max = 4) String country) {
+        if (country.equals("USA")) {
+            return null;
+        }
+        return new StringBuilder(name).append(" [").append(country).append("]").toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/PoleVaultingManager.java
----------------------------------------------------------------------
diff --git a/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/PoleVaultingManager.java b/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/PoleVaultingManager.java
index fd4a963..4380bc6 100755
--- a/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/PoleVaultingManager.java
+++ b/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/PoleVaultingManager.java
@@ -1,26 +1,26 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.superbiz.designbycontract;
-
-import javax.ejb.Local;
-import javax.validation.constraints.Min;
-
-@Local
-public interface PoleVaultingManager {
-
-    int points(@Min(120) int centimeters);
-}
+/**
+ * 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.designbycontract;
+
+import javax.ejb.Local;
+import javax.validation.constraints.Min;
+
+@Local
+public interface PoleVaultingManager {
+
+    int points(@Min(120) int centimeters);
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/PoleVaultingManagerBean.java
----------------------------------------------------------------------
diff --git a/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/PoleVaultingManagerBean.java b/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/PoleVaultingManagerBean.java
index 7e4ddfb..a66979e 100755
--- a/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/PoleVaultingManagerBean.java
+++ b/examples/bean-validation-design-by-contract/src/main/java/org/superbiz/designbycontract/PoleVaultingManagerBean.java
@@ -1,28 +1,28 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.superbiz.designbycontract;
-
-import javax.ejb.Stateless;
-
-@Stateless
-public class PoleVaultingManagerBean implements PoleVaultingManager {
-
-    @Override
-    public int points(int centimeters) {
-        return centimeters - 120;
-    }
-}
+/**
+ * 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.designbycontract;
+
+import javax.ejb.Stateless;
+
+@Stateless
+public class PoleVaultingManagerBean implements PoleVaultingManager {
+
+    @Override
+    public int points(int centimeters) {
+        return centimeters - 120;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/ejb/BusinessBean.java
----------------------------------------------------------------------
diff --git a/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/ejb/BusinessBean.java b/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/ejb/BusinessBean.java
index 0f49ed8..853a967 100644
--- a/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/ejb/BusinessBean.java
+++ b/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/ejb/BusinessBean.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.webapp1.ejb;
-
-import javax.ejb.Stateless;
-import javax.validation.constraints.Pattern;
-
-@Stateless
-public class BusinessBean {
-
-    public void doStuff(@Pattern(regexp = "valid") final String txt) {
-        System.out.println("Received: " + txt);
-    }
-
-}
+/**
+ * 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.webapp1.ejb;
+
+import javax.ejb.Stateless;
+import javax.validation.constraints.Pattern;
+
+@Stateless
+public class BusinessBean {
+
+    public void doStuff(@Pattern(regexp = "valid") final String txt) {
+        System.out.println("Received: " + txt);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/messages/ErrorList.java
----------------------------------------------------------------------
diff --git a/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/messages/ErrorList.java b/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/messages/ErrorList.java
index b5354da..ac7d12f 100644
--- a/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/messages/ErrorList.java
+++ b/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/messages/ErrorList.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.webapp1.messages;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import java.util.ArrayList;
-import java.util.Collection;
-
-@XmlRootElement
-@XmlSeeAlso(ErrorResponse.class)
-public class ErrorList<T> extends ArrayList<T> {
-
-    private static final long serialVersionUID = -8861634470374757349L;
-
-    public ErrorList() {
-    }
-
-    public ErrorList(final Collection<? extends T> clctn) {
-        addAll(clctn);
-    }
-
-}
+/**
+ * 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.webapp1.messages;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import java.util.ArrayList;
+import java.util.Collection;
+
+@XmlRootElement
+@XmlSeeAlso(ErrorResponse.class)
+public class ErrorList<T> extends ArrayList<T> {
+
+    private static final long serialVersionUID = -8861634470374757349L;
+
+    public ErrorList() {
+    }
+
+    public ErrorList(final Collection<? extends T> clctn) {
+        addAll(clctn);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/messages/ErrorResponse.java
----------------------------------------------------------------------
diff --git a/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/messages/ErrorResponse.java b/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/messages/ErrorResponse.java
index b544f06..d37f314 100644
--- a/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/messages/ErrorResponse.java
+++ b/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/messages/ErrorResponse.java
@@ -1,77 +1,77 @@
-/**
- * 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.webapp1.messages;
-
-import javax.ws.rs.core.Response;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.Date;
-
-@XmlRootElement
-public class ErrorResponse implements Serializable {
-    private static final long serialVersionUID = 8888101217538645771L;
-
-    private Long id;
-    private Response.Status status;
-    private String message;
-
-    public ErrorResponse() {
-        this.id = new Date().getTime();
-    }
-
-    public ErrorResponse(final Response.Status status, final String message) {
-        this.id = new Date().getTime();
-        this.status = status;
-        this.message = message;
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(final Long id) {
-        this.id = id;
-    }
-
-    public Response.Status getStatus() {
-        return status;
-    }
-
-    @XmlAttribute
-    public void setStatus(final Response.Status status) {
-        this.status = status;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    @XmlAttribute
-    public void setMessage(final String message) {
-        this.message = message;
-    }
-
-    //    @Override
-//    public String toString() {
-//        return "{" + "id:" + id + ", status:" + status + ", message:" + message + '}';
-//    }
-    @Override
-    public String toString() {
-        return "ErrorResponse:" + "id=" + id + ", status=" + status + ", message=" + message;
-    }
-}
+/**
+ * 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.webapp1.messages;
+
+import javax.ws.rs.core.Response;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.Date;
+
+@XmlRootElement
+public class ErrorResponse implements Serializable {
+    private static final long serialVersionUID = 8888101217538645771L;
+
+    private Long id;
+    private Response.Status status;
+    private String message;
+
+    public ErrorResponse() {
+        this.id = new Date().getTime();
+    }
+
+    public ErrorResponse(final Response.Status status, final String message) {
+        this.id = new Date().getTime();
+        this.status = status;
+        this.message = message;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(final Long id) {
+        this.id = id;
+    }
+
+    public Response.Status getStatus() {
+        return status;
+    }
+
+    @XmlAttribute
+    public void setStatus(final Response.Status status) {
+        this.status = status;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    @XmlAttribute
+    public void setMessage(final String message) {
+        this.message = message;
+    }
+
+    //    @Override
+//    public String toString() {
+//        return "{" + "id:" + id + ", status:" + status + ", message:" + message + '}';
+//    }
+    @Override
+    public String toString() {
+        return "ErrorResponse:" + "id=" + id + ", status=" + status + ", message=" + message;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/provider/ConstraintViolationExceptionMapper.java
----------------------------------------------------------------------
diff --git a/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/provider/ConstraintViolationExceptionMapper.java b/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/provider/ConstraintViolationExceptionMapper.java
index 1dc9496..0cc7aad 100644
--- a/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/provider/ConstraintViolationExceptionMapper.java
+++ b/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/provider/ConstraintViolationExceptionMapper.java
@@ -1,61 +1,61 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * <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.webapp1.provider;
-
-import org.superbiz.webapp1.messages.ErrorList;
-import org.superbiz.webapp1.messages.ErrorResponse;
-
-import javax.validation.ConstraintViolation;
-import javax.validation.ConstraintViolationException;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.ext.ExceptionMapper;
-import javax.ws.rs.ext.Provider;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-
-@Provider
-@Produces(MediaType.APPLICATION_JSON)
-public class ConstraintViolationExceptionMapper implements ExceptionMapper<ConstraintViolationException> {
-
-    @Context
-    private HttpHeaders headers;
-
-    @Override
-    public Response toResponse(final ConstraintViolationException t) {
-        final MediaType type = headers.getMediaType();
-        final Locale locale = headers.getLanguage();
-
-        final Object responsObject = getConstraintViolationErrors(t);
-        return Response.status(Response.Status.NOT_ACCEPTABLE).type(type).language(locale).entity(responsObject).build();
-    }
-
-    private static Object getConstraintViolationErrors(final ConstraintViolationException ex) {
-        final List<ErrorResponse> errors = new ArrayList<ErrorResponse>();
-        for (final ConstraintViolation violation : ex.getConstraintViolations()) {
-            final ErrorResponse error = new ErrorResponse();
-            error.setMessage(violation.getMessage());
-            errors.add(error);
-        }
-        return new ErrorList<ErrorResponse>(errors);
-    }
-
-}
+/**
+ * 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.webapp1.provider;
+
+import org.superbiz.webapp1.messages.ErrorList;
+import org.superbiz.webapp1.messages.ErrorResponse;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.ConstraintViolationException;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.ExceptionMapper;
+import javax.ws.rs.ext.Provider;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+@Provider
+@Produces(MediaType.APPLICATION_JSON)
+public class ConstraintViolationExceptionMapper implements ExceptionMapper<ConstraintViolationException> {
+
+    @Context
+    private HttpHeaders headers;
+
+    @Override
+    public Response toResponse(final ConstraintViolationException t) {
+        final MediaType type = headers.getMediaType();
+        final Locale locale = headers.getLanguage();
+
+        final Object responsObject = getConstraintViolationErrors(t);
+        return Response.status(Response.Status.NOT_ACCEPTABLE).type(type).language(locale).entity(responsObject).build();
+    }
+
+    private static Object getConstraintViolationErrors(final ConstraintViolationException ex) {
+        final List<ErrorResponse> errors = new ArrayList<ErrorResponse>();
+        for (final ConstraintViolation violation : ex.getConstraintViolations()) {
+            final ErrorResponse error = new ErrorResponse();
+            error.setMessage(violation.getMessage());
+            errors.add(error);
+        }
+        return new ErrorList<ErrorResponse>(errors);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/service/WebApp1Service.java
----------------------------------------------------------------------
diff --git a/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/service/WebApp1Service.java b/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/service/WebApp1Service.java
index cb03bde..4514a4c 100644
--- a/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/service/WebApp1Service.java
+++ b/examples/bval-evaluation-redeployment/WebApp1/src/main/java/org/superbiz/webapp1/service/WebApp1Service.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
- * <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.webapp1.service;
-
-import javax.ejb.Singleton;
-import javax.validation.constraints.Pattern;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-@Path("test")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
-@Singleton
-public class WebApp1Service {
-
-    @POST
-    public Response getInfo(@Pattern(regexp = "valid") final String input) {
-        return Response.ok().build();
-    }
-
-}
+/**
+ * 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.webapp1.service;
+
+import javax.ejb.Singleton;
+import javax.validation.constraints.Pattern;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+@Path("test")
+@Consumes(MediaType.APPLICATION_JSON)
+@Produces(MediaType.APPLICATION_JSON)
+@Singleton
+public class WebApp1Service {
+
+    @POST
+    public Response getInfo(@Pattern(regexp = "valid") final String input) {
+        return Response.ok().build();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/messages/ErrorList.java
----------------------------------------------------------------------
diff --git a/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/messages/ErrorList.java b/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/messages/ErrorList.java
index 9e555ca..556f78e 100644
--- a/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/messages/ErrorList.java
+++ b/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/messages/ErrorList.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.webapp2.messages;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import java.util.ArrayList;
-import java.util.Collection;
-
-@XmlRootElement
-@XmlSeeAlso(ErrorResponse.class)
-public class ErrorList<T> extends ArrayList<T> {
-
-    private static final long serialVersionUID = -8861634470374757349L;
-
-    public ErrorList() {
-    }
-
-    public ErrorList(final Collection<? extends T> clctn) {
-        addAll(clctn);
-    }
-
-}
+/**
+ * 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.webapp2.messages;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import java.util.ArrayList;
+import java.util.Collection;
+
+@XmlRootElement
+@XmlSeeAlso(ErrorResponse.class)
+public class ErrorList<T> extends ArrayList<T> {
+
+    private static final long serialVersionUID = -8861634470374757349L;
+
+    public ErrorList() {
+    }
+
+    public ErrorList(final Collection<? extends T> clctn) {
+        addAll(clctn);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/messages/ErrorResponse.java
----------------------------------------------------------------------
diff --git a/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/messages/ErrorResponse.java b/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/messages/ErrorResponse.java
index 12fbb5f..b647393 100644
--- a/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/messages/ErrorResponse.java
+++ b/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/messages/ErrorResponse.java
@@ -1,77 +1,77 @@
-/**
- * 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.webapp2.messages;
-
-import javax.ws.rs.core.Response;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.Date;
-
-@XmlRootElement
-public class ErrorResponse implements Serializable {
-    private static final long serialVersionUID = 8888101217538645771L;
-
-    private Long id;
-    private Response.Status status;
-    private String message;
-
-    public ErrorResponse() {
-        this.id = new Date().getTime();
-    }
-
-    public ErrorResponse(final Response.Status status, final String message) {
-        this.id = new Date().getTime();
-        this.status = status;
-        this.message = message;
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(final Long id) {
-        this.id = id;
-    }
-
-    public Response.Status getStatus() {
-        return status;
-    }
-
-    @XmlAttribute
-    public void setStatus(final Response.Status status) {
-        this.status = status;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    @XmlAttribute
-    public void setMessage(final String message) {
-        this.message = message;
-    }
-
-    //    @Override
-//    public String toString() {
-//        return "{" + "id:" + id + ", status:" + status + ", message:" + message + '}';
-//    }
-    @Override
-    public String toString() {
-        return "ErrorResponse:" + "id=" + id + ", status=" + status + ", message=" + message;
-    }
-}
+/**
+ * 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.webapp2.messages;
+
+import javax.ws.rs.core.Response;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.Date;
+
+@XmlRootElement
+public class ErrorResponse implements Serializable {
+    private static final long serialVersionUID = 8888101217538645771L;
+
+    private Long id;
+    private Response.Status status;
+    private String message;
+
+    public ErrorResponse() {
+        this.id = new Date().getTime();
+    }
+
+    public ErrorResponse(final Response.Status status, final String message) {
+        this.id = new Date().getTime();
+        this.status = status;
+        this.message = message;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(final Long id) {
+        this.id = id;
+    }
+
+    public Response.Status getStatus() {
+        return status;
+    }
+
+    @XmlAttribute
+    public void setStatus(final Response.Status status) {
+        this.status = status;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    @XmlAttribute
+    public void setMessage(final String message) {
+        this.message = message;
+    }
+
+    //    @Override
+//    public String toString() {
+//        return "{" + "id:" + id + ", status:" + status + ", message:" + message + '}';
+//    }
+    @Override
+    public String toString() {
+        return "ErrorResponse:" + "id=" + id + ", status=" + status + ", message=" + message;
+    }
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/provider/ConstraintViolationExceptionMapper.java
----------------------------------------------------------------------
diff --git a/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/provider/ConstraintViolationExceptionMapper.java b/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/provider/ConstraintViolationExceptionMapper.java
index 2d12935..4732fba 100644
--- a/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/provider/ConstraintViolationExceptionMapper.java
+++ b/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/provider/ConstraintViolationExceptionMapper.java
@@ -1,61 +1,61 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * <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.webapp2.provider;
-
-import org.superbiz.webapp2.messages.ErrorList;
-import org.superbiz.webapp2.messages.ErrorResponse;
-
-import javax.validation.ConstraintViolation;
-import javax.validation.ConstraintViolationException;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.ext.ExceptionMapper;
-import javax.ws.rs.ext.Provider;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-
-@Provider
-@Produces(MediaType.APPLICATION_JSON)
-public class ConstraintViolationExceptionMapper implements ExceptionMapper<ConstraintViolationException> {
-
-    @Context
-    private HttpHeaders headers;
-
-    @Override
-    public Response toResponse(final ConstraintViolationException t) {
-        final MediaType type = headers.getMediaType();
-        final Locale locale = headers.getLanguage();
-
-        final Object responsObject = getConstraintViolationErrors(t);
-        return Response.status(Response.Status.NOT_ACCEPTABLE).type(type).language(locale).entity(responsObject).build();
-    }
-
-    private static Object getConstraintViolationErrors(final ConstraintViolationException ex) {
-        final List<ErrorResponse> errors = new ArrayList<ErrorResponse>();
-        for (final ConstraintViolation violation : ex.getConstraintViolations()) {
-            final ErrorResponse error = new ErrorResponse();
-            error.setMessage(violation.getMessage());
-            errors.add(error);
-        }
-        return new ErrorList<ErrorResponse>(errors);
-    }
-
-}
+/**
+ * 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.webapp2.provider;
+
+import org.superbiz.webapp2.messages.ErrorList;
+import org.superbiz.webapp2.messages.ErrorResponse;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.ConstraintViolationException;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.ExceptionMapper;
+import javax.ws.rs.ext.Provider;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+@Provider
+@Produces(MediaType.APPLICATION_JSON)
+public class ConstraintViolationExceptionMapper implements ExceptionMapper<ConstraintViolationException> {
+
+    @Context
+    private HttpHeaders headers;
+
+    @Override
+    public Response toResponse(final ConstraintViolationException t) {
+        final MediaType type = headers.getMediaType();
+        final Locale locale = headers.getLanguage();
+
+        final Object responsObject = getConstraintViolationErrors(t);
+        return Response.status(Response.Status.NOT_ACCEPTABLE).type(type).language(locale).entity(responsObject).build();
+    }
+
+    private static Object getConstraintViolationErrors(final ConstraintViolationException ex) {
+        final List<ErrorResponse> errors = new ArrayList<ErrorResponse>();
+        for (final ConstraintViolation violation : ex.getConstraintViolations()) {
+            final ErrorResponse error = new ErrorResponse();
+            error.setMessage(violation.getMessage());
+            errors.add(error);
+        }
+        return new ErrorList<ErrorResponse>(errors);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java
----------------------------------------------------------------------
diff --git a/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java b/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java
index 0c55163..f0c55d1 100644
--- a/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.java
+++ b/examples/bval-evaluation-redeployment/WebApp2/src/main/java/org/superbiz/webapp2/service/WebApp2Service.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
- * <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.webapp2.service;
-
-import javax.ejb.Singleton;
-import javax.validation.constraints.Pattern;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-@Singleton
-@Path("test")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
-public class WebApp2Service {
-
-    @POST
-    public Response getInfo(@Pattern(regexp = "valid") final String input) {
-        return Response.ok().build();
-    }
-
-}
+/**
+ * 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.webapp2.service;
+
+import javax.ejb.Singleton;
+import javax.validation.constraints.Pattern;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+@Singleton
+@Path("test")
+@Consumes(MediaType.APPLICATION_JSON)
+@Produces(MediaType.APPLICATION_JSON)
+public class WebApp2Service {
+
+    @POST
+    public Response getInfo(@Pattern(regexp = "valid") final String input) {
+        return Response.ok().build();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/tomee/blob/6e2a4f7c/examples/bval-evaluation-redeployment/runner/src/test/java/RedeploymentTest.java
----------------------------------------------------------------------
diff --git a/examples/bval-evaluation-redeployment/runner/src/test/java/RedeploymentTest.java b/examples/bval-evaluation-redeployment/runner/src/test/java/RedeploymentTest.java
index c7f3dd9..5ea9046 100644
--- a/examples/bval-evaluation-redeployment/runner/src/test/java/RedeploymentTest.java
+++ b/examples/bval-evaluation-redeployment/runner/src/test/java/RedeploymentTest.java
@@ -1,87 +1,87 @@
-/**
- * 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.
- */
-
-import org.apache.cxf.jaxrs.client.WebClient;
-import org.jboss.arquillian.container.test.api.Deployer;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import javax.ws.rs.core.MediaType;
-import java.io.File;
-
-@RunWith(Arquillian.class)
-public class RedeploymentTest {
-
-    public RedeploymentTest() {
-    }
-
-    @Deployment(name = "webapp1", managed = false)
-    public static Archive<?> webapp1() {
-        return ShrinkWrap.createFromZipFile(WebArchive.class, new File("../WebApp1/target/WebApp1-1.1.0-SNAPSHOT.war"));
-    }
-
-    @Deployment(name = "webapp2", managed = false)
-    public static Archive<?> webapp2() {
-        return ShrinkWrap.createFromZipFile(WebArchive.class, new File("../WebApp2/target/WebApp2-1.1.0-SNAPSHOT.war"));
-    }
-
-    @ArquillianResource
-    private Deployer deployer;
-
-    @Test
-    public void validateTest() throws Exception {
-
-        final String port = System.getProperty("server.http.port", "8080");
-        System.out.println("");
-        System.out.println("===========================================");
-        System.out.println("Running test on port: " + port);
-
-        deployer.deploy("webapp1");
-        int result = WebClient.create("http://localhost:" + port + "/WebApp1/test/")
-                .type(MediaType.APPLICATION_JSON_TYPE).post("validd").getStatus();
-        System.out.println(result);
-        Assert.assertEquals(406, result);
-
-        //Not interested in webapp2 output
-        // deployer.undeploy("webapp2");
-        deployer.deploy("webapp2");
-
-        result = WebClient.create("http://localhost:" + port + "/WebApp1/test/")
-                .type(MediaType.APPLICATION_JSON_TYPE).post("validd").getStatus();
-        System.out.println(result);
-        Assert.assertEquals(406, result);
-        deployer.undeploy("webapp2");
-        result = WebClient.create("http://localhost:" + port + "/WebApp1/test/")
-                .type(MediaType.APPLICATION_JSON_TYPE).post("validd").getStatus();
-        System.out.println(result);
-        Assert.assertEquals(406, result);
-        result = WebClient.create("http://localhost:" + port + "/WebApp1/test/")
-                .type(MediaType.APPLICATION_JSON_TYPE).post("valid").getStatus();
-        System.out.println(result);
-        Assert.assertEquals(200, result);
-        System.out.println("===========================================");
-        System.out.println("");
-    }
-
-}
+/**
+ * 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.
+ */
+
+import org.apache.cxf.jaxrs.client.WebClient;
+import org.jboss.arquillian.container.test.api.Deployer;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import javax.ws.rs.core.MediaType;
+import java.io.File;
+
+@RunWith(Arquillian.class)
+public class RedeploymentTest {
+
+    public RedeploymentTest() {
+    }
+
+    @Deployment(name = "webapp1", managed = false)
+    public static Archive<?> webapp1() {
+        return ShrinkWrap.createFromZipFile(WebArchive.class, new File("../WebApp1/target/WebApp1-1.1.0-SNAPSHOT.war"));
+    }
+
+    @Deployment(name = "webapp2", managed = false)
+    public static Archive<?> webapp2() {
+        return ShrinkWrap.createFromZipFile(WebArchive.class, new File("../WebApp2/target/WebApp2-1.1.0-SNAPSHOT.war"));
+    }
+
+    @ArquillianResource
+    private Deployer deployer;
+
+    @Test
+    public void validateTest() throws Exception {
+
+        final String port = System.getProperty("server.http.port", "8080");
+        System.out.println("");
+        System.out.println("===========================================");
+        System.out.println("Running test on port: " + port);
+
+        deployer.deploy("webapp1");
+        int result = WebClient.create("http://localhost:" + port + "/WebApp1/test/")
+                .type(MediaType.APPLICATION_JSON_TYPE).post("validd").getStatus();
+        System.out.println(result);
+        Assert.assertEquals(406, result);
+
+        //Not interested in webapp2 output
+        // deployer.undeploy("webapp2");
+        deployer.deploy("webapp2");
+
+        result = WebClient.create("http://localhost:" + port + "/WebApp1/test/")
+                .type(MediaType.APPLICATION_JSON_TYPE).post("validd").getStatus();
+        System.out.println(result);
+        Assert.assertEquals(406, result);
+        deployer.undeploy("webapp2");
+        result = WebClient.create("http://localhost:" + port + "/WebApp1/test/")
+                .type(MediaType.APPLICATION_JSON_TYPE).post("validd").getStatus();
+        System.out.println(result);
+        Assert.assertEquals(406, result);
+        result = WebClient.create("http://localhost:" + port + "/WebApp1/test/")
+                .type(MediaType.APPLICATION_JSON_TYPE).post("valid").getStatus();
+        System.out.println(result);
+        Assert.assertEquals(200, result);
+        System.out.println("===========================================");
+        System.out.println("");
+    }
+
+}