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/15 23:55:19 UTC

svn commit: r1610862 [5/44] - in /tomee/tomee/trunk/itests: ./ failover-ejb/ failover-ejb/src/main/java/org/apache/openejb/itest/failover/ejb/ failover/ failover/src/main/java/org/apache/openejb/itest/failover/ failover/src/main/java/org/apache/openejb...

Modified: tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/AllowedOperationsCmpBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/AllowedOperationsCmpBean.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/AllowedOperationsCmpBean.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/AllowedOperationsCmpBean.java Tue Jul 15 21:55:09 2014
@@ -32,124 +32,122 @@ import javax.naming.NamingException;
 
 import org.apache.openejb.test.object.OperationsPolicy;
 
-public class AllowedOperationsCmpBean implements EntityBean{
+public class AllowedOperationsCmpBean implements EntityBean {
     private static int nextId;
     public Integer primaryKey;
     public String firstName;
     public String lastName;
     public int number;
     public EntityContext ejbContext;
-    public static Map<String,OperationsPolicy> allowedOperationsTable = new TreeMap<String,OperationsPolicy>();
-    
-    
+    public static Map<String, OperationsPolicy> allowedOperationsTable = new TreeMap<String, OperationsPolicy>();
+
+
     //=============================
     // Home interface methods
     //    
-    
+
     /**
      * Maps to BasicCmpHome.sum
-     * 
+     * <p/>
      * Adds x and y and returns the result.
-     * 
+     *
      * @param x
      * @param y
      * @return x + y
      * @see BasicCmpHome#sum
      */
-    public int ejbHomeSum(int x, int y) {
+    public int ejbHomeSum(final int x, final int y) {
         testAllowedOperations("ejbHome");
-        return x+y;
+        return x + y;
     }
-    
+
     public void ejbHomeVoidSelect() {
     }
 
     /**
      * Maps to BasicCmpHome.create
      */
-    public Integer ejbCreateObject(String name) throws CreateException{
+    public Integer ejbCreateObject(final String name) throws CreateException {
         primaryKey = nextId++;
         testAllowedOperations("ejbCreate");
-        StringTokenizer st = new StringTokenizer(name, " ");    
+        final StringTokenizer st = new StringTokenizer(name, " ");
         firstName = st.nextToken();
         lastName = st.nextToken();
         return new Integer(primaryKey);
     }
-    
-    public void ejbPostCreateObject(String name) throws CreateException{
+
+    public void ejbPostCreateObject(final String name) throws CreateException {
         testAllowedOperations("ejbPostCreate");
     }
 
     //    
     // Home interface methods
     //=============================
-    
+
 
     //=============================
     // Remote interface methods
     //    
-    
+
     /**
      * Maps to BasicCmpObject.businessMethod
-     * 
-     * @return 
+     *
+     * @return
      * @see BasicCmpObject#businessMethod
      */
-    public String businessMethod(String text){
+    public String businessMethod(final String text) {
         testAllowedOperations("businessMethod");
         number++;
-        StringBuffer b = new StringBuffer(text);
+        final StringBuffer b = new StringBuffer(text);
         return b.reverse().toString();
     }
 
     /**
      * Throws an ApplicationException when invoked
-     * 
      */
-    public void throwApplicationException() throws org.apache.openejb.test.ApplicationException{
+    public void throwApplicationException() throws org.apache.openejb.test.ApplicationException {
         throw new org.apache.openejb.test.ApplicationException("Don't Panic");
     }
-    
+
     /**
      * Throws a java.lang.NullPointerException when invoked
-     * This is a system exception and should result in the 
+     * This is a system exception and should result in the
      * destruction of the instance and invalidation of the
      * remote reference.
-     * 
      */
     public void throwSystemException_NullPointer() {
         throw new NullPointerException("Panic");
     }
-    
-    
+
+
     /**
      * Maps to BasicCmpObject.getPermissionsReport
-     * 
+     * <p/>
      * Returns a report of the bean's
      * runtime permissions
-     * 
-     * @return 
+     *
+     * @return
      * @see BasicCmpObject#getPermissionsReport
      */
-    public Properties getPermissionsReport(){
+    public Properties getPermissionsReport() {
         /* TO DO: */
         return null;
     }
-    
+
     /**
      * Maps to BasicCmpObject.getAllowedOperationsReport
-     * 
+     * <p/>
      * Returns a report of the allowed opperations
      * for one of the bean's methods.
-     * 
+     *
      * @param methodName The method for which to get the allowed opperations report
-     * @return 
+     * @return
      * @see BasicCmpObject#getAllowedOperationsReport
      */
-    public OperationsPolicy getAllowedOperationsReport(String methodName){
+    public OperationsPolicy getAllowedOperationsReport(final String methodName) {
         return allowedOperationsTable.get(methodName);
     }
-    
+
     //    
     // Remote interface methods
     //=============================
@@ -158,42 +156,42 @@ public class AllowedOperationsCmpBean im
     //================================
     // EntityBean interface methods
     //    
-    
+
     /**
      * A container invokes this method to instruct the
      * 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 {
         testAllowedOperations("ejbLoad");
     }
-    
+
     /**
      * 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;
         testAllowedOperations("setEntityContext");
     }
-    
+
     /**
      * 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 {
         testAllowedOperations("unsetEntityContext");
     }
-    
+
     /**
      * A container invokes this method to instruct the
      * instance to synchronize its state by storing it to the underlying
      * database.
      */
-    public void ejbStore() throws EJBException,RemoteException {
+    public void ejbStore() throws EJBException, RemoteException {
         testAllowedOperations("ejbStore");
     }
-    
+
     /**
      * A container invokes this method before it removes the EJB object
      * that is currently associated with the instance. This method
@@ -202,62 +200,63 @@ public class AllowedOperationsCmpBean im
      * 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 {
         testAllowedOperations("ejbRemove");
     }
-    
+
     /**
      * A container invokes this method when the instance
      * is taken out of the pool of available instances to become associated
      * 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 {
         testAllowedOperations("ejbActivate");
     }
-    
+
     /**
      * A container invokes this method on an instance before the instance
      * becomes disassociated with a specific EJB object. After this method
      * 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 {
 
         testAllowedOperations("ejbPassivate");
     }
-    //    
+
+    //
     // EntityBean interface methods
     //================================
-    protected void testAllowedOperations(String methodName) {
-        OperationsPolicy policy = new OperationsPolicy();
+    protected void testAllowedOperations(final String methodName) {
+        final OperationsPolicy policy = new OperationsPolicy();
 
         /*[0] Test getEJBHome /////////////////*/
         try {
             ejbContext.getEJBHome();
             policy.allow(OperationsPolicy.Context_getEJBHome);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[1] Test getCallerPrincipal /////////*/
         try {
             ejbContext.getCallerPrincipal();
-            policy.allow(OperationsPolicy.Context_getCallerPrincipal );
-        } catch (IllegalStateException ise) {
+            policy.allow(OperationsPolicy.Context_getCallerPrincipal);
+        } catch (final IllegalStateException ise) {
         }
 
         /*[2] Test isCallerInRole /////////////*/
         try {
             ejbContext.isCallerInRole("TheMan");
-            policy.allow(OperationsPolicy.Context_isCallerInRole );
-        } catch (IllegalStateException ise) {
+            policy.allow(OperationsPolicy.Context_isCallerInRole);
+        } catch (final IllegalStateException ise) {
         }
 
         /*[3] Test getRollbackOnly ////////////*/
         try {
             ejbContext.getRollbackOnly();
-            policy.allow(OperationsPolicy.Context_getRollbackOnly );
-        } catch (IllegalStateException ise) {
+            policy.allow(OperationsPolicy.Context_getRollbackOnly);
+        } catch (final IllegalStateException ise) {
         }
 
         /*[4] Test setRollbackOnly ////////////*/
@@ -266,19 +265,19 @@ public class AllowedOperationsCmpBean im
 //            policy.allow(OperationsPolicy.Context_setRollbackOnly );
 //        } catch (IllegalStateException ise) {
 //        }
-	
+
         /*[5] Test getUserTransaction /////////*/
         try {
             ejbContext.getUserTransaction();
-            policy.allow(OperationsPolicy.Context_getUserTransaction );
-        } catch (IllegalStateException ise) {
+            policy.allow(OperationsPolicy.Context_getUserTransaction);
+        } catch (final IllegalStateException ise) {
         }
 
         /*[6] Test getEJBObject ///////////////*/
         try {
             ejbContext.getEJBObject();
-            policy.allow(OperationsPolicy.Context_getEJBObject );
-        } catch (IllegalStateException ise) {
+            policy.allow(OperationsPolicy.Context_getEJBObject);
+        } catch (final IllegalStateException ise) {
         }
 
         /*[7] Test Context_getPrimaryKey ///////////////
@@ -287,19 +286,19 @@ public class AllowedOperationsCmpBean im
          */
         try {
             ejbContext.getPrimaryKey();
-            policy.allow(OperationsPolicy.Context_getPrimaryKey );
-        } catch (IllegalStateException ise) {
+            policy.allow(OperationsPolicy.Context_getPrimaryKey);
+        } catch (final IllegalStateException ise) {
         }
 
         /*[8] Test JNDI_access_to_java_comp_env ///////////////*/
         try {
-            InitialContext jndiContext = new InitialContext();
+            final InitialContext jndiContext = new InitialContext();
 
             jndiContext.lookup("java:comp/env/stateless/references/JNDI_access_to_java_comp_env");
 
-            policy.allow(OperationsPolicy.JNDI_access_to_java_comp_env );
-        } catch (IllegalStateException ise) {
-        } catch (NamingException ne) {
+            policy.allow(OperationsPolicy.JNDI_access_to_java_comp_env);
+        } catch (final IllegalStateException ise) {
+        } catch (final NamingException ne) {
         }
 
         allowedOperationsTable.put(methodName, policy);

Modified: tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmp2Bean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmp2Bean.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmp2Bean.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmp2Bean.java Tue Jul 15 21:55:09 2014
@@ -31,7 +31,7 @@ import java.util.HashMap;
 public abstract class BasicCmp2Bean implements EntityBean {
     private static int nextId;
     public EntityContext ejbContext;
-    public Map<String,OperationsPolicy> allowedOperationsTable = new HashMap<String,OperationsPolicy>();
+    public Map<String, OperationsPolicy> allowedOperationsTable = new HashMap<String, OperationsPolicy>();
 
     public abstract Integer getId();
 
@@ -44,19 +44,19 @@ public abstract class BasicCmp2Bean impl
     public abstract String getLastName();
 
     public abstract void setLastName(String lastName);
-    
+
     public abstract void ejbSelectRemoveById(Integer someId) throws FinderException;
-    
+
     //=============================
     // Home interface methods
     //
 
     /**
      * Maps to BasicCmpHome.sum
-     *
+     * <p/>
      * Adds x and y and returns the result.
      */
-    public int ejbHomeSum(int x, int y) {
+    public int ejbHomeSum(final int x, final int y) {
         testAllowedOperations("ejbHome");
         return x + y;
     }
@@ -68,17 +68,17 @@ public abstract class BasicCmp2Bean impl
     /**
      * Maps to BasicCmpHome.create(String name)
      */
-    public Integer ejbCreateObject(String name) throws CreateException {
+    public Integer ejbCreateObject(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 ejbPostCreateObject(String name) {
+    public void ejbPostCreateObject(final String name) {
     }
-    
+
     //
     // Home interface methods
     //=============================
@@ -91,9 +91,9 @@ public abstract class BasicCmp2Bean impl
     /**
      * Maps to BasicCmpObject.businessMethod
      */
-    public String businessMethod(String text) {
+    public String businessMethod(final String text) {
         testAllowedOperations("businessMethod");
-        StringBuffer b = new StringBuffer(text);
+        final StringBuffer b = new StringBuffer(text);
         return b.reverse().toString();
     }
 
@@ -118,7 +118,7 @@ public abstract class BasicCmp2Bean impl
 
     /**
      * Maps to BasicCmpObject.getPermissionsReport
-     *
+     * <p/>
      * Returns a report of the bean's
      * runtime permissions
      */
@@ -129,13 +129,13 @@ public abstract class BasicCmp2Bean impl
 
     /**
      * Maps to BasicCmpObject.getAllowedOperationsReport
-     *
+     * <p/>
      * Returns a report of the allowed opperations
      * for one of the bean's methods.
      *
      * @param methodName The method for which to get the allowed opperations report
      */
-    public OperationsPolicy getAllowedOperationsReport(String methodName) {
+    public OperationsPolicy getAllowedOperationsReport(final String methodName) {
         return allowedOperationsTable.get(methodName);
     }
 
@@ -160,7 +160,7 @@ public abstract class BasicCmp2Bean impl
      * 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;
         testAllowedOperations("setEntityContext");
     }
@@ -215,63 +215,63 @@ public abstract class BasicCmp2Bean impl
     // EntityBean interface methods
     //================================
 
-    protected void testAllowedOperations(String methodName) {
-        OperationsPolicy policy = new OperationsPolicy();
+    protected void testAllowedOperations(final String methodName) {
+        final OperationsPolicy policy = new OperationsPolicy();
 
         /*[1] Test getEJBHome /////////////////*/
         try {
             ejbContext.getEJBHome();
             policy.allow(OperationsPolicy.Context_getEJBHome);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[2] Test getCallerPrincipal /////////*/
         try {
             ejbContext.getCallerPrincipal();
             policy.allow(OperationsPolicy.Context_getCallerPrincipal);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[3] Test isCallerInRole /////////////*/
         try {
             ejbContext.isCallerInRole("TheMan");
             policy.allow(OperationsPolicy.Context_isCallerInRole);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[4] Test getRollbackOnly ////////////*/
         try {
             ejbContext.getRollbackOnly();
             policy.allow(OperationsPolicy.Context_getRollbackOnly);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[5] Test setRollbackOnly ////////////*/
         try {
             ejbContext.setRollbackOnly();
             policy.allow(OperationsPolicy.Context_setRollbackOnly);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[6] Test getUserTransaction /////////*/
         try {
             ejbContext.getUserTransaction();
             policy.allow(OperationsPolicy.Context_getUserTransaction);
-        } catch (Exception e) {
+        } catch (final Exception e) {
         }
 
         /*[7] Test getEJBObject ///////////////*/
         try {
             ejbContext.getEJBObject();
             policy.allow(OperationsPolicy.Context_getEJBObject);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[8] Test getPrimaryKey //////////////*/
         try {
             ejbContext.getPrimaryKey();
             policy.allow(OperationsPolicy.Context_getPrimaryKey);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /* TO DO:

Modified: tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmp2PojoBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmp2PojoBean.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmp2PojoBean.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmp2PojoBean.java Tue Jul 15 21:55:09 2014
@@ -29,55 +29,54 @@ import java.util.Map;
 import java.util.HashMap;
 
 /**
- * A test bean that is essentially the same as the 
- * BasicCmp2Bean, but with a concrete implementation of 
- * one of the fields and accessors.  This tests our 
- * ability to offer a migration path toward EJB3 
- * style entity beans. 
+ * A test bean that is essentially the same as the
+ * BasicCmp2Bean, but with a concrete implementation of
+ * one of the fields and accessors.  This tests our
+ * ability to offer a migration path toward EJB3
+ * style entity beans.
  */
 public abstract class BasicCmp2PojoBean implements EntityBean {
     private static int nextId;
     private String firstName;     // This is directly implemented rather than generated
     public EntityContext ejbContext;
-    public Map<String,OperationsPolicy> allowedOperationsTable = new HashMap<String,OperationsPolicy>();
+    public Map<String, OperationsPolicy> allowedOperationsTable = new HashMap<String, OperationsPolicy>();
 
     public abstract Integer getId();
 
     public abstract void setId(Integer primaryKey);
 
     /**
-     * Concrete implementation of the firstName accessors. 
+     * Concrete implementation of the firstName accessors.
      * The code generator should skip generating these
-     * methods and generate mapped superclasses in the 
-     * JPA metadata. 
-     * 
-     * @return The value of the firstName field. 
+     * methods and generate mapped superclasses in the
+     * JPA metadata.
+     *
+     * @return The value of the firstName field.
      */
     public String getFirstName() {
-        return firstName; 
+        return firstName;
     }
 
-    public void setFirstName(String firstName) {
-        this.firstName = firstName; 
+    public void setFirstName(final String firstName) {
+        this.firstName = firstName;
     }
 
     public abstract String getLastName();
 
     public abstract void setLastName(String lastName);
-    
+
     public abstract void ejbSelectRemoveById(Integer someId) throws FinderException;
-    
+
     //=============================
     // Home interface methods
     //
 
     /**
      * Maps to BasicCmpHome.sum
-     *
+     * <p/>
      * Adds x and y and returns the result.
      */
-    public int ejbHomeSum(int x, int y)  
-  {  
+    public int ejbHomeSum(final int x, final int y) {
         testAllowedOperations("ejbHome");
         return x + y;
     }
@@ -89,17 +88,17 @@ public abstract class BasicCmp2PojoBean 
     /**
      * Maps to BasicCmpHome.create(String name)
      */
-    public Integer ejbCreateObject(String name) throws CreateException {
+    public Integer ejbCreateObject(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 ejbPostCreateObject(String name) {
+    public void ejbPostCreateObject(final String name) {
     }
-    
+
     //
     // Home interface methods
     //=============================
@@ -112,9 +111,9 @@ public abstract class BasicCmp2PojoBean 
     /**
      * Maps to BasicCmpObject.businessMethod
      */
-    public String businessMethod(String text) {
+    public String businessMethod(final String text) {
         testAllowedOperations("businessMethod");
-        StringBuffer b = new StringBuffer(text);
+        final StringBuffer b = new StringBuffer(text);
         return b.reverse().toString();
     }
 
@@ -139,7 +138,7 @@ public abstract class BasicCmp2PojoBean 
 
     /**
      * Maps to BasicCmpObject.getPermissionsReport
-     *
+     * <p/>
      * Returns a report of the bean's
      * runtime permissions
      */
@@ -150,13 +149,13 @@ public abstract class BasicCmp2PojoBean 
 
     /**
      * Maps to BasicCmpObject.getAllowedOperationsReport
-     *
+     * <p/>
      * Returns a report of the allowed opperations
      * for one of the bean's methods.
      *
      * @param methodName The method for which to get the allowed opperations report
      */
-    public OperationsPolicy getAllowedOperationsReport(String methodName) {
+    public OperationsPolicy getAllowedOperationsReport(final String methodName) {
         return allowedOperationsTable.get(methodName);
     }
 
@@ -181,7 +180,7 @@ public abstract class BasicCmp2PojoBean 
      * 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;
         testAllowedOperations("setEntityContext");
     }
@@ -236,63 +235,63 @@ public abstract class BasicCmp2PojoBean 
     // EntityBean interface methods
     //================================
 
-    protected void testAllowedOperations(String methodName) {
-        OperationsPolicy policy = new OperationsPolicy();
+    protected void testAllowedOperations(final String methodName) {
+        final OperationsPolicy policy = new OperationsPolicy();
 
         /*[1] Test getEJBHome /////////////////*/
         try {
             ejbContext.getEJBHome();
             policy.allow(OperationsPolicy.Context_getEJBHome);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[2] Test getCallerPrincipal /////////*/
         try {
             ejbContext.getCallerPrincipal();
             policy.allow(OperationsPolicy.Context_getCallerPrincipal);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[3] Test isCallerInRole /////////////*/
         try {
             ejbContext.isCallerInRole("TheMan");
             policy.allow(OperationsPolicy.Context_isCallerInRole);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[4] Test getRollbackOnly ////////////*/
         try {
             ejbContext.getRollbackOnly();
             policy.allow(OperationsPolicy.Context_getRollbackOnly);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[5] Test setRollbackOnly ////////////*/
         try {
             ejbContext.setRollbackOnly();
             policy.allow(OperationsPolicy.Context_setRollbackOnly);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[6] Test getUserTransaction /////////*/
         try {
             ejbContext.getUserTransaction();
             policy.allow(OperationsPolicy.Context_getUserTransaction);
-        } catch (Exception e) {
+        } catch (final Exception e) {
         }
 
         /*[7] Test getEJBObject ///////////////*/
         try {
             ejbContext.getEJBObject();
             policy.allow(OperationsPolicy.Context_getEJBObject);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[8] Test getPrimaryKey //////////////*/
         try {
             ejbContext.getPrimaryKey();
             policy.allow(OperationsPolicy.Context_getPrimaryKey);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /* TO DO:

Modified: tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmpBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmpBean.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmpBean.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmpBean.java Tue Jul 15 21:55:09 2014
@@ -29,56 +29,56 @@ import javax.ejb.RemoveException;
 import org.apache.openejb.test.ApplicationException;
 import org.apache.openejb.test.object.OperationsPolicy;
 
-public class BasicCmpBean implements javax.ejb.EntityBean{
+public class BasicCmpBean implements javax.ejb.EntityBean {
     private static int nextId;
     public Integer primaryKey;
     public String firstName;
     public String lastName;
     public EntityContext ejbContext;
-    public Map<String,OperationsPolicy> allowedOperationsTable = new HashMap<String,OperationsPolicy>();
-    
-    
+    public Map<String, OperationsPolicy> allowedOperationsTable = new HashMap<String, OperationsPolicy>();
+
+
     //=============================
     // Home interface methods
     //    
-    
+
     /**
      * Maps to BasicCmpHome.sum
-     * 
+     * <p/>
      * Adds x and y and returns the result.
-     * 
+     *
      * @param x
      * @param y
      * @return x + y
      * @see BasicCmpHome#sum
      */
-    public int ejbHomeSum(int x, int y) {
+    public int ejbHomeSum(final int x, final int y) {
         testAllowedOperations("ejbHome");
-        return x+y;
+        return x + y;
     }
-    
+
     public void ejbHomeVoidSelect() {
     }
 
     /**
      * Maps to BasicCmpHome.create
-     * 
+     *
      * @param name
-     * @return 
-     * @exception javax.ejb.CreateException
+     * @return
+     * @throws javax.ejb.CreateException
      * @see BasicCmpHome#createObject
      */
-    public Integer ejbCreateObject(String name)
-    throws javax.ejb.CreateException{
+    public Integer ejbCreateObject(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 ejbPostCreateObject(String name)
-    throws javax.ejb.CreateException{
+
+    public void ejbPostCreateObject(final String name)
+        throws javax.ejb.CreateException {
     }
 
     public int getPrimaryKey() {
@@ -95,73 +95,71 @@ public class BasicCmpBean implements jav
     //    
     // Home interface methods
     //=============================
-    
+
 
     //=============================
     // Remote interface methods
     //    
-    
+
     /**
      * Maps to BasicCmpObject.businessMethod
-     * 
-     * @return 
+     *
+     * @return
      * @see BasicCmpObject#businessMethod
      */
-    public String businessMethod(String text){
+    public String businessMethod(final String text) {
         testAllowedOperations("businessMethod");
-        StringBuffer b = new StringBuffer(text);
+        final StringBuffer b = new StringBuffer(text);
         return b.reverse().toString();
     }
 
 
     /**
      * Throws an ApplicationException when invoked
-     * 
      */
-    public void throwApplicationException() throws ApplicationException{
+    public void throwApplicationException() throws ApplicationException {
         throw new ApplicationException("Testing ability to throw Application Exceptions");
     }
-    
+
     /**
      * Throws a java.lang.NullPointerException when invoked
-     * This is a system exception and should result in the 
+     * This is a system exception and should result in the
      * destruction of the instance and invalidation of the
      * remote reference.
-     * 
      */
     public void throwSystemException_NullPointer() {
         throw new NullPointerException("Testing ability to throw System Exceptions");
     }
-    
-    
+
+
     /**
      * Maps to BasicCmpObject.getPermissionsReport
-     * 
+     * <p/>
      * Returns a report of the bean's
      * runtime permissions
-     * 
-     * @return 
+     *
+     * @return
      * @see BasicCmpObject#getPermissionsReport
      */
-    public Properties getPermissionsReport(){
+    public Properties getPermissionsReport() {
         /* TO DO: */
         return null;
     }
-    
+
     /**
      * Maps to BasicCmpObject.getAllowedOperationsReport
-     * 
+     * <p/>
      * Returns a report of the allowed opperations
      * for one of the bean's methods.
-     * 
+     *
      * @param methodName The method for which to get the allowed opperations report
-     * @return 
+     * @return
      * @see BasicCmpObject#getAllowedOperationsReport
      */
-    public OperationsPolicy getAllowedOperationsReport(String methodName){
+    public OperationsPolicy getAllowedOperationsReport(final String methodName) {
         return allowedOperationsTable.get(methodName);
     }
-    
+
     //    
     // Remote interface methods
     //=============================
@@ -170,40 +168,40 @@ public class BasicCmpBean implements jav
     //================================
     // EntityBean interface methods
     //    
-    
+
     /**
      * A container invokes this method to instruct the
      * 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;
         testAllowedOperations("setEntityContext");
     }
-    
+
     /**
      * 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 {
         testAllowedOperations("unsetEntityContext");
     }
-    
+
     /**
      * A container invokes this method to instruct the
      * instance to synchronize its state by storing it to the underlying
      * database.
      */
-    public void ejbStore() throws EJBException,RemoteException {
+    public void ejbStore() throws EJBException, RemoteException {
     }
-    
+
     /**
      * A container invokes this method before it removes the EJB object
      * that is currently associated with the instance. This method
@@ -212,82 +210,90 @@ public class BasicCmpBean implements jav
      * 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 {
     }
-    
+
     /**
      * A container invokes this method when the instance
      * is taken out of the pool of available instances to become associated
      * 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 {
         testAllowedOperations("ejbActivate");
     }
-    
+
     /**
      * A container invokes this method on an instance before the instance
      * becomes disassociated with a specific EJB object. After this method
      * 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 {
         testAllowedOperations("ejbPassivate");
     }
     //    
     // EntityBean interface methods
     //================================
-    
-    protected void testAllowedOperations(String methodName){
-        OperationsPolicy policy = new OperationsPolicy();
+
+    protected void testAllowedOperations(final String methodName) {
+        final OperationsPolicy policy = new OperationsPolicy();
         
-        /*[1] Test getEJBHome /////////////////*/ 
-        try{
+        /*[1] Test getEJBHome /////////////////*/
+        try {
             ejbContext.getEJBHome();
             policy.allow(OperationsPolicy.Context_getEJBHome);
-        }catch(IllegalStateException ise){}
+        } catch (final IllegalStateException ise) {
+        }
         
-        /*[2] Test getCallerPrincipal /////////*/ 
-        try{
+        /*[2] Test getCallerPrincipal /////////*/
+        try {
             ejbContext.getCallerPrincipal();
-            policy.allow( OperationsPolicy.Context_getCallerPrincipal );
-        }catch(IllegalStateException ise){}
+            policy.allow(OperationsPolicy.Context_getCallerPrincipal);
+        } catch (final IllegalStateException ise) {
+        }
         
-        /*[3] Test isCallerInRole /////////////*/ 
-        try{
+        /*[3] Test isCallerInRole /////////////*/
+        try {
             ejbContext.isCallerInRole("TheMan");
-            policy.allow( OperationsPolicy.Context_isCallerInRole );
-        }catch(IllegalStateException ise){}
+            policy.allow(OperationsPolicy.Context_isCallerInRole);
+        } catch (final IllegalStateException ise) {
+        }
         
-        /*[4] Test getRollbackOnly ////////////*/ 
-        try{
+        /*[4] Test getRollbackOnly ////////////*/
+        try {
             ejbContext.getRollbackOnly();
-            policy.allow( OperationsPolicy.Context_getRollbackOnly );
-        }catch(IllegalStateException ise){}
+            policy.allow(OperationsPolicy.Context_getRollbackOnly);
+        } catch (final IllegalStateException ise) {
+        }
         
-        /*[5] Test setRollbackOnly ////////////*/ 
-        try{
+        /*[5] Test setRollbackOnly ////////////*/
+        try {
             ejbContext.setRollbackOnly();
-            policy.allow( OperationsPolicy.Context_setRollbackOnly );
-        }catch(IllegalStateException ise){}
+            policy.allow(OperationsPolicy.Context_setRollbackOnly);
+        } catch (final IllegalStateException ise) {
+        }
         
-        /*[6] Test getUserTransaction /////////*/ 
-        try{
+        /*[6] Test getUserTransaction /////////*/
+        try {
             ejbContext.getUserTransaction();
-            policy.allow( OperationsPolicy.Context_getUserTransaction );
-        }catch(Exception e){}
+            policy.allow(OperationsPolicy.Context_getUserTransaction);
+        } catch (final Exception e) {
+        }
         
-        /*[7] Test getEJBObject ///////////////*/ 
-        try{
+        /*[7] Test getEJBObject ///////////////*/
+        try {
             ejbContext.getEJBObject();
-            policy.allow( OperationsPolicy.Context_getEJBObject );
-        }catch(IllegalStateException ise){}
+            policy.allow(OperationsPolicy.Context_getEJBObject);
+        } catch (final IllegalStateException ise) {
+        }
 
-        /*[8] Test getPrimaryKey //////////////*/ 
-        try{
+        /*[8] Test getPrimaryKey //////////////*/
+        try {
             ejbContext.getPrimaryKey();
-            policy.allow( OperationsPolicy.Context_getPrimaryKey );
-        }catch(IllegalStateException ise){}
+            policy.allow(OperationsPolicy.Context_getPrimaryKey);
+        } catch (final IllegalStateException ise) {
+        }
          
         /* TO DO:  
          * Check for policy.Enterprise_bean_access       

Modified: tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmpHome.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmpHome.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmpHome.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmpHome.java Tue Jul 15 21:55:09 2014
@@ -26,11 +26,11 @@ public interface BasicCmpHome extends ja
     BasicCmpObject createObject(String name) throws CreateException, RemoteException;
 
     BasicCmpObject findByPrimaryKey(Integer primarykey) throws FinderException, RemoteException;
-    
+
     Collection findEmptyCollection() throws FinderException, RemoteException;
-    
+
     Collection findByLastName(String lastName) throws FinderException, RemoteException;
-    
+
     int sum(int x, int y) throws RemoteException;
 
     void voidSelect() throws FinderException, RemoteException;

Modified: tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmpObject.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmpObject.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmpObject.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/BasicCmpObject.java Tue Jul 15 21:55:09 2014
@@ -24,35 +24,35 @@ import org.apache.openejb.test.object.Op
 
 import javax.ejb.EJBObject;
 
-public interface BasicCmpObject extends EJBObject{
+public interface BasicCmpObject extends EJBObject {
     /**
      * Reverses the string passed in then returns it
      */
     String businessMethod(String text) throws RemoteException;
-    
+
     /**
      * Throws an ApplicationException when invoked
      */
     void throwApplicationException() throws RemoteException, ApplicationException;
-    
+
     /**
      * Throws a java.lang.NullPointerException when invoked
-     * This is a system exception and should result in the 
+     * This is a system exception and should result in the
      * destruction of the instance and invalidation of the
      * remote reference.
      */
     void throwSystemException_NullPointer() throws RemoteException;
-    
+
     /**
-     * Returns a report of the bean's 
+     * Returns a report of the bean's
      * runtime permissions
      */
     Properties getPermissionsReport() throws RemoteException;
-    
+
     /**
      * Returns a report of the allowed opperations
      * for one of the bean's methods.
-     * 
+     *
      * @param methodName The method for which to get the allowed opperations report
      */
     OperationsPolicy getAllowedOperationsReport(String methodName) throws RemoteException;

Modified: tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmp2Bean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmp2Bean.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmp2Bean.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmp2Bean.java Tue Jul 15 21:55:09 2014
@@ -30,7 +30,7 @@ import java.util.HashMap;
 
 public abstract class ComplexCmp2Bean implements EntityBean {
     public EntityContext ejbContext;
-    public Map<String,OperationsPolicy> allowedOperationsTable = new HashMap<String,OperationsPolicy>();
+    public Map<String, OperationsPolicy> allowedOperationsTable = new HashMap<String, OperationsPolicy>();
 
     public abstract String getFirstName();
 
@@ -47,10 +47,10 @@ public abstract class ComplexCmp2Bean im
 
     /**
      * Maps to BasicCmpHome.sum
-     *
+     * <p/>
      * Adds x and y and returns the result.
      */
-    public int ejbHomeSum(int x, int y) {
+    public int ejbHomeSum(final int x, final int y) {
         testAllowedOperations("ejbHome");
         return x + y;
     }
@@ -58,14 +58,14 @@ public abstract class ComplexCmp2Bean im
     /**
      * Maps to BasicCmpHome.create(String name)
      */
-    public ComplexCmpBeanPk ejbCreateObject(String name) throws CreateException {
-        StringTokenizer st = new StringTokenizer(name, " ");
+    public ComplexCmpBeanPk ejbCreateObject(final String name) throws CreateException {
+        final StringTokenizer st = new StringTokenizer(name, " ");
         setFirstName(st.nextToken());
         setLastName(st.nextToken());
         return null;
     }
 
-    public void ejbPostCreateObject(String name) {
+    public void ejbPostCreateObject(final String name) {
     }
 
     //
@@ -80,9 +80,9 @@ public abstract class ComplexCmp2Bean im
     /**
      * Maps to BasicCmpObject.businessMethod
      */
-    public String businessMethod(String text) {
+    public String businessMethod(final String text) {
         testAllowedOperations("businessMethod");
-        StringBuffer b = new StringBuffer(text);
+        final StringBuffer b = new StringBuffer(text);
         return b.reverse().toString();
     }
 
@@ -107,7 +107,7 @@ public abstract class ComplexCmp2Bean im
 
     /**
      * Maps to BasicCmpObject.getPermissionsReport
-     *
+     * <p/>
      * Returns a report of the bean's
      * runtime permissions
      */
@@ -118,13 +118,13 @@ public abstract class ComplexCmp2Bean im
 
     /**
      * Maps to BasicCmpObject.getAllowedOperationsReport
-     *
+     * <p/>
      * Returns a report of the allowed opperations
      * for one of the bean's methods.
      *
      * @param methodName The method for which to get the allowed opperations report
      */
-    public OperationsPolicy getAllowedOperationsReport(String methodName) {
+    public OperationsPolicy getAllowedOperationsReport(final String methodName) {
         return allowedOperationsTable.get(methodName);
     }
 
@@ -149,7 +149,7 @@ public abstract class ComplexCmp2Bean 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;
         testAllowedOperations("setEntityContext");
     }
@@ -204,63 +204,63 @@ public abstract class ComplexCmp2Bean im
     // EntityBean interface methods
     //================================
 
-    protected void testAllowedOperations(String methodName) {
-        OperationsPolicy policy = new OperationsPolicy();
+    protected void testAllowedOperations(final String methodName) {
+        final OperationsPolicy policy = new OperationsPolicy();
 
         /*[1] Test getEJBHome /////////////////*/
         try {
             ejbContext.getEJBHome();
             policy.allow(OperationsPolicy.Context_getEJBHome);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[2] Test getCallerPrincipal /////////*/
         try {
             ejbContext.getCallerPrincipal();
             policy.allow(OperationsPolicy.Context_getCallerPrincipal);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[3] Test isCallerInRole /////////////*/
         try {
             ejbContext.isCallerInRole("TheMan");
             policy.allow(OperationsPolicy.Context_isCallerInRole);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[4] Test getRollbackOnly ////////////*/
         try {
             ejbContext.getRollbackOnly();
             policy.allow(OperationsPolicy.Context_getRollbackOnly);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[5] Test setRollbackOnly ////////////*/
         try {
             ejbContext.setRollbackOnly();
             policy.allow(OperationsPolicy.Context_setRollbackOnly);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[6] Test getUserTransaction /////////*/
         try {
             ejbContext.getUserTransaction();
             policy.allow(OperationsPolicy.Context_getUserTransaction);
-        } catch (Exception e) {
+        } catch (final Exception e) {
         }
 
         /*[7] Test getEJBObject ///////////////*/
         try {
             ejbContext.getEJBObject();
             policy.allow(OperationsPolicy.Context_getEJBObject);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[8] Test getPrimaryKey //////////////*/
         try {
             ejbContext.getPrimaryKey();
             policy.allow(OperationsPolicy.Context_getPrimaryKey);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /* TO DO:

Modified: tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmpBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmpBean.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmpBean.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmpBean.java Tue Jul 15 21:55:09 2014
@@ -51,7 +51,7 @@ public class ComplexCmpBean implements E
      * @return x + y
      * @see org.apache.openejb.test.entity.cmp.BasicCmpHome#sum
      */
-    public int ejbHomeSum(int x, int y) {
+    public int ejbHomeSum(final int x, final int y) {
         testAllowedOperations("ejbHome");
         return x + y;
     }
@@ -59,14 +59,14 @@ public class ComplexCmpBean implements E
     /**
      * Maps to BasicCmpHome.create
      */
-    public ComplexCmpBeanPk ejbCreateObject(String name) throws CreateException {
-        StringTokenizer st = new StringTokenizer(name, " ");
+    public ComplexCmpBeanPk ejbCreateObject(final String name) throws CreateException {
+        final StringTokenizer st = new StringTokenizer(name, " ");
         firstName = st.nextToken();
         lastName = st.nextToken();
         return null;
     }
 
-    public void ejbPostCreateObject(String name) throws CreateException {
+    public void ejbPostCreateObject(final String name) throws CreateException {
     }
 
     public ComplexCmpBeanPk getPrimaryKey() {
@@ -94,9 +94,9 @@ public class ComplexCmpBean implements E
      * @return
      * @see org.apache.openejb.test.entity.cmp.BasicCmpObject#businessMethod
      */
-    public String businessMethod(String text) {
+    public String businessMethod(final String text) {
         testAllowedOperations("businessMethod");
-        StringBuffer b = new StringBuffer(text);
+        final StringBuffer b = new StringBuffer(text);
         return b.reverse().toString();
     }
 
@@ -143,7 +143,7 @@ public class ComplexCmpBean implements E
      * @return
      * @see org.apache.openejb.test.entity.cmp.BasicCmpObject#getAllowedOperationsReport
      */
-    public OperationsPolicy getAllowedOperationsReport(String methodName) {
+    public OperationsPolicy getAllowedOperationsReport(final String methodName) {
         return allowedOperationsTable.get(methodName);
     }
 
@@ -167,7 +167,7 @@ public class ComplexCmpBean implements E
      * 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;
         testAllowedOperations("setEntityContext");
     }
@@ -222,63 +222,63 @@ public class ComplexCmpBean implements E
     // EntityBean interface methods
     //================================
 
-    protected void testAllowedOperations(String methodName) {
-        OperationsPolicy policy = new OperationsPolicy();
+    protected void testAllowedOperations(final String methodName) {
+        final OperationsPolicy policy = new OperationsPolicy();
 
         /*[1] Test getEJBHome /////////////////*/
         try {
             ejbContext.getEJBHome();
             policy.allow(OperationsPolicy.Context_getEJBHome);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[2] Test getCallerPrincipal /////////*/
         try {
             ejbContext.getCallerPrincipal();
             policy.allow(OperationsPolicy.Context_getCallerPrincipal);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[3] Test isCallerInRole /////////////*/
         try {
             ejbContext.isCallerInRole("TheMan");
             policy.allow(OperationsPolicy.Context_isCallerInRole);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[4] Test getRollbackOnly ////////////*/
         try {
             ejbContext.getRollbackOnly();
             policy.allow(OperationsPolicy.Context_getRollbackOnly);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[5] Test setRollbackOnly ////////////*/
         try {
             ejbContext.setRollbackOnly();
             policy.allow(OperationsPolicy.Context_setRollbackOnly);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[6] Test getUserTransaction /////////*/
         try {
             ejbContext.getUserTransaction();
             policy.allow(OperationsPolicy.Context_getUserTransaction);
-        } catch (Exception e) {
+        } catch (final Exception e) {
         }
 
         /*[7] Test getEJBObject ///////////////*/
         try {
             ejbContext.getEJBObject();
             policy.allow(OperationsPolicy.Context_getEJBObject);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /*[8] Test getPrimaryKey //////////////*/
         try {
             ejbContext.getPrimaryKey();
             policy.allow(OperationsPolicy.Context_getPrimaryKey);
-        } catch (IllegalStateException ise) {
+        } catch (final IllegalStateException ise) {
         }
 
         /* TO DO:

Modified: tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmpBeanPk.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmpBeanPk.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmpBeanPk.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmpBeanPk.java Tue Jul 15 21:55:09 2014
@@ -27,16 +27,16 @@ public class ComplexCmpBeanPk implements
     public ComplexCmpBeanPk() {
     }
 
-    public ComplexCmpBeanPk(String firstName, String lastName) {
+    public ComplexCmpBeanPk(final String firstName, final String lastName) {
         this.firstName = firstName;
         this.lastName = lastName;
     }
 
-    public boolean equals(Object o) {
+    public boolean equals(final Object o) {
         if (this == o) return true;
         if (o == null || getClass() != o.getClass()) return false;
 
-        ComplexCmpBeanPk that = (ComplexCmpBeanPk) o;
+        final ComplexCmpBeanPk that = (ComplexCmpBeanPk) o;
 
         if (firstName != null ? !firstName.equals(that.firstName) : that.firstName != null) return false;
         if (lastName != null ? !lastName.equals(that.lastName) : that.lastName != null) return false;

Modified: tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ContextLookupCmpBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ContextLookupCmpBean.java?rev=1610862&r1=1610861&r2=1610862&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ContextLookupCmpBean.java (original)
+++ tomee/tomee/trunk/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/ContextLookupCmpBean.java Tue Jul 15 21:55:09 2014
@@ -64,15 +64,15 @@ public class ContextLookupCmpBean implem
      * @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 {
     }
 
     //
@@ -87,15 +87,15 @@ public class ContextLookupCmpBean implem
     public void lookupEntityBean() throws TestFailureException {
         try {
             try {
-                BasicCmpHome home = (BasicCmpHome) ejbContext.lookup("entity/cmp/beanReferences/cmp_entity");
+                final BasicCmpHome home = (BasicCmpHome) ejbContext.lookup("entity/cmp/beanReferences/cmp_entity");
                 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);
         }
     }
@@ -103,15 +103,15 @@ public class ContextLookupCmpBean implem
     public void lookupStatefulBean() throws TestFailureException {
         try {
             try {
-                BasicStatefulHome home = (BasicStatefulHome) ejbContext.lookup("entity/cmp/beanReferences/stateful");
+                final BasicStatefulHome home = (BasicStatefulHome) ejbContext.lookup("entity/cmp/beanReferences/stateful");
                 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);
         }
     }
@@ -119,67 +119,67 @@ public class ContextLookupCmpBean implem
     public void lookupStatelessBean() throws TestFailureException {
         try {
             try {
-                BasicStatelessHome home = (BasicStatelessHome) ejbContext.lookup("entity/cmp/beanReferences/stateless");
+                final BasicStatelessHome home = (BasicStatelessHome) ejbContext.lookup("entity/cmp/beanReferences/stateless");
                 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{
-            BasicStatelessBusinessLocal object = (BasicStatelessBusinessLocal) ejbContext.lookup("entity/cmp/beanReferences/stateless-business-local");
-            Assert.assertNotNull("The EJB BusinessLocal is null", object );
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+    public void lookupStatelessBusinessLocal() throws TestFailureException {
+        try {
+            try {
+                final BasicStatelessBusinessLocal object = (BasicStatelessBusinessLocal) ejbContext.lookup("entity/cmp/beanReferences/stateless-business-local");
+                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 lookupStatelessBusinessRemote() throws TestFailureException{
-        try{
-            try{
-            BasicStatelessBusinessRemote object = (BasicStatelessBusinessRemote) ejbContext.lookup("entity/cmp/beanReferences/stateless-business-remote");
-            Assert.assertNotNull("The EJB BusinessRemote is null", object );
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+    public void lookupStatelessBusinessRemote() throws TestFailureException {
+        try {
+            try {
+                final BasicStatelessBusinessRemote object = (BasicStatelessBusinessRemote) ejbContext.lookup("entity/cmp/beanReferences/stateless-business-remote");
+                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{
-            BasicStatefulBusinessLocal object = (BasicStatefulBusinessLocal) ejbContext.lookup("entity/cmp/beanReferences/stateful-business-local");
-            Assert.assertNotNull("The EJB BusinessLocal is null", object );
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+    public void lookupStatefulBusinessLocal() throws TestFailureException {
+        try {
+            try {
+                final BasicStatefulBusinessLocal object = (BasicStatefulBusinessLocal) ejbContext.lookup("entity/cmp/beanReferences/stateful-business-local");
+                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{
-            BasicStatefulBusinessRemote object = (BasicStatefulBusinessRemote) ejbContext.lookup("entity/cmp/beanReferences/stateful-business-remote");
-            Assert.assertNotNull("The EJB BusinessRemote is null", object );
-            } catch (Exception e){
-                Assert.fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+    public void lookupStatefulBusinessRemote() throws TestFailureException {
+        try {
+            try {
+                final BasicStatefulBusinessRemote object = (BasicStatefulBusinessRemote) ejbContext.lookup("entity/cmp/beanReferences/stateful-business-remote");
+                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);
         }
     }
@@ -187,16 +187,16 @@ public class ContextLookupCmpBean implem
     public void lookupStringEntry() throws TestFailureException {
         try {
             try {
-                String expected = new String("1");
-                String actual = (String) ejbContext.lookup("entity/cmp/references/String");
+                final String expected = new String("1");
+                final String actual = (String) ejbContext.lookup("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);
         }
     }
@@ -204,16 +204,16 @@ public class ContextLookupCmpBean implem
     public void lookupDoubleEntry() throws TestFailureException {
         try {
             try {
-                Double expected = new Double(1.0D);
-                Double actual = (Double) ejbContext.lookup("entity/cmp/references/Double");
+                final Double expected = new Double(1.0D);
+                final Double actual = (Double) ejbContext.lookup("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);
         }
     }
@@ -221,16 +221,16 @@ public class ContextLookupCmpBean implem
     public void lookupLongEntry() throws TestFailureException {
         try {
             try {
-                Long expected = new Long(1L);
-                Long actual = (Long) ejbContext.lookup("entity/cmp/references/Long");
+                final Long expected = new Long(1L);
+                final Long actual = (Long) ejbContext.lookup("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);
         }
     }
@@ -238,16 +238,16 @@ public class ContextLookupCmpBean implem
     public void lookupFloatEntry() throws TestFailureException {
         try {
             try {
-                Float expected = new Float(1.0F);
-                Float actual = (Float) ejbContext.lookup("entity/cmp/references/Float");
+                final Float expected = new Float(1.0F);
+                final Float actual = (Float) ejbContext.lookup("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);
         }
     }
@@ -255,16 +255,16 @@ public class ContextLookupCmpBean implem
     public void lookupIntegerEntry() throws TestFailureException {
         try {
             try {
-                Integer expected = new Integer(1);
-                Integer actual = (Integer) ejbContext.lookup("entity/cmp/references/Integer");
+                final Integer expected = new Integer(1);
+                final Integer actual = (Integer) ejbContext.lookup("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);
         }
     }
@@ -272,16 +272,16 @@ public class ContextLookupCmpBean implem
     public void lookupShortEntry() throws TestFailureException {
         try {
             try {
-                Short expected = new Short((short) 1);
-                Short actual = (Short) ejbContext.lookup("entity/cmp/references/Short");
+                final Short expected = new Short((short) 1);
+                final Short actual = (Short) ejbContext.lookup("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);
         }
     }
@@ -289,16 +289,16 @@ public class ContextLookupCmpBean implem
     public void lookupBooleanEntry() throws TestFailureException {
         try {
             try {
-                Boolean expected = new Boolean(true);
-                Boolean actual = (Boolean) ejbContext.lookup("entity/cmp/references/Boolean");
+                final Boolean expected = new Boolean(true);
+                final Boolean actual = (Boolean) ejbContext.lookup("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);
         }
     }
@@ -306,16 +306,16 @@ public class ContextLookupCmpBean implem
     public void lookupByteEntry() throws TestFailureException {
         try {
             try {
-                Byte expected = new Byte((byte) 1);
-                Byte actual = (Byte) ejbContext.lookup("entity/cmp/references/Byte");
+                final Byte expected = new Byte((byte) 1);
+                final Byte actual = (Byte) ejbContext.lookup("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);
         }
     }
@@ -323,16 +323,16 @@ public class ContextLookupCmpBean implem
     public void lookupCharacterEntry() throws TestFailureException {
         try {
             try {
-                Character expected = new Character('D');
-                Character actual = (Character) ejbContext.lookup("entity/cmp/references/Character");
+                final Character expected = new Character('D');
+                final Character actual = (Character) ejbContext.lookup("entity/cmp/references/Character");
 
                 Assert.assertNotNull("The Character 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);
         }
     }
@@ -340,82 +340,82 @@ public class ContextLookupCmpBean implem
     public void lookupResource() throws TestFailureException {
         try {
             try {
-                Object obj = ejbContext.lookup("datasource");
+                final Object obj = ejbContext.lookup("datasource");
                 Assert.assertNotNull("The DataSource is null", obj);
                 Assert.assertTrue("Not an instance of DataSource", obj instanceof DataSource);
-            } 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{
+
+    public void lookupJMSConnectionFactory() throws TestFailureException {
+        try {
+            try {
                 Object obj = ejbContext.lookup("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 = ejbContext.lookup("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 = ejbContext.lookup("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{
-                EntityManagerFactory emf = (EntityManagerFactory)ejbContext.lookup("persistence/TestUnit");
-                Assert.assertNotNull("The EntityManagerFactory is null", emf );
+    public void lookupPersistenceUnit() throws TestFailureException {
+        try {
+            try {
+                final EntityManagerFactory emf = (EntityManagerFactory) ejbContext.lookup("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{
-                EntityManager em = (EntityManager)ejbContext.lookup("persistence/TestContext");
+
+    public void lookupPersistenceContext() throws TestFailureException {
+        try {
+            try {
+                final EntityManager em = (EntityManager) ejbContext.lookup("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);
         }
     }
@@ -440,7 +440,7 @@ public class ContextLookupCmpBean 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) throws EJBException, RemoteException {
+    public void setEntityContext(final EntityContext ctx) throws EJBException, RemoteException {
         ejbContext = ctx;
     }