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 2014/07/07 21:07:53 UTC

svn commit: r1608563 [18/38] - in /tomee/tomee/branches/tomee-1.7.x/itests: failover-ejb/src/main/java/org/apache/openejb/itest/failover/ejb/ failover/src/main/java/org/apache/openejb/itest/failover/ failover/src/main/java/org/apache/openejb/server/con...

Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/EncStatelessBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/EncStatelessBean.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/EncStatelessBean.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/EncStatelessBean.java Mon Jul  7 19:07:41 2014
@@ -43,7 +43,7 @@ import org.apache.openejb.test.entity.bm
 import org.apache.openejb.test.entity.bmp.BasicBmpObject;
 import org.apache.openejb.test.stateful.*;
 
-public class EncStatelessBean implements javax.ejb.SessionBean{
+public class EncStatelessBean implements javax.ejb.SessionBean {
 
     private String name;
     private SessionContext ejbContext;
@@ -60,454 +60,454 @@ public class EncStatelessBean implements
     //=============================
     // Remote interface methods
     //
-    public void lookupEntityBean() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupEntityBean() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            BasicBmpHome home = (BasicBmpHome) javax.rmi.PortableRemoteObject.narrow( ctx.lookup("java:comp/env/stateless/beanReferences/bmp_entity"), BasicBmpHome.class );
-            Assert.assertNotNull("The EJBHome looked up is null",home);
+                final BasicBmpHome home = (BasicBmpHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/stateless/beanReferences/bmp_entity"), BasicBmpHome.class);
+                Assert.assertNotNull("The EJBHome looked up is null", home);
 
-            BasicBmpObject object = home.createObject("Enc Bean");
-            Assert.assertNotNull("The EJBObject is null", object );
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+                final BasicBmpObject object = home.createObject("Enc Bean");
+                Assert.assertNotNull("The EJBObject is null", object);
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStatefulBean() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupStatefulBean() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            BasicStatefulHome home = (BasicStatefulHome) javax.rmi.PortableRemoteObject.narrow( ctx.lookup("java:comp/env/stateless/beanReferences/stateful"), BasicStatefulHome.class );
-            Assert.assertNotNull("The EJBHome looked up is null",home);
+                final BasicStatefulHome home = (BasicStatefulHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/stateless/beanReferences/stateful"), BasicStatefulHome.class);
+                Assert.assertNotNull("The EJBHome looked up is null", home);
 
-            BasicStatefulObject object = home.createObject("Enc Bean");
-            Assert.assertNotNull("The EJBObject is null", object );
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+                final BasicStatefulObject object = home.createObject("Enc Bean");
+                Assert.assertNotNull("The EJBObject is null", object);
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStatelessBean() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupStatelessBean() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            BasicStatelessHome home = (BasicStatelessHome) javax.rmi.PortableRemoteObject.narrow( ctx.lookup("java:comp/env/stateless/beanReferences/stateless"), BasicStatelessHome.class );
-            Assert.assertNotNull("The EJBHome looked up is null",home);
+                final BasicStatelessHome home = (BasicStatelessHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/stateless/beanReferences/stateless"), BasicStatelessHome.class);
+                Assert.assertNotNull("The EJBHome looked up is null", home);
 
-            BasicStatelessObject object = home.createObject();
-            Assert.assertNotNull("The EJBObject is null", object );
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+                final BasicStatelessObject object = home.createObject();
+                Assert.assertNotNull("The EJBObject is null", object);
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStatelessBusinessLocal() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupStatelessBusinessLocal() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-                Object o = ctx.lookup("java:comp/env/stateless/beanReferences/stateless-business-local");
-                BasicStatelessBusinessLocal object = (BasicStatelessBusinessLocal) o;
-            Assert.assertNotNull("The EJB BusinessLocal is null", object );
-            } catch (Exception e){
+                final Object o = ctx.lookup("java:comp/env/stateless/beanReferences/stateless-business-local");
+                final BasicStatelessBusinessLocal object = (BasicStatelessBusinessLocal) o;
+                Assert.assertNotNull("The EJB BusinessLocal is null", object);
+            } catch (final Exception e) {
                 e.printStackTrace();
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStatelessBusinessLocalBean() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupStatelessBusinessLocalBean() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-                Object o = ctx.lookup("java:comp/env/stateless/beanReferences/stateless-business-localbean");
-                BasicStatelessPojoBean object = (BasicStatelessPojoBean) o;
-            Assert.assertNotNull("The EJB BusinessLocal is null", object );
-            } catch (Exception e){
+                final Object o = ctx.lookup("java:comp/env/stateless/beanReferences/stateless-business-localbean");
+                final BasicStatelessPojoBean object = (BasicStatelessPojoBean) o;
+                Assert.assertNotNull("The EJB BusinessLocal is null", object);
+            } catch (final Exception e) {
                 e.printStackTrace();
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStatelessBusinessRemote() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupStatelessBusinessRemote() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            BasicStatelessBusinessRemote object = (BasicStatelessBusinessRemote) javax.rmi.PortableRemoteObject.narrow( ctx.lookup("java:comp/env/stateless/beanReferences/stateless-business-remote"), BasicStatelessBusinessRemote.class );
-            Assert.assertNotNull("The EJB BusinessRemote is null", object );
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+                final BasicStatelessBusinessRemote object = (BasicStatelessBusinessRemote) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/stateless/beanReferences/stateless-business-remote"), BasicStatelessBusinessRemote.class);
+                Assert.assertNotNull("The EJB BusinessRemote is null", object);
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStatefulBusinessLocal() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupStatefulBusinessLocal() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            BasicStatefulBusinessLocal object = (BasicStatefulBusinessLocal) javax.rmi.PortableRemoteObject.narrow( ctx.lookup("java:comp/env/stateless/beanReferences/stateful-business-local"), BasicStatefulBusinessLocal.class );
-            Assert.assertNotNull("The EJB BusinessLocal is null", object );
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+                final BasicStatefulBusinessLocal object = (BasicStatefulBusinessLocal) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/stateless/beanReferences/stateful-business-local"), BasicStatefulBusinessLocal.class);
+                Assert.assertNotNull("The EJB BusinessLocal is null", object);
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStatefulBusinessLocalBean() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupStatefulBusinessLocalBean() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            BasicStatefulPojoBean object = (BasicStatefulPojoBean) ctx.lookup("java:comp/env/stateless/beanReferences/stateful-business-localbean");
-            Assert.assertNotNull("The EJB BusinessLocalBean is null", object );
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+                final BasicStatefulPojoBean object = (BasicStatefulPojoBean) ctx.lookup("java:comp/env/stateless/beanReferences/stateful-business-localbean");
+                Assert.assertNotNull("The EJB BusinessLocalBean is null", object);
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStatefulBusinessRemote() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupStatefulBusinessRemote() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            BasicStatefulBusinessRemote object = (BasicStatefulBusinessRemote) javax.rmi.PortableRemoteObject.narrow( ctx.lookup("java:comp/env/stateless/beanReferences/stateful-business-remote"), BasicStatefulBusinessRemote.class );
-            Assert.assertNotNull("The EJB BusinessRemote is null", object );
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+                final BasicStatefulBusinessRemote object = (BasicStatefulBusinessRemote) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/stateless/beanReferences/stateful-business-remote"), BasicStatefulBusinessRemote.class);
+                Assert.assertNotNull("The EJB BusinessRemote is null", object);
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStringEntry() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupStringEntry() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            String expected = new String("1");
-            String actual   = (String)ctx.lookup("java:comp/env/stateless/references/String");
+                final String expected = new String("1");
+                final String actual = (String) ctx.lookup("java:comp/env/stateless/references/String");
 
-            Assert.assertNotNull("The String looked up is null", actual );
-            Assert.assertEquals(expected, actual );
+                Assert.assertNotNull("The String looked up is null", actual);
+                Assert.assertEquals(expected, actual);
 
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupDoubleEntry() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupDoubleEntry() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            Double expected = new Double(1.0D);
-            Double actual   = (Double)ctx.lookup("java:comp/env/stateless/references/Double");
+                final Double expected = new Double(1.0D);
+                final Double actual = (Double) ctx.lookup("java:comp/env/stateless/references/Double");
 
-            Assert.assertNotNull("The Double looked up is null", actual );
-            Assert.assertEquals(expected, actual );
+                Assert.assertNotNull("The Double looked up is null", actual);
+                Assert.assertEquals(expected, actual);
 
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupLongEntry() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupLongEntry() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            Long expected = new Long(1L);
-            Long actual   = (Long)ctx.lookup("java:comp/env/stateless/references/Long");
+                final Long expected = new Long(1L);
+                final Long actual = (Long) ctx.lookup("java:comp/env/stateless/references/Long");
 
-            Assert.assertNotNull("The Long looked up is null", actual );
-            Assert.assertEquals(expected, actual );
+                Assert.assertNotNull("The Long looked up is null", actual);
+                Assert.assertEquals(expected, actual);
 
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupFloatEntry() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupFloatEntry() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            Float expected = new Float(1.0F);
-            Float actual   = (Float)ctx.lookup("java:comp/env/stateless/references/Float");
+                final Float expected = new Float(1.0F);
+                final Float actual = (Float) ctx.lookup("java:comp/env/stateless/references/Float");
 
-            Assert.assertNotNull("The Float looked up is null", actual );
-            Assert.assertEquals(expected, actual );
+                Assert.assertNotNull("The Float looked up is null", actual);
+                Assert.assertEquals(expected, actual);
 
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupIntegerEntry() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupIntegerEntry() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            Integer expected = new Integer(1);
-            Integer actual   = (Integer)ctx.lookup("java:comp/env/stateless/references/Integer");
+                final Integer expected = new Integer(1);
+                final Integer actual = (Integer) ctx.lookup("java:comp/env/stateless/references/Integer");
 
-            Assert.assertNotNull("The Integer looked up is null", actual );
-            Assert.assertEquals(expected, actual );
+                Assert.assertNotNull("The Integer looked up is null", actual);
+                Assert.assertEquals(expected, actual);
 
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupShortEntry() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupShortEntry() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            Short expected = new Short((short)1);
-            Short actual   = (Short)ctx.lookup("java:comp/env/stateless/references/Short");
+                final Short expected = new Short((short) 1);
+                final Short actual = (Short) ctx.lookup("java:comp/env/stateless/references/Short");
 
-            Assert.assertNotNull("The Short looked up is null", actual );
-            Assert.assertEquals(expected, actual );
+                Assert.assertNotNull("The Short looked up is null", actual);
+                Assert.assertEquals(expected, actual);
 
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupBooleanEntry() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupBooleanEntry() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            Boolean expected = new Boolean(true);
-            Boolean actual = (Boolean)ctx.lookup("java:comp/env/stateless/references/Boolean");
+                final Boolean expected = new Boolean(true);
+                final Boolean actual = (Boolean) ctx.lookup("java:comp/env/stateless/references/Boolean");
 
-            Assert.assertNotNull("The Boolean looked up is null", actual );
-            Assert.assertEquals(expected, actual );
+                Assert.assertNotNull("The Boolean looked up is null", actual);
+                Assert.assertEquals(expected, actual);
 
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupByteEntry() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupByteEntry() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            Byte expected = new Byte((byte)1);
-            Byte actual   = (Byte)ctx.lookup("java:comp/env/stateless/references/Byte");
+                final Byte expected = new Byte((byte) 1);
+                final Byte actual = (Byte) ctx.lookup("java:comp/env/stateless/references/Byte");
 
-            Assert.assertNotNull("The Byte looked up is null", actual );
-            Assert.assertEquals(expected, actual );
+                Assert.assertNotNull("The Byte looked up is null", actual);
+                Assert.assertEquals(expected, actual);
 
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupCharacterEntry() throws TestFailureException{
-        try{
-            try{
-            InitialContext ctx = new InitialContext();
-            Assert.assertNotNull("The InitialContext is null", ctx );
+    public void lookupCharacterEntry() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
+                Assert.assertNotNull("The InitialContext is null", ctx);
 
-            Character expected = new Character('D');
-            Character actual   = (Character)ctx.lookup("java:comp/env/stateless/references/Character");
+                final Character expected = new Character('D');
+                final Character actual = (Character) ctx.lookup("java:comp/env/stateless/references/Character");
 
-            Assert.assertNotNull("The Character looked up is null", actual );
-            Assert.assertEquals(expected, actual );
+                Assert.assertNotNull("The Character looked up is null", actual);
+                Assert.assertEquals(expected, actual);
 
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupResource() throws TestFailureException{
-        try{
-            try{
-                InitialContext ctx = new InitialContext();
+    public void lookupResource() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
                 Assert.assertNotNull("The InitialContext is null", ctx);
-                Object obj = ctx.lookup("java:comp/env/datasource");
+                final Object obj = ctx.lookup("java:comp/env/datasource");
                 Assert.assertNotNull("The DataSource is null", obj);
                 Assert.assertTrue("Not an instance of DataSource", obj instanceof DataSource);
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupJMSConnectionFactory() throws TestFailureException{
-        try{
-            try{
-                InitialContext ctx = new InitialContext();
+    public void lookupJMSConnectionFactory() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
                 Assert.assertNotNull("The InitialContext is null", ctx);
                 Object obj = ctx.lookup("java:comp/env/jms");
                 Assert.assertNotNull("The JMS ConnectionFactory is null", obj);
                 Assert.assertTrue("Not an instance of ConnectionFactory", obj instanceof ConnectionFactory);
-                ConnectionFactory connectionFactory = (ConnectionFactory) obj;
+                final ConnectionFactory connectionFactory = (ConnectionFactory) obj;
                 testJmsConnection(connectionFactory.createConnection());
 
                 obj = ctx.lookup("java:comp/env/TopicCF");
                 Assert.assertNotNull("The JMS TopicConnectionFactory is null", obj);
                 Assert.assertTrue("Not an instance of TopicConnectionFactory", obj instanceof TopicConnectionFactory);
-                TopicConnectionFactory topicConnectionFactory = (TopicConnectionFactory) obj;
+                final TopicConnectionFactory topicConnectionFactory = (TopicConnectionFactory) obj;
                 testJmsConnection(topicConnectionFactory.createConnection());
 
                 obj = ctx.lookup("java:comp/env/QueueCF");
                 Assert.assertNotNull("The JMS QueueConnectionFactory is null", obj);
                 Assert.assertTrue("Not an instance of QueueConnectionFactory", obj instanceof QueueConnectionFactory);
-                QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) obj;
+                final QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) obj;
                 testJmsConnection(queueConnectionFactory.createConnection());
-            } catch (Exception e){
+            } catch (final Exception e) {
                 e.printStackTrace();
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    private void testJmsConnection(javax.jms.Connection connection) throws JMSException {
-        Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
-        Topic topic = session.createTopic("test");
-        MessageProducer producer = session.createProducer(topic);
+    private void testJmsConnection(final javax.jms.Connection connection) throws JMSException {
+        final Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
+        final Topic topic = session.createTopic("test");
+        final MessageProducer producer = session.createProducer(topic);
         producer.send(session.createMessage());
         producer.close();
         session.close();
         connection.close();
     }
 
-    public void lookupPersistenceUnit() throws TestFailureException{
-        try{
-            try{
-                InitialContext ctx = new InitialContext();
+    public void lookupPersistenceUnit() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
                 Assert.assertNotNull("The InitialContext is null", ctx);
-                EntityManagerFactory emf = (EntityManagerFactory)ctx.lookup("java:comp/env/persistence/TestUnit");
-                Assert.assertNotNull("The EntityManagerFactory is null", emf );
+                final EntityManagerFactory emf = (EntityManagerFactory) ctx.lookup("java:comp/env/persistence/TestUnit");
+                Assert.assertNotNull("The EntityManagerFactory is null", emf);
 
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupPersistenceContext() throws TestFailureException{
-        try{
-            try{
-                InitialContext ctx = new InitialContext();
+    public void lookupPersistenceContext() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
                 Assert.assertNotNull("The InitialContext is null", ctx);
-                EntityManager em = (EntityManager)ctx.lookup("java:comp/env/persistence/TestContext");
+                final EntityManager em = (EntityManager) ctx.lookup("java:comp/env/persistence/TestContext");
                 Assert.assertNotNull("The EntityManager is null", em);
 
                 // call a do nothing method to assure entity manager actually exists
                 em.getFlushMode();
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupSessionContext() throws TestFailureException{
-        try{
-            try{
-                InitialContext ctx = new InitialContext();
+    public void lookupSessionContext() throws TestFailureException {
+        try {
+            try {
+                final InitialContext ctx = new InitialContext();
                 Assert.assertNotNull("The InitialContext is null", ctx);
 
                 // lookup in enc
-                SessionContext sctx = (SessionContext)ctx.lookup("java:comp/env/sessioncontext");
-                Assert.assertNotNull("The SessionContext got from java:comp/env/sessioncontext is null", sctx );
+                final SessionContext sctx = (SessionContext) ctx.lookup("java:comp/env/sessioncontext");
+                Assert.assertNotNull("The SessionContext got from java:comp/env/sessioncontext is null", sctx);
 
                 // lookup using global name
-                EJBContext ejbCtx = (EJBContext)ctx.lookup("java:comp/EJBContext");
-                Assert.assertNotNull("The SessionContext got from java:comp/EJBContext is null ", ejbCtx );
+                final EJBContext ejbCtx = (EJBContext) ctx.lookup("java:comp/EJBContext");
+                Assert.assertNotNull("The SessionContext got from java:comp/EJBContext is null ", ejbCtx);
 
                 // verify context was set via legacy set method
-                Assert.assertNotNull("The SessionContext is null from setter method", ejbContext );
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+                Assert.assertNotNull("The SessionContext is null from setter method", ejbContext);
+            } catch (final Exception e) {
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
 
@@ -522,27 +522,29 @@ public class EncStatelessBean implements
     //================================
     // SessionBean interface methods
     //    
+
     /**
      * Set the associated session context. The container calls this method
      * after the instance creation.
      */
-    public void setSessionContext(SessionContext ctx) throws EJBException,RemoteException {
+    public void setSessionContext(final SessionContext ctx) throws EJBException, RemoteException {
         ejbContext = ctx;
     }
+
     /**
-     * 
-     * @exception javax.ejb.CreateException
+     * @throws javax.ejb.CreateException
      */
-    public void ejbCreate() throws javax.ejb.CreateException{
+    public void ejbCreate() throws javax.ejb.CreateException {
         this.name = "nameless automaton";
     }
+
     /**
      * A container invokes this method before it ends the life of the session
      * object. This happens as a result of a client's invoking a remove
      * operation, or when a container decides to terminate the session object
      * after a timeout.
      */
-    public void ejbRemove() throws EJBException,RemoteException {
+    public void ejbRemove() throws EJBException, RemoteException {
     }
 
     /**
@@ -550,22 +552,23 @@ public class EncStatelessBean implements
      * from its "passive" state. The instance should acquire any resource
      * that it has released earlier in the ejbPassivate() method.
      */
-    public void ejbActivate() throws EJBException,RemoteException {
+    public void ejbActivate() throws EJBException, RemoteException {
         // Should never called.
     }
+
     /**
      * The passivate method is called before the instance enters
      * the "passive" state. The instance should release any resources that
      * it can re-acquire later in the ejbActivate() method.
      */
-    public void ejbPassivate() throws EJBException,RemoteException {
+    public void ejbPassivate() throws EJBException, RemoteException {
         // Should never called.
     }
 
     //    
     // SessionBean interface methods
     //================================
-    public String remove(String arg) {
+    public String remove(final String arg) {
         return arg;
     }
 }

Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/EncStatelessHome.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/EncStatelessHome.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/EncStatelessHome.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/EncStatelessHome.java Mon Jul  7 19:07:41 2014
@@ -20,5 +20,5 @@ package org.apache.openejb.test.stateles
 public interface EncStatelessHome extends javax.ejb.EJBHome {
 
     public EncStatelessObject create()
-    throws javax.ejb.CreateException, java.rmi.RemoteException;
+        throws javax.ejb.CreateException, java.rmi.RemoteException;
 }

Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/EncStatelessObject.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/EncStatelessObject.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/EncStatelessObject.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/EncStatelessObject.java Mon Jul  7 19:07:41 2014
@@ -20,32 +20,52 @@ import java.rmi.RemoteException;
 
 import org.apache.openejb.test.TestFailureException;
 
-public interface EncStatelessObject extends javax.ejb.EJBObject{
+public interface EncStatelessObject extends javax.ejb.EJBObject {
+
+    public void lookupEntityBean() throws TestFailureException, RemoteException;
+
+    public void lookupStatefulBean() throws TestFailureException, RemoteException;
 
-    public void lookupEntityBean()    throws TestFailureException, RemoteException;
-    public void lookupStatefulBean()  throws TestFailureException, RemoteException;
     public void lookupStatelessBean() throws TestFailureException, RemoteException;
 
     public void lookupStatelessBusinessLocal() throws TestFailureException, RemoteException;
+
     public void lookupStatelessBusinessLocalBean() throws TestFailureException, RemoteException;
+
     public void lookupStatelessBusinessRemote() throws TestFailureException, RemoteException;
+
     public void lookupStatefulBusinessLocal() throws TestFailureException, RemoteException;
+
     public void lookupStatefulBusinessLocalBean() throws TestFailureException, RemoteException;
+
     public void lookupStatefulBusinessRemote() throws TestFailureException, RemoteException;
- 
+
     public void lookupResource() throws TestFailureException, RemoteException;
+
     public void lookupJMSConnectionFactory() throws TestFailureException, RemoteException;
+
     public void lookupPersistenceUnit() throws TestFailureException, RemoteException;
+
     public void lookupPersistenceContext() throws TestFailureException, RemoteException;
+
     public void lookupSessionContext() throws TestFailureException, RemoteException;
-    public void lookupStringEntry()  throws TestFailureException, RemoteException;
-    public void lookupDoubleEntry()  throws TestFailureException, RemoteException;
-    public void lookupLongEntry()    throws TestFailureException, RemoteException;
-    public void lookupFloatEntry()   throws TestFailureException, RemoteException;
+
+    public void lookupStringEntry() throws TestFailureException, RemoteException;
+
+    public void lookupDoubleEntry() throws TestFailureException, RemoteException;
+
+    public void lookupLongEntry() throws TestFailureException, RemoteException;
+
+    public void lookupFloatEntry() throws TestFailureException, RemoteException;
+
     public void lookupIntegerEntry() throws TestFailureException, RemoteException;
-    public void lookupShortEntry()   throws TestFailureException, RemoteException;
+
+    public void lookupShortEntry() throws TestFailureException, RemoteException;
+
     public void lookupBooleanEntry() throws TestFailureException, RemoteException;
-    public void lookupByteEntry()    throws TestFailureException, RemoteException;
-    public void lookupCharacterEntry()    throws TestFailureException, RemoteException;
+
+    public void lookupByteEntry() throws TestFailureException, RemoteException;
+
+    public void lookupCharacterEntry() throws TestFailureException, RemoteException;
 
 }

Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/FieldInjectionStatelessBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/FieldInjectionStatelessBean.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/FieldInjectionStatelessBean.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/FieldInjectionStatelessBean.java Mon Jul  7 19:07:41 2014
@@ -78,7 +78,7 @@ public class FieldInjectionStatelessBean
     public void lookupEntityBean() throws TestFailureException {
         try {
             Assert.assertNotNull("The EJBObject is null", bmpHome);
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
@@ -86,7 +86,7 @@ public class FieldInjectionStatelessBean
     public void lookupStatefulBean() throws TestFailureException {
         try {
             Assert.assertNotNull("The EJBObject is null", statefulHome);
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
@@ -94,155 +94,155 @@ public class FieldInjectionStatelessBean
     public void lookupStatelessBean() throws TestFailureException {
         try {
             Assert.assertNotNull("The EJBObject is null", statelessHome);
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStatelessBusinessLocal() throws TestFailureException{
-        try{
-            Assert.assertNotNull("The EJB BusinessLocal is null", statelessBusinessLocal );
-        } catch (AssertionFailedError afe){
+    public void lookupStatelessBusinessLocal() throws TestFailureException {
+        try {
+            Assert.assertNotNull("The EJB BusinessLocal is null", statelessBusinessLocal);
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStatelessBusinessRemote() throws TestFailureException{
-        try{
-            Assert.assertNotNull("The EJB BusinessRemote is null", statelessBusinessRemote );
-        } catch (AssertionFailedError afe){
+    public void lookupStatelessBusinessRemote() throws TestFailureException {
+        try {
+            Assert.assertNotNull("The EJB BusinessRemote is null", statelessBusinessRemote);
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStatefulBusinessLocal() throws TestFailureException{
-        try{
-            Assert.assertNotNull("The EJB BusinessLocal is null", statefulBusinessLocal );
-        } catch (AssertionFailedError afe){
+    public void lookupStatefulBusinessLocal() throws TestFailureException {
+        try {
+            Assert.assertNotNull("The EJB BusinessLocal is null", statefulBusinessLocal);
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStatefulBusinessLocalBean() throws TestFailureException{
-        try{
-            Assert.assertNotNull("The EJB BusinessLocalBean is null", statefulBusinessLocalBean );
-        } catch (AssertionFailedError afe){
+    public void lookupStatefulBusinessLocalBean() throws TestFailureException {
+        try {
+            Assert.assertNotNull("The EJB BusinessLocalBean is null", statefulBusinessLocalBean);
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStatelessBusinessLocalBean() throws TestFailureException{
-        try{
-            Assert.assertNotNull("The EJB BusinessLocalBean is null", statelessBusinessLocalBean );
-        } catch (AssertionFailedError afe){
+    public void lookupStatelessBusinessLocalBean() throws TestFailureException {
+        try {
+            Assert.assertNotNull("The EJB BusinessLocalBean is null", statelessBusinessLocalBean);
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupStatefulBusinessRemote() throws TestFailureException{
-        try{
-            Assert.assertNotNull("The EJB BusinessRemote is null", statefulBusinessRemote );
-        } catch (AssertionFailedError afe){
+    public void lookupStatefulBusinessRemote() throws TestFailureException {
+        try {
+            Assert.assertNotNull("The EJB BusinessRemote is null", statefulBusinessRemote);
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
-    
+
     public void lookupStringEntry() throws TestFailureException {
         try {
-            String expected = new String("1");
+            final String expected = new String("1");
             Assert.assertNotNull("The String looked up is null", striing);
             Assert.assertEquals(expected, striing);
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
     public void lookupDoubleEntry() throws TestFailureException {
         try {
-            Double expected = new Double(1.0D);
+            final Double expected = new Double(1.0D);
 
             Assert.assertNotNull("The Double looked up is null", doouble);
             Assert.assertEquals(expected, doouble);
 
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
     public void lookupLongEntry() throws TestFailureException {
         try {
-            Long expected = new Long(1L);
+            final Long expected = new Long(1L);
 
             Assert.assertNotNull("The Long looked up is null", loong);
             Assert.assertEquals(expected, loong);
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
     public void lookupFloatEntry() throws TestFailureException {
         try {
-            Float expected = new Float(1.0F);
+            final Float expected = new Float(1.0F);
 
             Assert.assertNotNull("The Float looked up is null", flooat);
             Assert.assertEquals(expected, flooat);
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
     public void lookupIntegerEntry() throws TestFailureException {
         try {
-            Integer expected = new Integer(1);
+            final Integer expected = new Integer(1);
 
             Assert.assertNotNull("The Integer looked up is null", inteeger);
             Assert.assertEquals(expected, inteeger);
 
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
     public void lookupShortEntry() throws TestFailureException {
         try {
-            Short expected = new Short((short) 1);
+            final Short expected = new Short((short) 1);
 
             Assert.assertNotNull("The Short looked up is null", shoort);
             Assert.assertEquals(expected, shoort);
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
     public void lookupBooleanEntry() throws TestFailureException {
         try {
-            Boolean expected = new Boolean(true);
+            final Boolean expected = new Boolean(true);
 
             Assert.assertNotNull("The Boolean looked up is null", booolean);
             Assert.assertEquals(expected, booolean);
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
     public void lookupByteEntry() throws TestFailureException {
         try {
-            Byte expected = new Byte((byte) 1);
+            final Byte expected = new Byte((byte) 1);
 
             Assert.assertNotNull("The Byte looked up is null", byyte);
             Assert.assertEquals(expected, byyte);
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
     public void lookupCharacterEntry() throws TestFailureException {
         try {
-            Character expected = new Character('D');
+            final Character expected = new Character('D');
 
             Assert.assertNotNull("The Character looked up is null", chaaracter);
             Assert.assertEquals(expected, chaaracter);
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
@@ -250,30 +250,30 @@ public class FieldInjectionStatelessBean
     public void lookupResource() throws TestFailureException {
         try {
             Assert.assertNotNull("The DataSource is null", daataSource);
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    public void lookupJMSConnectionFactory() throws TestFailureException{
-        try{
-            try{
+    public void lookupJMSConnectionFactory() throws TestFailureException {
+        try {
+            try {
                 testJmsConnection(coonnectionFactory.createConnection());
                 testJmsConnection(queueCoonnectionFactory.createConnection());
                 testJmsConnection(topicCoonnectionFactory.createConnection());
-            } catch (Exception e){
+            } catch (final Exception e) {
                 e.printStackTrace();
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+                Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe){
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
 
-    private void testJmsConnection(javax.jms.Connection connection) throws JMSException {
-        Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
-        Topic topic = session.createTopic("test");
-        MessageProducer producer = session.createProducer(topic);
+    private void testJmsConnection(final javax.jms.Connection connection) throws JMSException {
+        final Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
+        final Topic topic = session.createTopic("test");
+        final MessageProducer producer = session.createProducer(topic);
         producer.send(session.createMessage());
         producer.close();
         session.close();
@@ -283,7 +283,7 @@ public class FieldInjectionStatelessBean
     public void lookupPersistenceUnit() throws TestFailureException {
         try {
             Assert.assertNotNull("The EntityManagerFactory is null", emf);
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
@@ -295,10 +295,10 @@ public class FieldInjectionStatelessBean
             try {
                 // call a do nothing method to assure entity manager actually exists
                 em.getFlushMode();
-            } catch (Exception e) {
+            } catch (final Exception e) {
                 Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
             }
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
     }
@@ -307,7 +307,7 @@ public class FieldInjectionStatelessBean
         try {
 // TODO: DMB: Can't seem to find where to make this work
 //            Assert.assertNotNull("The SessionContext is null", ejbContext);
-        } catch (AssertionFailedError afe) {
+        } catch (final AssertionFailedError afe) {
             throw new TestFailureException(afe);
         }
 
@@ -322,10 +322,10 @@ public class FieldInjectionStatelessBean
     public void ejbRemove() throws EJBException, RemoteException {
     }
 
-    public void setSessionContext(SessionContext sessionContext) throws EJBException, RemoteException {
+    public void setSessionContext(final SessionContext sessionContext) throws EJBException, RemoteException {
     }
-    
-    public String remove(String arg) {
+
+    public String remove(final String arg) {
         return arg;
     }
 }

Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/RmiIiopStatelessBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/RmiIiopStatelessBean.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/RmiIiopStatelessBean.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/RmiIiopStatelessBean.java Mon Jul  7 19:07:41 2014
@@ -29,19 +29,19 @@ import javax.naming.InitialContext;
 import org.apache.openejb.test.object.ObjectGraph;
 import org.apache.openejb.test.object.Color;
 
-public class RmiIiopStatelessBean implements javax.ejb.SessionBean{
-    
+public class RmiIiopStatelessBean implements javax.ejb.SessionBean {
+
     private String name;
     private SessionContext ejbContext;
-    
-    
+
+
     //=============================
     // Home interface methods
     //    
     //    
     // Home interface methods
     //=============================
-    
+
 
     //=============================
     // Remote interface methods
@@ -49,172 +49,172 @@ public class RmiIiopStatelessBean implem
     /*-------------------------------------------------*/
     /*  String                                         */  
     /*-------------------------------------------------*/
-    
-    public String returnStringObject(String data) {
+
+    public String returnStringObject(final String data) {
         return data;
     }
-    
-    public String[] returnStringObjectArray(String[] data) {
+
+    public String[] returnStringObjectArray(final String[] data) {
         return data;
     }
     
     /*-------------------------------------------------*/
     /*  Character                                      */  
     /*-------------------------------------------------*/
-    
-    public Character returnCharacterObject(Character data) {
+
+    public Character returnCharacterObject(final Character data) {
         return data;
     }
-    
-    public char returnCharacterPrimitive(char data) {
+
+    public char returnCharacterPrimitive(final char data) {
         return data;
     }
-    
-    public Character[] returnCharacterObjectArray(Character[] data) {
+
+    public Character[] returnCharacterObjectArray(final Character[] data) {
         return data;
     }
-    
-    public char[] returnCharacterPrimitiveArray(char[] data) {
+
+    public char[] returnCharacterPrimitiveArray(final char[] data) {
         return data;
     }
 
     /*-------------------------------------------------*/
     /*  Boolean                                        */  
     /*-------------------------------------------------*/
-    
-    public Boolean returnBooleanObject(Boolean data) {
+
+    public Boolean returnBooleanObject(final Boolean data) {
         return data;
     }
-    
-    public boolean returnBooleanPrimitive(boolean data) {
+
+    public boolean returnBooleanPrimitive(final boolean data) {
         return data;
     }
-    
-    public Boolean[] returnBooleanObjectArray(Boolean[] data) {
+
+    public Boolean[] returnBooleanObjectArray(final Boolean[] data) {
         return data;
     }
-    
-    public boolean[] returnBooleanPrimitiveArray(boolean[] data) {
+
+    public boolean[] returnBooleanPrimitiveArray(final boolean[] data) {
         return data;
     }
     
     /*-------------------------------------------------*/
     /*  Byte                                           */  
     /*-------------------------------------------------*/
-    
-    public Byte returnByteObject(Byte data) {
+
+    public Byte returnByteObject(final Byte data) {
         return data;
     }
-    
-    public byte returnBytePrimitive(byte data) {
+
+    public byte returnBytePrimitive(final byte data) {
         return data;
     }
-    
-    public Byte[] returnByteObjectArray(Byte[] data) {
+
+    public Byte[] returnByteObjectArray(final Byte[] data) {
         return data;
     }
-    
-    public byte[] returnBytePrimitiveArray(byte[] data) {
+
+    public byte[] returnBytePrimitiveArray(final byte[] data) {
         return data;
     }
     
     /*-------------------------------------------------*/
     /*  Short                                          */  
     /*-------------------------------------------------*/
-    
-    public Short returnShortObject(Short data) {
+
+    public Short returnShortObject(final Short data) {
         return data;
     }
-    
-    public short returnShortPrimitive(short data) {
+
+    public short returnShortPrimitive(final short data) {
         return data;
     }
-    
-    public Short[] returnShortObjectArray(Short[] data) {
+
+    public Short[] returnShortObjectArray(final Short[] data) {
         return data;
     }
-    
-    public short[] returnShortPrimitiveArray(short[] data) {
+
+    public short[] returnShortPrimitiveArray(final short[] data) {
         return data;
     }
     
     /*-------------------------------------------------*/
     /*  Integer                                        */  
     /*-------------------------------------------------*/
-    
-    public Integer returnIntegerObject(Integer data) {
+
+    public Integer returnIntegerObject(final Integer data) {
         return data;
     }
-    
-    public int returnIntegerPrimitive(int data) {
+
+    public int returnIntegerPrimitive(final int data) {
         return data;
     }
-    
-    public Integer[] returnIntegerObjectArray(Integer[] data) {
+
+    public Integer[] returnIntegerObjectArray(final Integer[] data) {
         return data;
     }
-    
-    public int[] returnIntegerPrimitiveArray(int[] data) {
+
+    public int[] returnIntegerPrimitiveArray(final int[] data) {
         return data;
     }
     
     /*-------------------------------------------------*/
     /*  Long                                           */  
     /*-------------------------------------------------*/
-    
-    public Long returnLongObject(Long data) {
+
+    public Long returnLongObject(final Long data) {
         return data;
     }
-    
-    public long returnLongPrimitive(long data) {
+
+    public long returnLongPrimitive(final long data) {
         return data;
     }
-    
-    public Long[] returnLongObjectArray(Long[] data) {
+
+    public Long[] returnLongObjectArray(final Long[] data) {
         return data;
     }
-    
-    public long[] returnLongPrimitiveArray(long[] data) {
+
+    public long[] returnLongPrimitiveArray(final long[] data) {
         return data;
     }
     
     /*-------------------------------------------------*/
     /*  Float                                          */  
     /*-------------------------------------------------*/
-    
-    public Float returnFloatObject(Float data) {
+
+    public Float returnFloatObject(final Float data) {
         return data;
     }
-    
-    public float returnFloatPrimitive(float data) {
+
+    public float returnFloatPrimitive(final float data) {
         return data;
     }
-    
-    public Float[] returnFloatObjectArray(Float[] data) {
+
+    public Float[] returnFloatObjectArray(final Float[] data) {
         return data;
     }
-    
-    public float[] returnFloatPrimitiveArray(float[] data) {
+
+    public float[] returnFloatPrimitiveArray(final float[] data) {
         return data;
     }
     
     /*-------------------------------------------------*/
     /*  Double                                         */  
     /*-------------------------------------------------*/
-    
-    public Double returnDoubleObject(Double data) {
+
+    public Double returnDoubleObject(final Double data) {
         return data;
     }
-    
-    public double returnDoublePrimitive(double data) {
+
+    public double returnDoublePrimitive(final double data) {
         return data;
     }
-    
-    public Double[] returnDoubleObjectArray(Double[] data) {
+
+    public Double[] returnDoubleObjectArray(final Double[] data) {
         return data;
     }
-    
-    public double[] returnDoublePrimitiveArray(double[] data) {
+
+    public double[] returnDoublePrimitiveArray(final double[] data) {
         return data;
     }
     
@@ -222,172 +222,172 @@ public class RmiIiopStatelessBean implem
     /*-------------------------------------------------*/
     /*  EJBHome                                         */  
     /*-------------------------------------------------*/
-    
-    public EJBHome returnEJBHome(EJBHome data) {
+
+    public EJBHome returnEJBHome(final EJBHome data) {
         return data;
     }
-    
-    public EJBHome returnEJBHome() throws javax.ejb.EJBException{
+
+    public EJBHome returnEJBHome() throws javax.ejb.EJBException {
         EJBHome data = null;
 
-        try{
-        InitialContext ctx = new InitialContext();
+        try {
+            final InitialContext ctx = new InitialContext();
 
-        data = (EJBHome)ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
+            data = (EJBHome) ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
 
-        } catch (Exception e){
+        } catch (final Exception e) {
             e.printStackTrace();
             throw new javax.ejb.EJBException(e);
         }
         return data;
     }
 
-    public ObjectGraph returnNestedEJBHome() throws javax.ejb.EJBException{
-        ObjectGraph data = null; 
+    public ObjectGraph returnNestedEJBHome() throws javax.ejb.EJBException {
+        ObjectGraph data = null;
 
-        try{
-        InitialContext ctx = new InitialContext();
+        try {
+            final InitialContext ctx = new InitialContext();
 
-        Object object = ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
-        data = new ObjectGraph(object);
+            final Object object = ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
+            data = new ObjectGraph(object);
 
-        } catch (Exception e){
+        } catch (final Exception e) {
             throw new javax.ejb.EJBException(e);
         }
         return data;
     }
 
-    public EJBHome[] returnEJBHomeArray(EJBHome[] data) {
+    public EJBHome[] returnEJBHomeArray(final EJBHome[] data) {
         return data;
     }
     
     /*-------------------------------------------------*/
     /*  EJBObject                                      */  
     /*-------------------------------------------------*/
-    
-    public EJBObject returnEJBObject(EJBObject data) {
+
+    public EJBObject returnEJBObject(final EJBObject data) {
         return data;
     }
-    
-    public EJBObject returnEJBObject() throws javax.ejb.EJBException{
+
+    public EJBObject returnEJBObject() throws javax.ejb.EJBException {
         EncStatelessObject data = null;
 
-        try{
-        InitialContext ctx = new InitialContext();
+        try {
+            final InitialContext ctx = new InitialContext();
 
-        EncStatelessHome home = (EncStatelessHome)ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
-        data = home.create();
+            final EncStatelessHome home = (EncStatelessHome) ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
+            data = home.create();
 
-        } catch (Exception e){
+        } catch (final Exception e) {
             throw new javax.ejb.EJBException(e);
         }
         return data;
     }
-    
-    public ObjectGraph returnNestedEJBObject() throws javax.ejb.EJBException{
+
+    public ObjectGraph returnNestedEJBObject() throws javax.ejb.EJBException {
         ObjectGraph data = null;
 
-        try{
-        InitialContext ctx = new InitialContext();
+        try {
+            final InitialContext ctx = new InitialContext();
 
-        EncStatelessHome home = (EncStatelessHome)ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
-        EncStatelessObject object = home.create();
-        data = new ObjectGraph(object);
+            final EncStatelessHome home = (EncStatelessHome) ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
+            final EncStatelessObject object = home.create();
+            data = new ObjectGraph(object);
 
-        } catch (Exception e){
+        } catch (final Exception e) {
             throw new javax.ejb.EJBException(e);
         }
         return data;
     }
-    
-    public EJBObject[] returnEJBObjectArray(EJBObject[] data) {
+
+    public EJBObject[] returnEJBObjectArray(final EJBObject[] data) {
         return data;
     }
     
     /*-------------------------------------------------*/
     /*  EJBMetaData                                         */  
     /*-------------------------------------------------*/
-    
-    public EJBMetaData returnEJBMetaData(EJBMetaData data) {
+
+    public EJBMetaData returnEJBMetaData(final EJBMetaData data) {
         return data;
     }
-    
-    public EJBMetaData returnEJBMetaData() throws javax.ejb.EJBException{
+
+    public EJBMetaData returnEJBMetaData() throws javax.ejb.EJBException {
         EJBMetaData data = null;
 
-        try{
-        InitialContext ctx = new InitialContext();
+        try {
+            final InitialContext ctx = new InitialContext();
 
-        EncStatelessHome home = (EncStatelessHome)ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
-        data = home.getEJBMetaData();
+            final EncStatelessHome home = (EncStatelessHome) ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
+            data = home.getEJBMetaData();
 
-        } catch (Exception e){
+        } catch (final Exception e) {
             throw new javax.ejb.EJBException(e);
         }
         return data;
     }
-    
-    public ObjectGraph returnNestedEJBMetaData() throws javax.ejb.EJBException{
+
+    public ObjectGraph returnNestedEJBMetaData() throws javax.ejb.EJBException {
         ObjectGraph data = null;
 
-        try{
-        InitialContext ctx = new InitialContext();
+        try {
+            final InitialContext ctx = new InitialContext();
 
-        EncStatelessHome home = (EncStatelessHome)ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
-        EJBMetaData object = home.getEJBMetaData();
-        data = new ObjectGraph(object);
+            final EncStatelessHome home = (EncStatelessHome) ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
+            final EJBMetaData object = home.getEJBMetaData();
+            data = new ObjectGraph(object);
 
-        } catch (Exception e){
+        } catch (final Exception e) {
             throw new javax.ejb.EJBException(e);
         }
         return data;
     }
-    
-    public EJBMetaData[] returnEJBMetaDataArray(EJBMetaData[] data) {
+
+    public EJBMetaData[] returnEJBMetaDataArray(final EJBMetaData[] data) {
         return data;
     }
     
     /*-------------------------------------------------*/
     /*  Handle                                         */  
     /*-------------------------------------------------*/
-    
-    public Handle returnHandle(Handle data) {
+
+    public Handle returnHandle(final Handle data) {
         return data;
     }
-    
-    public Handle returnHandle() throws javax.ejb.EJBException{
+
+    public Handle returnHandle() throws javax.ejb.EJBException {
         Handle data = null;
 
-        try{
-        InitialContext ctx = new InitialContext();
+        try {
+            final InitialContext ctx = new InitialContext();
 
-        EncStatelessHome home = (EncStatelessHome)ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
-        EncStatelessObject object = home.create();
-        data = object.getHandle();
+            final EncStatelessHome home = (EncStatelessHome) ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
+            final EncStatelessObject object = home.create();
+            data = object.getHandle();
 
-        } catch (Exception e){
+        } catch (final Exception e) {
             throw new javax.ejb.EJBException(e);
         }
         return data;
     }
-    
-    public ObjectGraph returnNestedHandle() throws javax.ejb.EJBException{
+
+    public ObjectGraph returnNestedHandle() throws javax.ejb.EJBException {
         ObjectGraph data = null;
 
-        try{
-        InitialContext ctx = new InitialContext();
+        try {
+            final InitialContext ctx = new InitialContext();
 
-        EncStatelessHome home = (EncStatelessHome)ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
-        EncStatelessObject object = home.create();
-        data = new ObjectGraph(object.getHandle());
+            final EncStatelessHome home = (EncStatelessHome) ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
+            final EncStatelessObject object = home.create();
+            data = new ObjectGraph(object.getHandle());
 
-        } catch (Exception e){
+        } catch (final Exception e) {
             throw new javax.ejb.EJBException(e);
         }
         return data;
     }
-    
-    public Handle[] returnHandleArray(Handle[] data) {
+
+    public Handle[] returnHandleArray(final Handle[] data) {
         return data;
     }
     
@@ -396,11 +396,11 @@ public class RmiIiopStatelessBean implem
     /*  Class                                         */
     /*-------------------------------------------------*/
 
-    public Class returnClass(Class data) {
+    public Class returnClass(final Class data) {
         return data;
     }
 
-    public Class[] returnClassArray(Class[] data) {
+    public Class[] returnClassArray(final Class[] data) {
         return data;
     }
 
@@ -409,7 +409,7 @@ public class RmiIiopStatelessBean implem
     /*  Enum                                           */
     /*-------------------------------------------------*/
 
-    public Color returnColor(Color data) {
+    public Color returnColor(final Color data) {
         return data;
     }
 
@@ -421,7 +421,7 @@ public class RmiIiopStatelessBean implem
         return new ObjectGraph(Color.GREEN);
     }
 
-    public Color[] returnColorArray(Color[] data) {
+    public Color[] returnColorArray(final Color[] data) {
         return data;
     }
 
@@ -429,16 +429,16 @@ public class RmiIiopStatelessBean implem
     /*-------------------------------------------------*/
     /*  ObjectGraph                                         */  
     /*-------------------------------------------------*/
-    
-    public ObjectGraph returnObjectGraph(ObjectGraph data) {
+
+    public ObjectGraph returnObjectGraph(final ObjectGraph data) {
         return data;
     }
-    
-    public ObjectGraph[] returnObjectGraphArray(ObjectGraph[] data) {
+
+    public ObjectGraph[] returnObjectGraphArray(final ObjectGraph[] data) {
         return data;
     }
-    
-    public String remove(String arg) {
+
+    public String remove(final String arg) {
         return arg;
     }
 
@@ -450,27 +450,29 @@ public class RmiIiopStatelessBean implem
     //================================
     // SessionBean interface methods
     //    
+
     /**
      * Set the associated session context. The container calls this method
      * after the instance creation.
      */
-    public void setSessionContext(SessionContext ctx) throws EJBException,RemoteException {
+    public void setSessionContext(final SessionContext ctx) throws EJBException, RemoteException {
         ejbContext = ctx;
     }
+
     /**
-     * 
-     * @exception javax.ejb.CreateException
+     * @throws javax.ejb.CreateException
      */
-    public void ejbCreate() throws javax.ejb.CreateException{
+    public void ejbCreate() throws javax.ejb.CreateException {
         this.name = "nameless automaton";
     }
+
     /**
      * A container invokes this method before it ends the life of the session
      * object. This happens as a result of a client's invoking a remove
      * operation, or when a container decides to terminate the session object
      * after a timeout.
      */
-    public void ejbRemove() throws EJBException,RemoteException {
+    public void ejbRemove() throws EJBException, RemoteException {
     }
 
     /**
@@ -478,15 +480,16 @@ public class RmiIiopStatelessBean implem
      * from its "passive" state. The instance should acquire any resource
      * that it has released earlier in the ejbPassivate() method.
      */
-    public void ejbActivate() throws EJBException,RemoteException {
+    public void ejbActivate() throws EJBException, RemoteException {
         // Should never called.
     }
+
     /**
      * The passivate method is called before the instance enters
      * the "passive" state. The instance should release any resources that
      * it can re-acquire later in the ejbActivate() method.
      */
-    public void ejbPassivate() throws EJBException,RemoteException {
+    public void ejbPassivate() throws EJBException, RemoteException {
         // Should never called.
     }
 

Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/RmiIiopStatelessHome.java
URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/RmiIiopStatelessHome.java?rev=1608563&r1=1608562&r2=1608563&view=diff
==============================================================================
--- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/RmiIiopStatelessHome.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/RmiIiopStatelessHome.java Mon Jul  7 19:07:41 2014
@@ -20,5 +20,5 @@ package org.apache.openejb.test.stateles
 public interface RmiIiopStatelessHome extends javax.ejb.EJBHome {
 
     public RmiIiopStatelessObject create()
-    throws javax.ejb.CreateException, java.rmi.RemoteException;
+        throws javax.ejb.CreateException, java.rmi.RemoteException;
 }