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 [6/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/cont...

Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/EncCmp2Bean.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/entity/cmp/EncCmp2Bean.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/entity/cmp/EncCmp2Bean.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/EncCmp2Bean.java Mon Jul  7 19:07:41 2014
@@ -68,15 +68,15 @@ public abstract class EncCmp2Bean implem
     /**
      * Maps to EncCmpHome.create
      */
-    public Integer ejbCreate(String name) throws CreateException {
+    public Integer ejbCreate(final String name) throws CreateException {
         setId(nextId++);
-        StringTokenizer st = new StringTokenizer(name, " ");
+        final StringTokenizer st = new StringTokenizer(name, " ");
         setFirstName(st.nextToken());
         setLastName(st.nextToken());
         return null;
     }
 
-    public void ejbPostCreate(String name) {
+    public void ejbPostCreate(final String name) {
     }
 
 
@@ -93,18 +93,18 @@ public abstract class EncCmp2Bean implem
     public void lookupEntityBean() throws TestFailureException {
         try {
             try {
-                InitialContext ctx = new InitialContext();
+                final InitialContext ctx = new InitialContext();
                 Assert.assertNotNull("The InitialContext is null", ctx);
 
-                BasicCmpHome home = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/entity/cmp/beanReferences/cmp_entity"), BasicCmpHome.class);
+                final BasicCmpHome home = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/entity/cmp/beanReferences/cmp_entity"), BasicCmpHome.class);
                 Assert.assertNotNull("The EJBHome looked up is null", home);
 
-                BasicCmpObject object = home.createObject("Enc Bean");
+                final BasicCmpObject object = home.createObject("Enc Bean");
                 Assert.assertNotNull("The EJBObject is null", object);
-            } 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);
         }
     }
@@ -112,18 +112,18 @@ public abstract class EncCmp2Bean implem
     public void lookupStatefulBean() throws TestFailureException {
         try {
             try {
-                InitialContext ctx = new InitialContext();
+                final InitialContext ctx = new InitialContext();
                 Assert.assertNotNull("The InitialContext is null", ctx);
 
-                BasicStatefulHome home = (BasicStatefulHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/entity/cmp/beanReferences/stateful"), BasicStatefulHome.class);
+                final BasicStatefulHome home = (BasicStatefulHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/entity/cmp/beanReferences/stateful"), BasicStatefulHome.class);
                 Assert.assertNotNull("The EJBHome looked up is null", home);
 
-                BasicStatefulObject object = home.createObject("Enc Bean");
+                final BasicStatefulObject object = home.createObject("Enc Bean");
                 Assert.assertNotNull("The EJBObject is null", object);
-            } 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);
         }
     }
@@ -131,84 +131,84 @@ public abstract class EncCmp2Bean implem
     public void lookupStatelessBean() throws TestFailureException {
         try {
             try {
-                InitialContext ctx = new InitialContext();
+                final InitialContext ctx = new InitialContext();
                 Assert.assertNotNull("The InitialContext is null", ctx);
 
-                BasicStatelessHome home = (BasicStatelessHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/entity/cmp/beanReferences/stateless"), BasicStatelessHome.class);
+                final BasicStatelessHome home = (BasicStatelessHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/entity/cmp/beanReferences/stateless"), BasicStatelessHome.class);
                 Assert.assertNotNull("The EJBHome looked up is null", home);
 
-                BasicStatelessObject object = home.createObject();
+                final BasicStatelessObject object = home.createObject();
                 Assert.assertNotNull("The EJBObject is null", object);
-            } 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);
         }
     }
 
-    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/entity/cmp/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/entity/cmp/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 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/entity/cmp/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/entity/cmp/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/entity/cmp/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/entity/cmp/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 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/entity/cmp/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/entity/cmp/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);
         }
     }
@@ -216,19 +216,19 @@ public abstract class EncCmp2Bean implem
     public void lookupStringEntry() throws TestFailureException {
         try {
             try {
-                InitialContext ctx = new InitialContext();
+                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/entity/cmp/references/String");
+                final String expected = new String("1");
+                final String actual = (String) ctx.lookup("java:comp/env/entity/cmp/references/String");
 
                 Assert.assertNotNull("The String looked up is null", actual);
                 Assert.assertEquals(expected, actual);
 
-            } 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);
         }
     }
@@ -236,19 +236,19 @@ public abstract class EncCmp2Bean implem
     public void lookupDoubleEntry() throws TestFailureException {
         try {
             try {
-                InitialContext ctx = new InitialContext();
+                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/entity/cmp/references/Double");
+                final Double expected = new Double(1.0D);
+                final Double actual = (Double) ctx.lookup("java:comp/env/entity/cmp/references/Double");
 
                 Assert.assertNotNull("The Double looked up is null", actual);
                 Assert.assertEquals(expected, actual);
 
-            } 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);
         }
     }
@@ -256,19 +256,19 @@ public abstract class EncCmp2Bean implem
     public void lookupLongEntry() throws TestFailureException {
         try {
             try {
-                InitialContext ctx = new InitialContext();
+                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/entity/cmp/references/Long");
+                final Long expected = new Long(1L);
+                final Long actual = (Long) ctx.lookup("java:comp/env/entity/cmp/references/Long");
 
                 Assert.assertNotNull("The Long looked up is null", actual);
                 Assert.assertEquals(expected, actual);
 
-            } 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);
         }
     }
@@ -276,19 +276,19 @@ public abstract class EncCmp2Bean implem
     public void lookupFloatEntry() throws TestFailureException {
         try {
             try {
-                InitialContext ctx = new InitialContext();
+                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/entity/cmp/references/Float");
+                final Float expected = new Float(1.0F);
+                final Float actual = (Float) ctx.lookup("java:comp/env/entity/cmp/references/Float");
 
                 Assert.assertNotNull("The Float looked up is null", actual);
                 Assert.assertEquals(expected, actual);
 
-            } 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);
         }
     }
@@ -296,19 +296,19 @@ public abstract class EncCmp2Bean implem
     public void lookupIntegerEntry() throws TestFailureException {
         try {
             try {
-                InitialContext ctx = new InitialContext();
+                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/entity/cmp/references/Integer");
+                final Integer expected = new Integer(1);
+                final Integer actual = (Integer) ctx.lookup("java:comp/env/entity/cmp/references/Integer");
 
                 Assert.assertNotNull("The Integer looked up is null", actual);
                 Assert.assertEquals(expected, actual);
 
-            } 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);
         }
     }
@@ -316,19 +316,19 @@ public abstract class EncCmp2Bean implem
     public void lookupShortEntry() throws TestFailureException {
         try {
             try {
-                InitialContext ctx = new InitialContext();
+                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/entity/cmp/references/Short");
+                final Short expected = new Short((short) 1);
+                final Short actual = (Short) ctx.lookup("java:comp/env/entity/cmp/references/Short");
 
                 Assert.assertNotNull("The Short looked up is null", actual);
                 Assert.assertEquals(expected, actual);
 
-            } 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);
         }
     }
@@ -336,19 +336,19 @@ public abstract class EncCmp2Bean implem
     public void lookupBooleanEntry() throws TestFailureException {
         try {
             try {
-                InitialContext ctx = new InitialContext();
+                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/entity/cmp/references/Boolean");
+                final Boolean expected = new Boolean(true);
+                final Boolean actual = (Boolean) ctx.lookup("java:comp/env/entity/cmp/references/Boolean");
 
                 Assert.assertNotNull("The Boolean looked up is null", actual);
                 Assert.assertEquals(expected, actual);
 
-            } 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);
         }
     }
@@ -356,39 +356,39 @@ public abstract class EncCmp2Bean implem
     public void lookupByteEntry() throws TestFailureException {
         try {
             try {
-                InitialContext ctx = new InitialContext();
+                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/entity/cmp/references/Byte");
+                final Byte expected = new Byte((byte) 1);
+                final Byte actual = (Byte) ctx.lookup("java:comp/env/entity/cmp/references/Byte");
 
                 Assert.assertNotNull("The Byte looked up is null", actual);
                 Assert.assertEquals(expected, actual);
 
-            } 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);
         }
     }
 
-    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/entity/cmp/references/Character");
+                final Character expected = new Character('D');
+                final Character actual = (Character) ctx.lookup("java:comp/env/entity/cmp/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);
         }
     }
@@ -396,87 +396,87 @@ public abstract class EncCmp2Bean implem
     public void lookupResource() throws TestFailureException {
         try {
             try {
-                InitialContext ctx = new InitialContext();
+                final InitialContext ctx = new InitialContext();
                 Assert.assertNotNull("The InitialContext is null", ctx);
-            } 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);
         }
     }
 
-    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(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 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);
         }
     }
@@ -502,7 +502,7 @@ public abstract class EncCmp2Bean implem
      * Set the associated entity context. The container invokes this method
      * on an instance after the instance has been created.
      */
-    public void setEntityContext(EntityContext ctx) {
+    public void setEntityContext(final EntityContext ctx) {
         ejbContext = ctx;
     }
 

Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/EncCmpBean.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/entity/cmp/EncCmpBean.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/entity/cmp/EncCmpBean.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/EncCmpBean.java Mon Jul  7 19:07:41 2014
@@ -48,7 +48,7 @@ import org.apache.openejb.test.stateless
 import org.apache.openejb.test.stateless.BasicStatelessBusinessLocal;
 import org.apache.openejb.test.stateless.BasicStatelessBusinessRemote;
 
-public class EncCmpBean implements javax.ejb.EntityBean{
+public class EncCmpBean implements javax.ejb.EntityBean {
     private static int nextId;
     public int primaryKey;
     public String firstName;
@@ -61,23 +61,23 @@ public class EncCmpBean implements javax
 
     /**
      * Maps to EncCmpHome.create
-     * 
+     *
      * @param name
      * @return
-     * @exception javax.ejb.CreateException
+     * @throws javax.ejb.CreateException
      * @see EncCmpHome#create
      */
-    public Integer ejbCreate(String name)
-    throws javax.ejb.CreateException{
+    public Integer ejbCreate(final String name)
+        throws javax.ejb.CreateException {
         primaryKey = nextId++;
-        StringTokenizer st = new StringTokenizer(name, " ");
+        final StringTokenizer st = new StringTokenizer(name, " ");
         firstName = st.nextToken();
         lastName = st.nextToken();
         return null;
     }
 
-    public void ejbPostCreate(String name)
-    throws javax.ejb.CreateException{
+    public void ejbPostCreate(final String name)
+        throws javax.ejb.CreateException {
     }
 
 
@@ -91,396 +91,396 @@ public class EncCmpBean implements javax
     //    
 
 
-    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);
 
-            BasicCmpHome home = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow( ctx.lookup("java:comp/env/entity/cmp/beanReferences/cmp_entity"), BasicCmpHome.class );
-            Assert.assertNotNull("The EJBHome looked up is null",home);
+                final BasicCmpHome home = (BasicCmpHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/entity/cmp/beanReferences/cmp_entity"), BasicCmpHome.class);
+                Assert.assertNotNull("The EJBHome looked up is null", home);
 
-            BasicCmpObject object = home.createObject("Enc Bean");
-            Assert.assertNotNull("The EJBObject is null", object );
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+                final BasicCmpObject 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/entity/cmp/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/entity/cmp/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/entity/cmp/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/entity/cmp/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/entity/cmp/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/entity/cmp/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 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/entity/cmp/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/entity/cmp/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/entity/cmp/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/entity/cmp/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 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/entity/cmp/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/entity/cmp/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/entity/cmp/references/String");
+                final String expected = new String("1");
+                final String actual = (String) ctx.lookup("java:comp/env/entity/cmp/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/entity/cmp/references/Double");
+                final Double expected = new Double(1.0D);
+                final Double actual = (Double) ctx.lookup("java:comp/env/entity/cmp/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/entity/cmp/references/Long");
+                final Long expected = new Long(1L);
+                final Long actual = (Long) ctx.lookup("java:comp/env/entity/cmp/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/entity/cmp/references/Float");
+                final Float expected = new Float(1.0F);
+                final Float actual = (Float) ctx.lookup("java:comp/env/entity/cmp/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/entity/cmp/references/Integer");
+                final Integer expected = new Integer(1);
+                final Integer actual = (Integer) ctx.lookup("java:comp/env/entity/cmp/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/entity/cmp/references/Short");
+                final Short expected = new Short((short) 1);
+                final Short actual = (Short) ctx.lookup("java:comp/env/entity/cmp/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/entity/cmp/references/Boolean");
+                final Boolean expected = new Boolean(true);
+                final Boolean actual = (Boolean) ctx.lookup("java:comp/env/entity/cmp/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/entity/cmp/references/Byte");
+                final Byte expected = new Byte((byte) 1);
+                final Byte actual = (Byte) ctx.lookup("java:comp/env/entity/cmp/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/entity/cmp/references/Character");
+                final Character expected = new Character('D');
+                final Character actual = (Character) ctx.lookup("java:comp/env/entity/cmp/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(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 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);
         }
     }
@@ -499,14 +499,14 @@ public class EncCmpBean implements javax
      * instance to synchronize its state by loading it state from the
      * underlying database.
      */
-    public void ejbLoad() throws EJBException,RemoteException {
+    public void ejbLoad() throws EJBException, RemoteException {
     }
 
     /**
      * Set the associated entity context. The container invokes this method
      * on an instance after the instance has been created.
      */
-    public void setEntityContext(EntityContext ctx) throws EJBException,RemoteException {
+    public void setEntityContext(final EntityContext ctx) throws EJBException, RemoteException {
         ejbContext = ctx;
     }
 
@@ -514,7 +514,7 @@ public class EncCmpBean implements javax
      * Unset the associated entity context. The container calls this method
      * before removing the instance.
      */
-    public void unsetEntityContext() throws EJBException,RemoteException {
+    public void unsetEntityContext() throws EJBException, RemoteException {
     }
 
     /**
@@ -522,7 +522,7 @@ public class EncCmpBean implements javax
      * instance to synchronize its state by storing it to the underlying
      * database.
      */
-    public void ejbStore() throws EJBException,RemoteException {
+    public void ejbStore() throws EJBException, RemoteException {
     }
 
     /**
@@ -533,7 +533,7 @@ public class EncCmpBean implements javax
      * This method transitions the instance from the ready state to the pool
      * of available instances.
      */
-    public void ejbRemove() throws RemoveException,EJBException,RemoteException {
+    public void ejbRemove() throws RemoveException, EJBException, RemoteException {
     }
 
     /**
@@ -542,7 +542,7 @@ public class EncCmpBean implements javax
      * with a specific EJB object. This method transitions the instance to
      * the ready state.
      */
-    public void ejbActivate() throws EJBException,RemoteException {
+    public void ejbActivate() throws EJBException, RemoteException {
     }
 
     /**
@@ -551,7 +551,7 @@ public class EncCmpBean implements javax
      * completes, the container will place the instance into the pool of
      * available instances.
      */
-    public void ejbPassivate() throws EJBException,RemoteException {
+    public void ejbPassivate() throws EJBException, RemoteException {
     }
     //    
     // EntityBean interface methods

Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/EncCmpHome.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/entity/cmp/EncCmpHome.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/entity/cmp/EncCmpHome.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/EncCmpHome.java Mon Jul  7 19:07:41 2014
@@ -21,9 +21,9 @@ public interface EncCmpHome extends java
 
 
     public EncCmpObject create(String name)
-    throws javax.ejb.CreateException, java.rmi.RemoteException;
-    
+        throws javax.ejb.CreateException, java.rmi.RemoteException;
+
     public EncCmpObject findByPrimaryKey(Integer primarykey)
-    throws javax.ejb.FinderException, java.rmi.RemoteException;
-    
+        throws javax.ejb.FinderException, java.rmi.RemoteException;
+
 }

Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/EncCmpObject.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/entity/cmp/EncCmpObject.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/entity/cmp/EncCmpObject.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/EncCmpObject.java Mon Jul  7 19:07:41 2014
@@ -20,30 +20,46 @@ import java.rmi.RemoteException;
 
 import org.apache.openejb.test.TestFailureException;
 
-public interface EncCmpObject extends javax.ejb.EJBObject{
-    
-    public void lookupEntityBean()    throws TestFailureException, RemoteException;
-    public void lookupStatefulBean()  throws TestFailureException, RemoteException;
+public interface EncCmpObject extends javax.ejb.EJBObject {
+
+    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 lookupStatelessBusinessRemote() throws TestFailureException, RemoteException;
+
     public void lookupStatefulBusinessLocal() 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 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/entity/cmp/RmiIiopCmp2Bean.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/entity/cmp/RmiIiopCmp2Bean.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/entity/cmp/RmiIiopCmp2Bean.java (original)
+++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/RmiIiopCmp2Bean.java Mon Jul  7 19:07:41 2014
@@ -53,15 +53,15 @@ public abstract class RmiIiopCmp2Bean im
     /**
      * Maps to RmiIiopCmpHome.create
      */
-    public Integer ejbCreate(String name) throws CreateException {
+    public Integer ejbCreate(final String name) throws CreateException {
         setId(nextId++);
-        StringTokenizer st = new StringTokenizer(name, " ");
+        final StringTokenizer st = new StringTokenizer(name, " ");
         setFirstName(st.nextToken());
         setLastName(st.nextToken());
         return null;
     }
 
-    public void ejbPostCreate(String name) {
+    public void ejbPostCreate(final String name) {
     }
 
 
@@ -77,11 +77,11 @@ public abstract class RmiIiopCmp2Bean im
     /*  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;
     }
 
@@ -89,19 +89,19 @@ public abstract class RmiIiopCmp2Bean im
     /*  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;
     }
 
@@ -109,19 +109,19 @@ public abstract class RmiIiopCmp2Bean im
     /*  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;
     }
 
@@ -129,19 +129,19 @@ public abstract class RmiIiopCmp2Bean im
     /*  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;
     }
 
@@ -149,19 +149,19 @@ public abstract class RmiIiopCmp2Bean im
     /*  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;
     }
 
@@ -169,19 +169,19 @@ public abstract class RmiIiopCmp2Bean im
     /*  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;
     }
 
@@ -189,19 +189,19 @@ public abstract class RmiIiopCmp2Bean im
     /*  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;
     }
 
@@ -209,19 +209,19 @@ public abstract class RmiIiopCmp2Bean im
     /*  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;
     }
 
@@ -229,19 +229,19 @@ public abstract class RmiIiopCmp2Bean im
     /*  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;
     }
 
@@ -250,7 +250,7 @@ public abstract class RmiIiopCmp2Bean im
     /*  EJBHome                                         */
     /*-------------------------------------------------*/
 
-    public EJBHome returnEJBHome(EJBHome data) {
+    public EJBHome returnEJBHome(final EJBHome data) {
         return data;
     }
 
@@ -258,11 +258,11 @@ public abstract class RmiIiopCmp2Bean im
         EJBHome data = null;
 
         try {
-            InitialContext ctx = new InitialContext();
+            final InitialContext ctx = new InitialContext();
 
             data = (EJBHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
 
-        } catch (Exception e) {
+        } catch (final Exception e) {
             e.printStackTrace();
             throw new EJBException(e);
         }
@@ -273,18 +273,18 @@ public abstract class RmiIiopCmp2Bean im
         ObjectGraph data = null;
 
         try {
-            InitialContext ctx = new InitialContext();
+            final InitialContext ctx = new InitialContext();
 
-            Object object = ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
+            final Object object = ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
             data = new ObjectGraph(object);
 
-        } catch (Exception e) {
+        } catch (final Exception e) {
             throw new EJBException(e);
         }
         return data;
     }
 
-    public EJBHome[] returnEJBHomeArray(EJBHome[] data) {
+    public EJBHome[] returnEJBHomeArray(final EJBHome[] data) {
         return data;
     }
 
@@ -292,7 +292,7 @@ public abstract class RmiIiopCmp2Bean im
     /*  EJBObject                                      */
     /*-------------------------------------------------*/
 
-    public EJBObject returnEJBObject(EJBObject data) {
+    public EJBObject returnEJBObject(final EJBObject data) {
         return data;
     }
 
@@ -300,12 +300,12 @@ public abstract class RmiIiopCmp2Bean im
         EncCmpObject data = null;
 
         try {
-            InitialContext ctx = new InitialContext();
+            final InitialContext ctx = new InitialContext();
 
-            EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
+            final EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
             data = home.create("Test01 CmpBean");
 
-        } catch (Exception e) {
+        } catch (final Exception e) {
             throw new EJBException(e);
         }
         return data;
@@ -315,19 +315,19 @@ public abstract class RmiIiopCmp2Bean im
         ObjectGraph data = null;
 
         try {
-            InitialContext ctx = new InitialContext();
+            final InitialContext ctx = new InitialContext();
 
-            EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
-            EncCmpObject object = home.create("Test02 CmpBean");
+            final EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
+            final EncCmpObject object = home.create("Test02 CmpBean");
             data = new ObjectGraph(object);
 
-        } catch (Exception e) {
+        } catch (final Exception e) {
             throw new EJBException(e);
         }
         return data;
     }
 
-    public EJBObject[] returnEJBObjectArray(EJBObject[] data) {
+    public EJBObject[] returnEJBObjectArray(final EJBObject[] data) {
         return data;
     }
 
@@ -335,7 +335,7 @@ public abstract class RmiIiopCmp2Bean im
     /*  EJBMetaData                                         */
     /*-------------------------------------------------*/
 
-    public EJBMetaData returnEJBMetaData(EJBMetaData data) {
+    public EJBMetaData returnEJBMetaData(final EJBMetaData data) {
         return data;
     }
 
@@ -343,12 +343,12 @@ public abstract class RmiIiopCmp2Bean im
         EJBMetaData data = null;
 
         try {
-            InitialContext ctx = new InitialContext();
+            final InitialContext ctx = new InitialContext();
 
-            EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
+            final EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
             data = home.getEJBMetaData();
 
-        } catch (Exception e) {
+        } catch (final Exception e) {
             throw new EJBException(e);
         }
         return data;
@@ -358,19 +358,19 @@ public abstract class RmiIiopCmp2Bean im
         ObjectGraph data = null;
 
         try {
-            InitialContext ctx = new InitialContext();
+            final InitialContext ctx = new InitialContext();
 
-            EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
-            EJBMetaData object = home.getEJBMetaData();
+            final EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
+            final EJBMetaData object = home.getEJBMetaData();
             data = new ObjectGraph(object);
 
-        } catch (Exception e) {
+        } catch (final Exception e) {
             throw new EJBException(e);
         }
         return data;
     }
 
-    public EJBMetaData[] returnEJBMetaDataArray(EJBMetaData[] data) {
+    public EJBMetaData[] returnEJBMetaDataArray(final EJBMetaData[] data) {
         return data;
     }
 
@@ -378,7 +378,7 @@ public abstract class RmiIiopCmp2Bean im
     /*  Handle                                         */
     /*-------------------------------------------------*/
 
-    public Handle returnHandle(Handle data) {
+    public Handle returnHandle(final Handle data) {
         return data;
     }
 
@@ -386,13 +386,13 @@ public abstract class RmiIiopCmp2Bean im
         Handle data = null;
 
         try {
-            InitialContext ctx = new InitialContext();
+            final InitialContext ctx = new InitialContext();
 
-            EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
-            EncCmpObject object = home.create("Test03 CmpBean");
+            final EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
+            final EncCmpObject object = home.create("Test03 CmpBean");
             data = object.getHandle();
 
-        } catch (Exception e) {
+        } catch (final Exception e) {
             throw new EJBException(e);
         }
         return data;
@@ -402,19 +402,19 @@ public abstract class RmiIiopCmp2Bean im
         ObjectGraph data = null;
 
         try {
-            InitialContext ctx = new InitialContext();
+            final InitialContext ctx = new InitialContext();
 
-            EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
-            EncCmpObject object = home.create("Test04 CmpBean");
+            final EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
+            final EncCmpObject object = home.create("Test04 CmpBean");
             data = new ObjectGraph(object.getHandle());
 
-        } catch (Exception e) {
+        } catch (final Exception e) {
             throw new EJBException(e);
         }
         return data;
     }
 
-    public Handle[] returnHandleArray(Handle[] data) {
+    public Handle[] returnHandleArray(final Handle[] data) {
         return data;
     }
 
@@ -423,11 +423,11 @@ public abstract class RmiIiopCmp2Bean im
     /*  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;
     }
 
@@ -435,11 +435,11 @@ public abstract class RmiIiopCmp2Bean im
     /*  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;
     }
     //
@@ -463,7 +463,7 @@ public abstract class RmiIiopCmp2Bean im
      * Set the associated entity context. The container invokes this method
      * on an instance after the instance has been created.
      */
-    public void setEntityContext(EntityContext ctx) {
+    public void setEntityContext(final EntityContext ctx) {
         ejbContext = ctx;
     }