tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andygumbre...@apache.org
Subject svn commit: r1511624 [4/5] - in /tomee/tomee/trunk/server: openejb-client/src/main/java/javax/xml/ws/ openejb-client/src/main/java/javax/xml/ws/wsaddressing/ openejb-client/src/main/java/org/apache/openejb/client/ openejb-client/src/main/java/org/apach...
Date Thu, 08 Aug 2013 08:57:46 GMT
Modified: tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/proxy/ProxyManager.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/proxy/ProxyManager.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/proxy/ProxyManager.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/proxy/ProxyManager.java Thu Aug  8 08:57:43 2013
@@ -22,19 +22,21 @@ import java.util.Properties;
 
 public class ProxyManager {
 
-    private static ProxyFactory defaultFactory;
+    private static final ProxyFactory defaultFactory;
     private static String defaultFactoryName;
 
     static {
-        String version = null;
-        Class factory = null;
+
+        final String version;
+        final Class factory;
+
         try {
             version = System.getProperty("java.vm.version");
         } catch (Exception e) {
 
             throw new ClientRuntimeException("Unable to determine the version of your VM.  No ProxyFactory Can be installed");
         }
-        ClassLoader cl = getContextClassLoader();
+        final ClassLoader cl = getContextClassLoader();
 
         if (version.startsWith("1.1")) {
             throw new ClientRuntimeException("This VM version is not supported: " + version);
@@ -85,45 +87,45 @@ public class ProxyManager {
         return defaultFactoryName;
     }
 
-    public static InvocationHandler getInvocationHandler(Object proxy) {
+    public static InvocationHandler getInvocationHandler(final Object proxy) {
         return defaultFactory.getInvocationHandler(proxy);
     }
 
-    public static Object setInvocationHandler(Object proxy, InvocationHandler handler) {
+    public static Object setInvocationHandler(final Object proxy, final InvocationHandler handler) {
         return defaultFactory.setInvocationHandler(proxy, handler);
     }
 
-    public static Class getProxyClass(Class interfaceType) throws IllegalAccessException {
+    public static Class getProxyClass(final Class interfaceType) throws IllegalAccessException {
         return getProxyClass(new Class[]{interfaceType});
     }
 
-    public static Class getProxyClass(Class[] interfaces) throws IllegalAccessException {
+    public static Class getProxyClass(final Class[] interfaces) throws IllegalAccessException {
         return defaultFactory.getProxyClass(interfaces);
     }
 
-    public static Object newProxyInstance(Class interfaceType, InvocationHandler h) throws IllegalAccessException {
+    public static Object newProxyInstance(final Class interfaceType, final InvocationHandler h) throws IllegalAccessException {
         return newProxyInstance(new Class[]{interfaceType}, h);
     }
 
-    public static Object newProxyInstance(Class[] interfaces, InvocationHandler h) throws IllegalAccessException {
+    public static Object newProxyInstance(final Class[] interfaces, final InvocationHandler h) throws IllegalAccessException {
         return defaultFactory.newProxyInstance(interfaces, h);
     }
 
-    public static boolean isProxyClass(Class cl) {
+    public static boolean isProxyClass(final Class cl) {
         return defaultFactory.isProxyClass(cl);
     }
 
-    public static Object newProxyInstance(Class proxyClass) throws IllegalAccessException {
+    public static Object newProxyInstance(final Class proxyClass) throws IllegalAccessException {
         return defaultFactory.newProxyInstance(proxyClass);
     }
 
     public static ClassLoader getContextClassLoader() {
-        return (ClassLoader) java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction() {
-                    public Object run() {
-                        return Thread.currentThread().getContextClassLoader();
-                    }
-                }
-        );
+        return (ClassLoader) java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() {
+            @Override
+            public Object run() {
+                return Thread.currentThread().getContextClassLoader();
+            }
+        }
+                                                                        );
     }
 }

Modified: tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/serializer/EJBDSerializer.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/serializer/EJBDSerializer.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/serializer/EJBDSerializer.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/serializer/EJBDSerializer.java Thu Aug  8 08:57:43 2013
@@ -19,6 +19,8 @@ package org.apache.openejb.client.serial
 import java.io.Serializable;
 
 public interface EJBDSerializer {
+
     Serializable serialize(Object o);
+
     Object deserialize(Serializable o, Class<?> clazz);
 }

Modified: tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/serializer/SerializationWrapper.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/serializer/SerializationWrapper.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/serializer/SerializationWrapper.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/serializer/SerializationWrapper.java Thu Aug  8 08:57:43 2013
@@ -19,6 +19,7 @@ package org.apache.openejb.client.serial
 import java.io.Serializable;
 
 public class SerializationWrapper implements Serializable {
+
     private String classname;
     private Serializable data;
 

Modified: tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/util/ClassLoaderUtil.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/util/ClassLoaderUtil.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/util/ClassLoaderUtil.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/util/ClassLoaderUtil.java Thu Aug  8 08:57:43 2013
@@ -17,6 +17,7 @@
 package org.apache.openejb.client.util;
 
 public class ClassLoaderUtil {
+
     private ClassLoaderUtil() {
         // no-op
     }

Modified: tomee/tomee/trunk/server/openejb-client/src/main/java/org/openejb/client/RemoteInitialContextFactory.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/main/java/org/openejb/client/RemoteInitialContextFactory.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/main/java/org/openejb/client/RemoteInitialContextFactory.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/main/java/org/openejb/client/RemoteInitialContextFactory.java Thu Aug  8 08:57:43 2013
@@ -19,7 +19,9 @@ package org.openejb.client;
 
 /**
  * @version $Revision$ $Date$
- * @deprecated use org.apache.openejb.client.RemoteInitialContextFactory 
+ * @deprecated use org.apache.openejb.client.RemoteInitialContextFactory
  */
+@Deprecated
 public class RemoteInitialContextFactory extends org.apache.openejb.client.RemoteInitialContextFactory {
+
 }

Modified: tomee/tomee/trunk/server/openejb-client/src/main/java/org/openejb/client/TomcatEjbFactory.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/main/java/org/openejb/client/TomcatEjbFactory.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/main/java/org/openejb/client/TomcatEjbFactory.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/main/java/org/openejb/client/TomcatEjbFactory.java Thu Aug  8 08:57:43 2013
@@ -20,5 +20,7 @@ package org.openejb.client;
  * @version $Revision$ $Date$
  * @deprecated use org.apache.openejb.client.TomcatEjbFactory
  */
+@Deprecated
 public class TomcatEjbFactory extends org.apache.openejb.client.TomcatEjbFactory {
+
 }

Modified: tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ClientLoginTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ClientLoginTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ClientLoginTest.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ClientLoginTest.java Thu Aug  8 08:57:43 2013
@@ -25,6 +25,7 @@ import javax.security.auth.login.LoginCo
 import javax.security.auth.login.LoginException;
 
 public class ClientLoginTest extends TestCase {
+
     protected void setUp() throws Exception {
         super.setUp();
         LoginTestUtil.initialize();

Modified: tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ClientSecurityTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ClientSecurityTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ClientSecurityTest.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ClientSecurityTest.java Thu Aug  8 08:57:43 2013
@@ -24,6 +24,7 @@ import java.util.concurrent.CountDownLat
 import java.util.concurrent.TimeUnit;
 
 public class ClientSecurityTest extends TestCase {
+
     protected void setUp() throws Exception {
         super.setUp();
         LoginTestUtil.initialize();
@@ -33,25 +34,25 @@ public class ClientSecurityTest extends 
     }
 
     public void testDefaultStrategy() {
-        IdentityResolver identityResolver = ClientSecurity.getIdentityResolver();
+        final IdentityResolver identityResolver = ClientSecurity.getIdentityResolver();
         assertNotNull("identityResolver is null", identityResolver);
         assertTrue("identityResolver should be an instance of JaasIdentityResolver", identityResolver instanceof JaasIdentityResolver);
     }
 
     public void testSimpleStrategy() {
         System.setProperty(ClientSecurity.IDENTITY_RESOLVER_STRATEGY, "simple");
-        IdentityResolver identityResolver = ClientSecurity.getIdentityResolver();
+        final IdentityResolver identityResolver = ClientSecurity.getIdentityResolver();
         assertNotNull("identityResolver is null", identityResolver);
         assertTrue("identityResolver should be an instance of ClientSecurity.SimpleIdentityResolver", identityResolver instanceof ClientSecurity.SimpleIdentityResolver);
     }
 
     public void testJaasStrategy() {
         System.setProperty(ClientSecurity.IDENTITY_RESOLVER_STRATEGY, "jaas");
-        IdentityResolver identityResolver = ClientSecurity.getIdentityResolver();
+        final IdentityResolver identityResolver = ClientSecurity.getIdentityResolver();
         assertNotNull("identityResolver is null", identityResolver);
         assertTrue("identityResolver should be an instance of JaasIdentityResolver", identityResolver instanceof JaasIdentityResolver);
     }
-    
+
     public void testLogin() throws FailedLoginException {
         // setup the server response
         LoginTestUtil.setAuthGranted();
@@ -61,7 +62,7 @@ public class ClientSecurityTest extends 
 
         // Verify stored server request
         assertTrue("serverRequest should be an instance of AuthenticationRequest", LoginTestUtil.serverRequest instanceof AuthenticationRequest);
-        AuthenticationRequest authenticationRequest = (AuthenticationRequest) LoginTestUtil.serverRequest;
+        final AuthenticationRequest authenticationRequest = (AuthenticationRequest) LoginTestUtil.serverRequest;
         assertEquals("jonathan", authenticationRequest.getUsername());
         assertEquals("secret", authenticationRequest.getCredentials());
 
@@ -70,7 +71,7 @@ public class ClientSecurityTest extends 
 
         // verify we are using the simple client identity strategy
         assertTrue("ClientSecurity.getIdentityResolver() should be an instance of ClientSecurity.SimpleIdentityResolver",
-                ClientSecurity.getIdentityResolver() instanceof ClientSecurity.SimpleIdentityResolver);
+                   ClientSecurity.getIdentityResolver() instanceof ClientSecurity.SimpleIdentityResolver);
 
         // logout
         ClientSecurity.logout();
@@ -88,7 +89,7 @@ public class ClientSecurityTest extends 
         // Perform a thread scoped login using a new thread
         final CountDownLatch loginLatch = new CountDownLatch(1);
         final CountDownLatch loginVerifiedLatch = new CountDownLatch(1);
-        Thread loginThread = new Thread() {
+        final Thread loginThread = new Thread() {
             public void run() {
                 try {
                     // attempt a login
@@ -96,7 +97,7 @@ public class ClientSecurityTest extends 
 
                     // Verify stored server request
                     assertTrue("serverRequest should be an instance of AuthenticationRequest", LoginTestUtil.serverRequest instanceof AuthenticationRequest);
-                    AuthenticationRequest authenticationRequest = (AuthenticationRequest) LoginTestUtil.serverRequest;
+                    final AuthenticationRequest authenticationRequest = (AuthenticationRequest) LoginTestUtil.serverRequest;
                     assertEquals("jonathan", authenticationRequest.getUsername());
                     assertEquals("secret", authenticationRequest.getCredentials());
 
@@ -105,7 +106,7 @@ public class ClientSecurityTest extends 
 
                     // verify we are using the simple client identity strategy
                     assertTrue("ClientSecurity.getIdentityResolver() should be an instance of ClientSecurity.SimpleIdentityResolver",
-                            ClientSecurity.getIdentityResolver() instanceof ClientSecurity.SimpleIdentityResolver);
+                               ClientSecurity.getIdentityResolver() instanceof ClientSecurity.SimpleIdentityResolver);
 
                     // notify outer thread that we are logged in
                     loginLatch.countDown();
@@ -132,7 +133,6 @@ public class ClientSecurityTest extends 
         // verify we are not logged in
         assertNull("ClientSecurity.getIdentity() is not null", ClientSecurity.getIdentity());
 
-
         // notify the login thread that we are done with out verifications
         loginVerifiedLatch.countDown();
 
@@ -140,8 +140,12 @@ public class ClientSecurityTest extends 
         loginThread.join(5000);
 
         if (threadException != null) {
-            if (threadException instanceof Exception) throw (Exception) threadException;
-            if (threadException instanceof Error) throw (Error) threadException;
+            if (threadException instanceof Exception) {
+                throw (Exception) threadException;
+            }
+            if (threadException instanceof Error) {
+                throw (Error) threadException;
+            }
             throw new Error("login thread threw an exception", threadException);
         }
     }

Modified: tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ConnectionManagerTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ConnectionManagerTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ConnectionManagerTest.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ConnectionManagerTest.java Thu Aug  8 08:57:43 2013
@@ -16,16 +16,14 @@
  */
 package org.apache.openejb.client;
 
+import junit.framework.TestCase;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.URI;
-import java.util.Properties;
-
-import junit.framework.TestCase;
 
-
-public class ConnectionManagerTest extends TestCase{
+public class ConnectionManagerTest extends TestCase {
 
     public void testRegisterFactory() throws Exception {
         MockConnectionFactory connectionFactory = new MockConnectionFactory();
@@ -35,7 +33,7 @@ public class ConnectionManagerTest exten
 
         assertTrue(connection instanceof MockConnection);
     }
-    
+
     public static class MockConnectionFactory implements ConnectionFactory {
 
         public Connection getConnection(URI uri) throws IOException {
@@ -45,6 +43,7 @@ public class ConnectionManagerTest exten
     }
 
     private static class MockConnection implements Connection {
+
         public void close() throws IOException {
             throw new UnsupportedOperationException();
         }

Modified: tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/JaxWsProviderWrapperTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/JaxWsProviderWrapperTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/JaxWsProviderWrapperTest.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/JaxWsProviderWrapperTest.java Thu Aug  8 08:57:43 2013
@@ -74,7 +74,12 @@ public class JaxWsProviderWrapperTest ex
         }
 
         @Override
-        public W3CEndpointReference createW3CEndpointReference(final String address, final QName serviceName, final QName portName, final List<Element> metadata, final String wsdlDocumentLocation, final List<Element> referenceParameters) {
+        public W3CEndpointReference createW3CEndpointReference(final String address,
+                                                               final QName serviceName,
+                                                               final QName portName,
+                                                               final List<Element> metadata,
+                                                               final String wsdlDocumentLocation,
+                                                               final List<Element> referenceParameters) {
             return null;
         }
 

Modified: tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/JndiRequestTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/JndiRequestTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/JndiRequestTest.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/JndiRequestTest.java Thu Aug  8 08:57:43 2013
@@ -41,7 +41,6 @@ public class JndiRequestTest extends Tes
         assertEquals("JNDI Name not the same", expected.getRequestString(), actual.getRequestString());
     }
 
-
     public void testExternalize2() throws Exception {
         final JNDIRequest expected = new JNDIRequest(RequestMethodCode.JNDI_LOOKUP, "this/is/a/jndi/name");
         expected.setModuleId("foobar");
@@ -54,7 +53,6 @@ public class JndiRequestTest extends Tes
         assertEquals("JNDI Name not the same", expected.getRequestString(), actual.getRequestString());
     }
 
-
     private void externalize(final Externalizable original, final Externalizable copy) throws IOException, ClassNotFoundException {
         final ByteArrayOutputStream baos = new ByteArrayOutputStream();
         final ObjectOutputStream out = new ObjectOutputStream(baos);

Modified: tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/LoginTestUtil.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/LoginTestUtil.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/LoginTestUtil.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/LoginTestUtil.java Thu Aug  8 08:57:43 2013
@@ -22,6 +22,7 @@ import java.net.URLDecoder;
 import java.rmi.RemoteException;
 
 public class LoginTestUtil {
+
     public static Request serverRequest;
     public static AuthenticationResponse serverResponse;
 

Modified: tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/MainTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/MainTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/MainTest.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/MainTest.java Thu Aug  8 08:57:43 2013
@@ -19,23 +19,23 @@ package org.apache.openejb.client;
 
 import junit.framework.TestCase;
 
-import javax.naming.spi.InitialContextFactory;
-import javax.naming.spi.NamingManager;
-import javax.naming.spi.InitialContextFactoryBuilder;
+import javax.naming.Binding;
 import javax.naming.Context;
 import javax.naming.Name;
-import javax.naming.NamingException;
 import javax.naming.NameClassPair;
-import javax.naming.NamingEnumeration;
-import javax.naming.Binding;
-import javax.naming.NameParser;
 import javax.naming.NameNotFoundException;
+import javax.naming.NameParser;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.spi.InitialContextFactory;
+import javax.naming.spi.InitialContextFactoryBuilder;
+import javax.naming.spi.NamingManager;
 import javax.security.auth.Subject;
 import javax.security.auth.login.FailedLoginException;
+import java.security.AccessController;
 import java.util.Hashtable;
 import java.util.Map;
 import java.util.TreeMap;
-import java.security.AccessController;
 
 public class MainTest extends TestCase {
 
@@ -46,7 +46,7 @@ public class MainTest extends TestCase {
         }
     }
 
-    public static Map<String,Object> jndi = new TreeMap<String,Object>();
+    public static Map<String, Object> jndi = new TreeMap<String, Object>();
 
     protected void setUp() throws Exception {
         super.setUp();
@@ -64,7 +64,7 @@ public class MainTest extends TestCase {
         StaticUsernamePasswordCallbackHandler.setUsername("victoria");
         StaticUsernamePasswordCallbackHandler.setPassword("secret");
         LoginTestUtil.setAuthGranted();
-        
+
         jndi.put("java:info/mainClass", SecureMain.class.getName());
         Main.main(new String[0]);
     }
@@ -85,6 +85,7 @@ public class MainTest extends TestCase {
     }
 
     public static class SecureMain {
+
         public static void main(String[] args) {
             Subject subject = Subject.getSubject(AccessController.getContext());
 
@@ -106,6 +107,7 @@ public class MainTest extends TestCase {
     }
 
     public static class NormalMain {
+
         public static void main(String[] args) {
             Subject subject = Subject.getSubject(AccessController.getContext());
 
@@ -116,23 +118,25 @@ public class MainTest extends TestCase {
         }
     }
 
-
     //
     // Ignore these
     //
     public static class MockContextFactoryBuilder implements InitialContextFactoryBuilder {
+
         public InitialContextFactory createInitialContextFactory(Hashtable<?, ?> environment) throws NamingException {
             return new MockContextFactory();
         }
     }
 
     public static class MockContextFactory implements InitialContextFactory {
+
         public Context getInitialContext(Hashtable<?, ?> environment) throws NamingException {
             return new MockContext();
         }
     }
 
     public static class MockContext implements Context {
+
         public Object lookup(String name) throws NamingException {
             Object value = jndi.get(name);
             if (value == null) {

Modified: tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/OverlyStickyConnectionTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/OverlyStickyConnectionTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/OverlyStickyConnectionTest.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/OverlyStickyConnectionTest.java Thu Aug  8 08:57:43 2013
@@ -20,12 +20,12 @@ import junit.framework.TestCase;
 
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
 import java.io.ObjectOutputStream;
+import java.io.OutputStream;
 import java.net.URI;
 import java.util.Properties;
 

Modified: tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/RandomConnectionStrategyIteratorTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/RandomConnectionStrategyIteratorTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/RandomConnectionStrategyIteratorTest.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/RandomConnectionStrategyIteratorTest.java Thu Aug  8 08:57:43 2013
@@ -21,30 +21,24 @@ import org.junit.Test;
 
 import java.net.URI;
 import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Set;
 
 /**
  * @version $Rev$ $Date$
  */
 public class RandomConnectionStrategyIteratorTest {
 
-
     @Test
     public void test() throws Exception {
         final URI[] uris = uris(
-                "one://localhost:1243",
-                "two://localhost:1243",
-                "three://localhost:1243",
-                "four://localhost:1243");
+                                   "one://localhost:1243",
+                                   "two://localhost:1243",
+                                   "three://localhost:1243",
+                                   "four://localhost:1243");
 
         ClusterMetaData cluster = new ClusterMetaData(System.currentTimeMillis(), uris);
         Iterable<URI> iterable = new RandomConnectionStrategy().createIterable(cluster);
 
-
         List<URI> found = new ArrayList<URI>();
 
         for (URI uri : iterable) {
@@ -56,12 +50,12 @@ public class RandomConnectionStrategyIte
             Assert.assertTrue(found.contains(uri));
         }
 
-//        Assert.assertFalse(
-//                found.get(0).equals(uris[0]) &&
-//                found.get(1).equals(uris[1]) &&
-//                found.get(2).equals(uris[2]) &&
-//                found.get(3).equals(uris[3])
-//        );
+        //        Assert.assertFalse(
+        //                found.get(0).equals(uris[0]) &&
+        //                found.get(1).equals(uris[1]) &&
+        //                found.get(2).equals(uris[2]) &&
+        //                found.get(3).equals(uris[3])
+        //        );
     }
 
     private URI[] uris(String... strings) {

Modified: tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/RoundRobinConnectionStrategyIteratorTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/RoundRobinConnectionStrategyIteratorTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/RoundRobinConnectionStrategyIteratorTest.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/RoundRobinConnectionStrategyIteratorTest.java Thu Aug  8 08:57:43 2013
@@ -20,9 +20,7 @@ import org.junit.Assert;
 import org.junit.Test;
 
 import java.net.URI;
-import java.util.ArrayList;
 import java.util.Iterator;
-import java.util.List;
 import java.util.NoSuchElementException;
 
 /**
@@ -30,14 +28,13 @@ import java.util.NoSuchElementException;
  */
 public class RoundRobinConnectionStrategyIteratorTest {
 
-
     @Test
     public void test() throws Exception {
         final URI[] uris = uris(
-                "one://localhost:1243",
-                "two://localhost:1243",
-                "three://localhost:1243",
-                "four://localhost:1243");
+                                   "one://localhost:1243",
+                                   "two://localhost:1243",
+                                   "three://localhost:1243",
+                                   "four://localhost:1243");
 
         ClusterMetaData cluster = new ClusterMetaData(System.currentTimeMillis(), uris);
         Iterable<URI> iterable = new RoundRobinConnectionStrategy().createIterable(cluster);
@@ -74,7 +71,6 @@ public class RoundRobinConnectionStrateg
             Assert.assertEquals(uris[1], iterator.next());
         }
 
-
     }
 
     private URI[] uris(String... strings) {

Modified: tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ServerMetaDataTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ServerMetaDataTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ServerMetaDataTest.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ServerMetaDataTest.java Thu Aug  8 08:57:43 2013
@@ -16,10 +16,9 @@
  */
 package org.apache.openejb.client;
 
-import java.net.URI;
-
 import junit.framework.TestCase;
 
+import java.net.URI;
 
 public class ServerMetaDataTest extends TestCase {
 
@@ -30,5 +29,5 @@ public class ServerMetaDataTest extends 
         ServerMetaData server2 = new ServerMetaData(uri2, uri1);
         assertEquals(server1.buildHash(), server2.buildHash());
     }
-    
+
 }

Modified: tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/StickyConnectionStrategyIteratorTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/StickyConnectionStrategyIteratorTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/StickyConnectionStrategyIteratorTest.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/StickyConnectionStrategyIteratorTest.java Thu Aug  8 08:57:43 2013
@@ -27,19 +27,17 @@ import java.util.ArrayList;
  */
 public class StickyConnectionStrategyIteratorTest {
 
-
     @Test
     public void testRandom() throws Exception {
         final URI[] uris = uris(
-                "one://localhost:1243",
-                "two://localhost:1243",
-                "three://localhost:1243",
-                "four://localhost:1243");
+                                   "one://localhost:1243",
+                                   "two://localhost:1243",
+                                   "three://localhost:1243",
+                                   "four://localhost:1243");
 
         ClusterMetaData cluster = new ClusterMetaData(System.currentTimeMillis(), uris);
         Iterable<URI> iterable = new StickyConnectionStrategy(new RandomConnectionStrategy()).createIterable(cluster);
 
-
         assertIteration(uris, iterable);
 
         { // Stick to uri 2
@@ -68,7 +66,9 @@ public class StickyConnectionStrategyIte
         ArrayList<URI> found = new ArrayList<URI>();
 
         for (URI uri : iterable) {
-            if (!found.contains(uri)) found.add(uri);
+            if (!found.contains(uri)) {
+                found.add(uri);
+            }
         }
 
         Assert.assertEquals(uris.length, found.size());
@@ -77,15 +77,14 @@ public class StickyConnectionStrategyIte
             Assert.assertTrue(found.contains(uri));
         }
 
-//        Assert.assertTrue("Found: " + found + ", Expected: " + Arrays.asList(uris),
-//                found.get(0).equals(uris[0]) &&
-//                        found.get(1).equals(uris[1]) &&
-//                        found.get(2).equals(uris[2]) &&
-//                        found.get(3).equals(uris[3])
-//        );
+        //        Assert.assertTrue("Found: " + found + ", Expected: " + Arrays.asList(uris),
+        //                found.get(0).equals(uris[0]) &&
+        //                        found.get(1).equals(uris[1]) &&
+        //                        found.get(2).equals(uris[2]) &&
+        //                        found.get(3).equals(uris[3])
+        //        );
     }
 
-
     private URI[] uris(String... strings) {
         final URI[] uris = new URI[strings.length];
 

Modified: tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ThrowableArtifactTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ThrowableArtifactTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ThrowableArtifactTest.java (original)
+++ tomee/tomee/trunk/server/openejb-client/src/test/java/org/apache/openejb/client/ThrowableArtifactTest.java Thu Aug  8 08:57:43 2013
@@ -21,12 +21,12 @@ package org.apache.openejb.client;
 
 import junit.framework.TestCase;
 
+import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
-import java.io.PrintStream;
-import java.io.ObjectOutputStream;
-import java.io.ByteArrayInputStream;
 import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.PrintStream;
 
 public class ThrowableArtifactTest extends TestCase {
 
@@ -85,6 +85,7 @@ public class ThrowableArtifactTest exten
     }
 
     public static class BadException extends Exception {
+
         private final Object data = new NotSerializableObject();
 
         public BadException(String message, Throwable throwable) {
@@ -93,5 +94,6 @@ public class ThrowableArtifactTest exten
     }
 
     public static class NotSerializableObject {
+
     }
 }
\ No newline at end of file

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/BasicClusterableRequestHandler.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/BasicClusterableRequestHandler.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/BasicClusterableRequestHandler.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/BasicClusterableRequestHandler.java Thu Aug  8 08:57:43 2013
@@ -16,8 +16,6 @@
  */
 package org.apache.openejb.server.ejbd;
 
-import java.net.URI;
-
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.ClusteredRPCContainer;
 import org.apache.openejb.Container;
@@ -25,15 +23,20 @@ import org.apache.openejb.client.Cluster
 import org.apache.openejb.client.ClusterableResponse;
 import org.apache.openejb.client.ServerMetaData;
 
+import java.net.URI;
+
 public class BasicClusterableRequestHandler implements ClusterableRequestHandler {
 
-    public void updateServer(BeanContext beanContext, ClusterableRequest req, ClusterableResponse res) {
-        Container container = beanContext.getContainer();
+    @Override
+    public void updateServer(final BeanContext beanContext, final ClusterableRequest req, final ClusterableResponse res) {
+
+        final Container container = beanContext.getContainer();
+
         if (container instanceof ClusteredRPCContainer) {
-            ClusteredRPCContainer clusteredContainer = (ClusteredRPCContainer) container;
-            URI[] locations = clusteredContainer.getLocations(beanContext);
+            final ClusteredRPCContainer clusteredContainer = (ClusteredRPCContainer) container;
+            final URI[] locations = clusteredContainer.getLocations(beanContext);
             if (null != locations) {
-                ServerMetaData server = new ServerMetaData(locations);
+                final ServerMetaData server = new ServerMetaData(locations);
                 if (req.getServerHash() != server.buildHash()) {
                     res.setServer(server);
                 }

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/ClientObjectFactory.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/ClientObjectFactory.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/ClientObjectFactory.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/ClientObjectFactory.java Thu Aug  8 08:57:43 2013
@@ -68,7 +68,7 @@ class ClientObjectFactory implements org
         try {
             securityIdentity = call.getEJBRequest().getClientIdentity();
         } catch (Exception e) {
-
+            //Ignore
         }
         final ClientMetaData cMetaData = new ClientMetaData(securityIdentity);
         final EJBMetaDataImpl eMetaData = buildEjbMetaData(info, beanContext, idCode);
@@ -81,7 +81,7 @@ class ClientObjectFactory implements org
 
     private ServerMetaData getServerMetaData() {
         ServerMetaData serverMetaData = ClientObjectFactory.serverMetaData.get();
-        if (serverMetaData == null){
+        if (serverMetaData == null) {
             serverMetaData = defaultServerMetaData;
         }
         return serverMetaData;
@@ -145,15 +145,15 @@ class ClientObjectFactory implements org
         }
         final ClientMetaData cMetaData = new ClientMetaData(securityIdentity);
         final EJBMetaDataImpl eMetaData = new EJBMetaDataImpl(null, null,
-                beanContext.getPrimaryKeyClass(),
-                beanContext.getComponentType().toString(),
-                beanContext.getDeploymentID().toString(),
-                idCode,
-                convert(info.getInterfaceType()),
-                info.getInterfaces(),
-                beanContext.getAsynchronousMethodSignatures());
+                                                              beanContext.getPrimaryKeyClass(),
+                                                              beanContext.getComponentType().toString(),
+                                                              beanContext.getDeploymentID().toString(),
+                                                              idCode,
+                                                              convert(info.getInterfaceType()),
+                                                              info.getInterfaces(),
+                                                              beanContext.getAsynchronousMethodSignatures());
         eMetaData.loadProperties(beanContext.getProperties());
-        
+
         final Object primKey = info.getPrimaryKey();
 
         final EJBObjectHandler hanlder = EJBObjectHandler.createEJBObjectHandler(eMetaData, getServerMetaData(), cMetaData, primKey, null);
@@ -163,14 +163,22 @@ class ClientObjectFactory implements org
 
     public static InterfaceType convert(final org.apache.openejb.InterfaceType type) {
         switch (type) {
-            case EJB_HOME: return InterfaceType.EJB_HOME;
-            case EJB_OBJECT: return InterfaceType.EJB_OBJECT;
-            case EJB_LOCAL_HOME: return InterfaceType.EJB_LOCAL_HOME;
-            case EJB_LOCAL: return InterfaceType.EJB_LOCAL;
-            case BUSINESS_LOCAL: return InterfaceType.BUSINESS_LOCAL;
-            case BUSINESS_LOCAL_HOME: return InterfaceType.BUSINESS_LOCAL_HOME;
-            case BUSINESS_REMOTE: return InterfaceType.BUSINESS_REMOTE;
-            case BUSINESS_REMOTE_HOME: return InterfaceType.BUSINESS_REMOTE_HOME;
+            case EJB_HOME:
+                return InterfaceType.EJB_HOME;
+            case EJB_OBJECT:
+                return InterfaceType.EJB_OBJECT;
+            case EJB_LOCAL_HOME:
+                return InterfaceType.EJB_LOCAL_HOME;
+            case EJB_LOCAL:
+                return InterfaceType.EJB_LOCAL;
+            case BUSINESS_LOCAL:
+                return InterfaceType.BUSINESS_LOCAL;
+            case BUSINESS_LOCAL_HOME:
+                return InterfaceType.BUSINESS_LOCAL_HOME;
+            case BUSINESS_REMOTE:
+                return InterfaceType.BUSINESS_REMOTE;
+            case BUSINESS_REMOTE_HOME:
+                return InterfaceType.BUSINESS_REMOTE_HOME;
         }
         return null;
     }
@@ -198,14 +206,14 @@ class ClientObjectFactory implements org
 
     private EJBMetaDataImpl buildEjbMetaData(final ProxyInfo info, final BeanContext beanContext, final int idCode) {
         final EJBMetaDataImpl eMetaData = new EJBMetaDataImpl(beanContext.getHomeInterface(),
-                beanContext.getRemoteInterface(),
-                beanContext.getPrimaryKeyClass(),
-                beanContext.getComponentType().toString(),
-                beanContext.getDeploymentID().toString(),
-                idCode,
-                convert(info.getInterfaceType()),
-                info.getInterfaces(),
-                beanContext.getAsynchronousMethodSignatures());
+                                                              beanContext.getRemoteInterface(),
+                                                              beanContext.getPrimaryKeyClass(),
+                                                              beanContext.getComponentType().toString(),
+                                                              beanContext.getDeploymentID().toString(),
+                                                              idCode,
+                                                              convert(info.getInterfaceType()),
+                                                              info.getInterfaces(),
+                                                              beanContext.getAsynchronousMethodSignatures());
         eMetaData.loadProperties(beanContext.getProperties());
         return eMetaData;
     }

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/ClusterableRequestHandler.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/ClusterableRequestHandler.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/ClusterableRequestHandler.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/ClusterableRequestHandler.java Thu Aug  8 08:57:43 2013
@@ -21,5 +21,6 @@ import org.apache.openejb.client.Cluster
 import org.apache.openejb.client.ClusterableResponse;
 
 public interface ClusterableRequestHandler {
+
     void updateServer(BeanContext beanContext, ClusterableRequest req, ClusterableResponse res);
 }

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/DeploymentIndex.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/DeploymentIndex.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/DeploymentIndex.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/DeploymentIndex.java Thu Aug  8 08:57:43 2013
@@ -16,14 +16,14 @@
  */
 package org.apache.openejb.server.ejbd;
 
-import java.rmi.RemoteException;
-import java.util.HashMap;
-import java.util.Map;
-
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.client.EJBRequest;
 import org.apache.openejb.util.Messages;
 
+import java.rmi.RemoteException;
+import java.util.HashMap;
+import java.util.Map;
+
 public class DeploymentIndex {
 
     Messages messages = new Messages("org.apache.openejb.server.ejbd");
@@ -32,24 +32,24 @@ public class DeploymentIndex {
 
     Map index = null;
 
-    public DeploymentIndex(BeanContext[] beanContexts) {
-        BeanContext[] ds = beanContexts;
+    @SuppressWarnings("unchecked")
+    public DeploymentIndex(final BeanContext[] beanContexts) {
 
-        deployments = new BeanContext[ ds.length + 1 ];
+        deployments = new BeanContext[beanContexts.length + 1];
 
-        System.arraycopy(ds, 0, deployments, 1, ds.length);
+        System.arraycopy(beanContexts, 0, deployments, 1, beanContexts.length);
 
         index = new HashMap(deployments.length);
         for (int i = 1; i < deployments.length; i++) {
-            index.put(deployments[i].getDeploymentID(), new Integer(i));
+            index.put(deployments[i].getDeploymentID(), i);
         }
     }
 
-    public BeanContext getDeployment(EJBRequest req) throws RemoteException {
+    public BeanContext getDeployment(final EJBRequest req) throws RemoteException {
 
-        BeanContext info = null;
+        final BeanContext info;
 
-        int deploymentCode = req.getDeploymentCode();
+        final int deploymentCode = req.getDeploymentCode();
         if (deploymentCode > 0 && deploymentCode < deployments.length) {
             info = deployments[deploymentCode];
             req.setDeploymentId((String) info.getDeploymentID());
@@ -60,7 +60,7 @@ public class DeploymentIndex {
             throw new RemoteException(messages.format("invalidDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode()));
         }
 
-        int idCode = getDeploymentIndex(req.getDeploymentId());
+        final int idCode = getDeploymentIndex(req.getDeploymentId());
         if (idCode == -1) {
             throw new RemoteException(messages.format("noSuchDeploymentIdAndCode", req.getDeploymentId(), req.getDeploymentCode()));
         }
@@ -73,25 +73,25 @@ public class DeploymentIndex {
         return deployments[req.getDeploymentCode()];
     }
 
-    public int getDeploymentIndex(BeanContext deployment) {
+    public int getDeploymentIndex(final BeanContext deployment) {
         return getDeploymentIndex((String) deployment.getDeploymentID());
     }
 
-    public int getDeploymentIndex(String deploymentID) {
-        Integer idCode = (Integer) index.get(deploymentID);
+    public int getDeploymentIndex(final String deploymentID) {
+        final Integer idCode = (Integer) index.get(deploymentID);
 
-        return (idCode == null) ? -1 : idCode.intValue();
+        return (idCode == null) ? -1 : idCode;
     }
 
-    public BeanContext getDeployment(String deploymentID) {
+    public BeanContext getDeployment(final String deploymentID) {
         return getDeployment(getDeploymentIndex(deploymentID));
     }
 
-    public BeanContext getDeployment(Integer index) {
+    public BeanContext getDeployment(final Integer index) {
         return (index == null) ? null : getDeployment(index.intValue());
     }
 
-    public BeanContext getDeployment(int index) {
+    public BeanContext getDeployment(final int index) {
         return deployments[index];
     }
 }

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/KeepAliveServer.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/KeepAliveServer.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/KeepAliveServer.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/KeepAliveServer.java Thu Aug  8 08:57:43 2013
@@ -84,12 +84,14 @@ public class KeepAliveServer implements 
         }
 
         final BlockingQueue<Runnable> queue = this.getQueue();
-        if (queue == null)
+        if (queue == null) {
             return;
+        }
 
         int backlog = queue.size();
-        if (backlog <= 0)
+        if (backlog <= 0) {
             return;
+        }
 
         final long now = System.currentTimeMillis();
 
@@ -119,8 +121,9 @@ public class KeepAliveServer implements 
                 }
             }
 
-            if (backlog <= 0)
+            if (backlog <= 0) {
                 return;
+            }
         }
     }
 

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/ServerSideResolver.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/ServerSideResolver.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/ServerSideResolver.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/ServerSideResolver.java Thu Aug  8 08:57:43 2013
@@ -17,18 +17,18 @@
 package org.apache.openejb.server.ejbd;
 
 import org.apache.openejb.BeanContext;
-import org.apache.openejb.client.EJBHomeProxyHandle;
+import org.apache.openejb.InterfaceType;
 import org.apache.openejb.client.EJBHomeHandler;
+import org.apache.openejb.client.EJBHomeProxyHandle;
 import org.apache.openejb.client.EJBMetaDataImpl;
-import org.apache.openejb.client.EJBObjectProxyHandle;
 import org.apache.openejb.client.EJBObjectHandler;
-import org.apache.openejb.InterfaceType;
-import org.apache.openejb.util.LogCategory;
-import org.apache.openejb.util.Logger;
+import org.apache.openejb.client.EJBObjectProxyHandle;
 import org.apache.openejb.core.ivm.EjbHomeProxyHandler;
 import org.apache.openejb.core.ivm.EjbObjectProxyHandler;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.spi.ContainerSystem;
+import org.apache.openejb.util.LogCategory;
+import org.apache.openejb.util.Logger;
 
 import java.util.ArrayList;
 
@@ -37,50 +37,58 @@ import java.util.ArrayList;
  */
 public class ServerSideResolver implements EJBHomeProxyHandle.Resolver, EJBObjectProxyHandle.Resolver {
 
-    private static Logger logger = Logger.getInstance(LogCategory.OPENEJB_SERVER_REMOTE, "org.apache.openejb.server.util.resources");
-
-    public Object resolve(EJBHomeHandler handler) {
+    @Override
+    public Object resolve(final EJBHomeHandler handler) {
         try {
-            EJBMetaDataImpl ejb = handler.getEjb();
+            final EJBMetaDataImpl ejb = handler.getEjb();
 
-            InterfaceType interfaceType = (ejb.getRemoteInterfaceClass() == null)? InterfaceType.BUSINESS_REMOTE_HOME : InterfaceType.EJB_HOME;
+            final InterfaceType interfaceType = (ejb.getRemoteInterfaceClass() == null) ? InterfaceType.BUSINESS_REMOTE_HOME : InterfaceType.EJB_HOME;
 
-            ArrayList<Class> interfaces = new ArrayList<Class>();
-            if (interfaceType.isBusiness()){
+            final ArrayList<Class> interfaces = new ArrayList<Class>();
+            if (interfaceType.isBusiness()) {
                 interfaces.addAll(ejb.getBusinessClasses());
             } else {
                 interfaces.add(ejb.getRemoteInterfaceClass());
             }
 
-            ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class);
-            BeanContext beanContext = containerSystem.getBeanContext(ejb.getDeploymentID());
+            final ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class);
+            final BeanContext beanContext = containerSystem.getBeanContext(ejb.getDeploymentID());
 
             return EjbHomeProxyHandler.createHomeProxy(beanContext, interfaceType, interfaces, ejb.getMainInterface());
         } catch (Exception e) {
-            logger.error("ServerSideResolver.resolve() failed, falling back to ClientSideResolver: "+e.getClass().getName()+": "+e.getMessage(), e );
+            Logger.getInstance(LogCategory.OPENEJB_SERVER_REMOTE, "org.apache.openejb.server.util.resources")
+                  .error("ServerSideResolver.resolve() failed, falling back to ClientSideResolver: " +
+                         e.getClass().getName() +
+                         ": " +
+                         e.getMessage(), e);
             return new EJBHomeProxyHandle.ClientSideResovler().resolve(handler);
         }
     }
 
-    public Object resolve(EJBObjectHandler handler) {
+    @Override
+    public Object resolve(final EJBObjectHandler handler) {
         try {
-            EJBMetaDataImpl ejb = handler.getEjb();
+            final EJBMetaDataImpl ejb = handler.getEjb();
 
-            InterfaceType interfaceType = (ejb.getRemoteInterfaceClass() == null)? InterfaceType.BUSINESS_REMOTE_HOME : InterfaceType.EJB_HOME;
+            final InterfaceType interfaceType = (ejb.getRemoteInterfaceClass() == null) ? InterfaceType.BUSINESS_REMOTE_HOME : InterfaceType.EJB_HOME;
 
-            ArrayList<Class> interfaces = new ArrayList<Class>();
-            if (interfaceType.isBusiness()){
+            final ArrayList<Class> interfaces = new ArrayList<Class>();
+            if (interfaceType.isBusiness()) {
                 interfaces.addAll(ejb.getBusinessClasses());
             } else {
                 interfaces.add(ejb.getRemoteInterfaceClass());
             }
 
-            ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class);
-            BeanContext beanContext = containerSystem.getBeanContext(ejb.getDeploymentID());
+            final ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class);
+            final BeanContext beanContext = containerSystem.getBeanContext(ejb.getDeploymentID());
 
             return EjbObjectProxyHandler.createProxy(beanContext, handler.getPrimaryKey(), interfaceType, interfaces, ejb.getMainInterface());
         } catch (Exception e) {
-            logger.error("ServerSideResolver.resolve() failed, falling back to ClientSideResolver: "+e.getClass().getName()+": "+e.getMessage(), e );
+            Logger.getInstance(LogCategory.OPENEJB_SERVER_REMOTE, "org.apache.openejb.server.util.resources")
+                  .error("ServerSideResolver.resolve() failed, falling back to ClientSideResolver: " +
+                         e.getClass().getName() +
+                         ": " +
+                         e.getMessage(), e);
             return new EJBObjectProxyHandle.ClientSideResovler().resolve(handler);
         }
     }

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/AuthTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/AuthTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/AuthTest.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/AuthTest.java Thu Aug  8 08:57:43 2013
@@ -18,10 +18,9 @@ package org.apache.openejb;
 
 import junit.framework.TestCase;
 import org.apache.openejb.config.DeploymentsResolver;
-import org.apache.openejb.server.ejbd.EjbServer;
-import org.apache.openejb.server.ServiceDaemon;
 import org.apache.openejb.core.ServerFederation;
-import org.apache.openejb.loader.SystemInstance;
+import org.apache.openejb.server.ServiceDaemon;
+import org.apache.openejb.server.ejbd.EjbServer;
 
 import javax.naming.Context;
 import javax.naming.InitialContext;
@@ -32,6 +31,7 @@ import java.util.Properties;
  * @version $Rev$ $Date$
  */
 public class AuthTest extends TestCase {
+
     public void test() throws Exception {
         EjbServer ejbServer = new EjbServer();
 
@@ -45,7 +45,6 @@ public class AuthTest extends TestCase {
 
         int port = serviceDaemon.getPort();
 
-
         try {
 
             // good creds
@@ -57,7 +56,6 @@ public class AuthTest extends TestCase {
             props.put(Context.SECURITY_CREDENTIALS, "bar");
             new InitialContext(props);
 
-
             try {
                 props.put(Context.SECURITY_PRINCIPAL, "alfred");
                 props.put(Context.SECURITY_CREDENTIALS, "doesnotexist");

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/AuthentWithRequestTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/AuthentWithRequestTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/AuthentWithRequestTest.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/AuthentWithRequestTest.java Thu Aug  8 08:57:43 2013
@@ -51,6 +51,7 @@ import static org.junit.Assert.assertNot
 import static org.junit.Assert.assertNull;
 
 public class AuthentWithRequestTest {
+
     @BeforeClass
     public static void initJAAS() {
         System.setProperty("java.security.auth.login.config", AuthentWithRequestTest.class.getResource("/login.config").getFile());
@@ -83,13 +84,13 @@ public class AuthentWithRequestTest {
         try {
 
             final Context context = new InitialContext(new PropertiesBuilder()
-                    .p(Context.INITIAL_CONTEXT_FACTORY, RemoteInitialContextFactory.class.getName())
-                    .p(Context.PROVIDER_URL, "ejbd://127.0.0.1:" + port)
-                    .p(JNDIContext.AUTHENTICATE_WITH_THE_REQUEST, "true")
-                    .p("java.naming.security.principal", "foo")
-                    .p("java.naming.security.credentials", "bar")
-                    .p("openejb.authentication.realmName", "LM")
-                    .build());
+                                                           .p(Context.INITIAL_CONTEXT_FACTORY, RemoteInitialContextFactory.class.getName())
+                                                           .p(Context.PROVIDER_URL, "ejbd://127.0.0.1:" + port)
+                                                           .p(JNDIContext.AUTHENTICATE_WITH_THE_REQUEST, "true")
+                                                           .p("java.naming.security.principal", "foo")
+                                                           .p("java.naming.security.credentials", "bar")
+                                                           .p("openejb.authentication.realmName", "LM")
+                                                           .build());
             final AnInterfaceRemote client = AnInterfaceRemote.class.cast(context.lookup("RemoteWithSecurityRemote"));
             assertNotNull(client);
 
@@ -102,11 +103,13 @@ public class AuthentWithRequestTest {
 
     @Remote
     public static interface AnInterfaceRemote {
+
         String call();
     }
 
     @Stateless
     public static class RemoteWithSecurity implements AnInterfaceRemote {
+
         private static ThreadLocal<String> name = new ThreadLocal<String>();
 
         @Override
@@ -116,6 +119,7 @@ public class AuthentWithRequestTest {
     }
 
     public static class MyLoginModule implements LoginModule {
+
         private CallbackHandler callbackHandler;
 
         @Override
@@ -129,7 +133,7 @@ public class AuthentWithRequestTest {
 
             final NameCallback nameCallback = new NameCallback("name?", "dummy");
             try {
-                callbackHandler.handle(new Callback[] { nameCallback });
+                callbackHandler.handle(new Callback[]{nameCallback});
             } catch (final Exception e) {
                 throw new LoginException(e.getMessage());
             }

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/JndiTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/JndiTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/JndiTest.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/JndiTest.java Thu Aug  8 08:57:43 2013
@@ -17,33 +17,31 @@
 package org.apache.openejb;
 
 import junit.framework.TestCase;
-import org.apache.openejb.config.DeploymentsResolver;
-import org.apache.openejb.server.ejbd.EjbServer;
-import org.apache.openejb.server.ServiceDaemon;
-import org.apache.openejb.core.ServerFederation;
-import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.assembler.classic.Assembler;
 import org.apache.openejb.config.ConfigurationFactory;
+import org.apache.openejb.config.DeploymentsResolver;
+import org.apache.openejb.core.ServerFederation;
 import org.apache.openejb.jee.EjbJar;
 import org.apache.openejb.jee.StatelessBean;
+import org.apache.openejb.loader.SystemInstance;
+import org.apache.openejb.server.ServiceDaemon;
+import org.apache.openejb.server.ejbd.EjbServer;
 
+import javax.ejb.Remote;
+import javax.naming.Binding;
 import javax.naming.Context;
 import javax.naming.InitialContext;
-import javax.naming.NamingException;
 import javax.naming.NameClassPair;
 import javax.naming.NamingEnumeration;
-import javax.naming.Binding;
-import javax.ejb.Remote;
-import java.util.Properties;
-import java.util.Collections;
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Properties;
 
 /**
  * @version $Rev$ $Date$
  */
 public class JndiTest extends TestCase {
+
     public void test() throws Exception {
         EjbServer ejbServer = new EjbServer();
 
@@ -137,8 +135,10 @@ public class JndiTest extends TestCase {
 
     @Remote
     public static interface FruitRemote {
+
     }
 
     public static class Fruit implements FruitRemote {
+
     }
 }

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/RemoteiTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/RemoteiTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/RemoteiTest.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/RemoteiTest.java Thu Aug  8 08:57:43 2013
@@ -24,15 +24,14 @@ import org.apache.openejb.server.Service
 import org.apache.openejb.server.ServiceException;
 import org.apache.openejb.server.ejbd.EjbServer;
 import org.apache.openejb.test.TestManager;
-import org.apache.openejb.test.singleton.SingletonTestSuite;
 import org.apache.openejb.test.entity.bmp.BmpTestSuite;
 import org.apache.openejb.test.entity.cmp.CmpTestSuite;
+import org.apache.openejb.test.singleton.SingletonTestSuite;
 import org.apache.openejb.test.stateful.StatefulTestSuite;
 import org.apache.openejb.test.stateless.StatelessTestSuite;
 
-import java.util.Properties;
-
 import javax.naming.Context;
+import java.util.Properties;
 
 /**
  * To run from intellij or another IDE add
@@ -45,7 +44,7 @@ public class RemoteiTest extends org.apa
 
     protected void setUp() throws Exception {
         System.setProperty("openejb.test.server", EjbTestServer.class.getName());
-//        System.setProperty("openejb.test.database", org.apache.openejb.test.DerbyTestDatabase.class.getName());
+        //        System.setProperty("openejb.test.database", org.apache.openejb.test.DerbyTestDatabase.class.getName());
         System.setProperty("openejb.test.database", org.apache.openejb.test.HsqldbTestDatabase.class.getName());
         System.setProperty("openejb.deployments.classpath.ear", "false");
         TestManager.init(null);
@@ -64,11 +63,12 @@ public class RemoteiTest extends org.apa
         suite.addTest(StatefulTestSuite.suite());
         suite.addTest(BmpTestSuite.suite());
         suite.addTest(CmpTestSuite.suite());
-//        suite.addTest(Cmp2TestSuite.suite());
+        //        suite.addTest(Cmp2TestSuite.suite());
         return suite;
     }
 
     public static class EjbTestServer implements org.apache.openejb.test.TestServer {
+
         private ServiceDaemon serviceDaemon;
         private int port;
 
@@ -81,7 +81,7 @@ public class RemoteiTest extends org.apa
                 props.put("openejb.deployments.classpath.include", ".*openejb-itests-beans.*");
                 // ...and have the openejb-itests-beans included in the deployments (it's a system app)
                 props.put("openejb.deployments.classpath.filter.systemapps", "false");
-//                props.put("openejb.debuggable-vm-hackery", "true");
+                //                props.put("openejb.debuggable-vm-hackery", "true");
                 OpenEJB.init(props, new ServerFederation());
                 ejbServer.init(props);
 

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/SerializerTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/SerializerTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/SerializerTest.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/SerializerTest.java Thu Aug  8 08:57:43 2013
@@ -45,6 +45,7 @@ import static org.junit.Assert.assertNot
 import static org.junit.Assert.assertThat;
 
 public class SerializerTest {
+
     @Test
     public void invoke() throws Exception {
         invokeRemote(new Properties() {{
@@ -104,11 +105,13 @@ public class SerializerTest {
 
     @Remote
     public static interface AnInterfaceRemote {
+
         OutputNotSerializable call(InputNotSerilizable input);
     }
 
     @Stateless
     public static class AnEjbRemote implements AnInterfaceRemote {
+
         @Override
         public OutputNotSerializable call(InputNotSerilizable input) {
             return new OutputNotSerializable(input.rename);
@@ -116,6 +119,7 @@ public class SerializerTest {
     }
 
     public static class InputNotSerilizable {
+
         public String rename;
 
         public InputNotSerilizable(final String cloud) {
@@ -124,6 +128,7 @@ public class SerializerTest {
     }
 
     public static class OutputNotSerializable {
+
         public String name;
 
         public OutputNotSerializable(final String rename) {
@@ -132,6 +137,7 @@ public class SerializerTest {
     }
 
     public static class MySerializer implements EJBDSerializer {
+
         @Override
         public Serializable serialize(final Object o) {
             if (InputNotSerilizable.class.isInstance(o)) {

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/AppClientTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/AppClientTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/AppClientTest.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/AppClientTest.java Thu Aug  8 08:57:43 2013
@@ -50,7 +50,6 @@ import java.util.Properties;
  */
 public class AppClientTest extends TestCase {
 
-
     public void test() throws Exception {
 
         final EjbServer ejbServer = new EjbServer();
@@ -89,7 +88,7 @@ public class AppClientTest extends TestC
         props.put("java.naming.factory.initial", "org.apache.openejb.client.RemoteInitialContextFactory");
         props.put("java.naming.provider.url", "ejbd://127.0.0.1:" + port);
         props.put("openejb.client.moduleId", "orange-client");
-        
+
         Context context = new InitialContext(props);
 
         final Object home = context.lookup("comp/env/home");
@@ -106,8 +105,8 @@ public class AppClientTest extends TestC
 
         final Object dataSourceObject = context.lookup("comp/env/datasource");
         assertTrue(dataSourceObject instanceof DataSource);
-//        DataSource dataSource = (DataSource) dataSourceObject;
-//        assertEquals("nap", orangeBusinessRemote.echo("pan"));
+        //        DataSource dataSource = (DataSource) dataSourceObject;
+        //        assertEquals("nap", orangeBusinessRemote.echo("pan"));
 
         props.put("openejb.client.moduleId", "openejb/global");
         context = new InitialContext(props);
@@ -119,14 +118,17 @@ public class AppClientTest extends TestC
     }
 
     public static interface OrangeHome extends EJBHome {
+
         OrangeRemote create() throws RemoteException, CreateException;
     }
 
     public static interface OrangeRemote extends EJBObject {
+
         public String echo(String string) throws RemoteException;
     }
 
     public static interface OrangeBusinessRemote {
+
         public String echo(String string);
 
     }
@@ -134,6 +136,7 @@ public class AppClientTest extends TestC
     @RemoteHome(OrangeHome.class)
     @Remote(OrangeBusinessRemote.class)
     public static class Orange implements OrangeBusinessRemote {
+
         @Override
         public String echo(String string) {
             return new StringBuilder(string).reverse().toString();

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/BasicClusterableRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/BasicClusterableRequestHandlerTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/BasicClusterableRequestHandlerTest.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/BasicClusterableRequestHandlerTest.java Thu Aug  8 08:57:43 2013
@@ -45,7 +45,21 @@ public class BasicClusterableRequestHand
         request = (ClusterableRequest) mock(ClusterableRequest.class);
         response = (ClusterableResponse) mock(ClusterableResponse.class);
         clusteredContainer = (ClusteredRPCContainer) mock(ClusteredRPCContainer.class);
-        beanContext = new BeanContext("aDeploymentId", null, new ModuleContext("", null, "", new AppContext("", SystemInstance.get(), null, null, null, false), null, null), BasicClusterableRequestHandlerTest.class, null, null, null, null, null, null, null, null, null, null, false);
+        beanContext = new BeanContext("aDeploymentId",
+                                      null,
+                                      new ModuleContext("", null, "", new AppContext("", SystemInstance.get(), null, null, null, false), null, null),
+                                      BasicClusterableRequestHandlerTest.class,
+                                      null,
+                                      null,
+                                      null,
+                                      null,
+                                      null,
+                                      null,
+                                      null,
+                                      null,
+                                      null,
+                                      null,
+                                      false);
     }
 
     public void testNoOpWhenNotAClusteredContainer() throws Exception {

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/DeploymentIndexTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/DeploymentIndexTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/DeploymentIndexTest.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/DeploymentIndexTest.java Thu Aug  8 08:57:43 2013
@@ -40,7 +40,21 @@ public class DeploymentIndexTest {
     @Before
     public void setUp() throws SystemException {
         method = Method.class.getMethods()[0];
-        beanContext = new BeanContext("aDeploymentId", null, new ModuleContext("", null, "", new AppContext("", SystemInstance.get(), null, null, null, false), null, null), DeploymentIndexTest.class, null, null, null, null, null, null, null, null, null, null, false);
+        beanContext = new BeanContext("aDeploymentId",
+                                      null,
+                                      new ModuleContext("", null, "", new AppContext("", SystemInstance.get(), null, null, null, false), null, null),
+                                      DeploymentIndexTest.class,
+                                      null,
+                                      null,
+                                      null,
+                                      null,
+                                      null,
+                                      null,
+                                      null,
+                                      null,
+                                      null,
+                                      null,
+                                      false);
         deploymentIndex = new DeploymentIndex(new BeanContext[]{beanContext, beanContext});
     }
 

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/DynamicConnectionStrategyTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/DynamicConnectionStrategyTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/DynamicConnectionStrategyTest.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/DynamicConnectionStrategyTest.java Thu Aug  8 08:57:43 2013
@@ -92,19 +92,21 @@ public class DynamicConnectionStrategyTe
         assertTrue(TestConnectionStrategy.called.get());
     }
 
-
     @Remote
     public static interface Widget {
+
         public Object echo(Object o);
     }
 
     public static class WidgetBean implements Widget {
+
         public Object echo(Object o) {
             return o;
         }
     }
 
     public static class TestConnectionStrategy implements ConnectionStrategy {
+
         public static final AtomicBoolean called = new AtomicBoolean();
 
         private final StickyConnectionStrategy strategy = new StickyConnectionStrategy();

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/FailoverConnectionFactoryTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/FailoverConnectionFactoryTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/FailoverConnectionFactoryTest.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/FailoverConnectionFactoryTest.java Thu Aug  8 08:57:43 2013
@@ -92,19 +92,21 @@ public class FailoverConnectionFactoryTe
         assertTrue(TestConnectionStrategy.called.get());
     }
 
-
     @Remote
     public static interface Widget {
+
         public Object echo(Object o);
     }
 
     public static class WidgetBean implements Widget {
+
         public Object echo(Object o) {
             return o;
         }
     }
 
     public static class TestConnectionStrategy implements ConnectionStrategy {
+
         public static final AtomicBoolean called = new AtomicBoolean();
 
         private final StickyConnectionStrategy strategy = new StickyConnectionStrategy();

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/FullPoolFailoverTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/FullPoolFailoverTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/FullPoolFailoverTest.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/FullPoolFailoverTest.java Thu Aug  8 08:57:43 2013
@@ -18,36 +18,36 @@ package org.apache.openejb.server.ejbd;
 
 import junit.framework.TestCase;
 import org.apache.openejb.OpenEJB;
-import org.apache.openejb.client.Client;
-import org.apache.openejb.util.CountingLatch;
 import org.apache.openejb.assembler.classic.Assembler;
 import org.apache.openejb.assembler.classic.StatelessSessionContainerInfo;
+import org.apache.openejb.client.Client;
 import org.apache.openejb.config.ConfigurationFactory;
 import org.apache.openejb.core.ServerFederation;
 import org.apache.openejb.jee.EjbJar;
 import org.apache.openejb.jee.StatelessBean;
 import org.apache.openejb.loader.SystemInstance;
-import org.apache.openejb.server.ServiceDaemon;
-import org.apache.openejb.server.ServicePool;
-import org.apache.openejb.server.ServerServiceFilter;
 import org.apache.openejb.server.ServerService;
+import org.apache.openejb.server.ServerServiceFilter;
+import org.apache.openejb.server.ServiceDaemon;
 import org.apache.openejb.server.ServiceException;
+import org.apache.openejb.server.ServicePool;
+import org.apache.openejb.util.CountingLatch;
 
+import javax.ejb.ConcurrentAccessTimeoutException;
 import javax.ejb.Remote;
 import javax.ejb.Stateless;
-import javax.ejb.ConcurrentAccessTimeoutException;
 import javax.naming.Context;
 import javax.naming.InitialContext;
-import java.util.Properties;
-import java.util.List;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
 import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
-import java.net.URI;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
 
 /**
  * @version $Rev$ $Date$
@@ -74,14 +74,14 @@ public class FullPoolFailoverTest extend
         paused = new CountingLatch(10);
 
         // Do a business method...
-        Runnable r = new Runnable(){
-        	public void run(){
+        Runnable r = new Runnable() {
+            public void run() {
                 counter.hit();
-        	}
+            }
         };
 
         hold.add(red);
-        
+
         for (int i = 0; i < 10; i++) {
             Thread t = new Thread(r);
             t.start();
@@ -101,7 +101,9 @@ public class FullPoolFailoverTest extend
         assertEquals(10, hits.size());
 
         List<URI> expected = new ArrayList<URI>();
-        for (int i = 0; i < 10; i++) expected.add(red);
+        for (int i = 0; i < 10; i++) {
+            expected.add(red);
+        }
 
         assertEquals(expected, hits);
 
@@ -148,10 +150,10 @@ public class FullPoolFailoverTest extend
         paused = new CountingLatch(10);
 
         // Do a business method...
-        Runnable r = new Runnable(){
-        	public void run(){
+        Runnable r = new Runnable() {
+            public void run() {
                 counter.hit();
-        	}
+            }
         };
 
         hold.add(red);
@@ -209,12 +211,13 @@ public class FullPoolFailoverTest extend
         resume.countDown(); // go
     }
 
-
     @Override
     protected void tearDown() throws Exception {
         super.tearDown();
 
-        for (ServiceDaemon daemon : daemons) daemon.stop();
+        for (ServiceDaemon daemon : daemons) {
+            daemon.stop();
+        }
 
         OpenEJB.destroy();
     }
@@ -234,7 +237,7 @@ public class FullPoolFailoverTest extend
 
         daemons.add(createServiceDaemon(connectionPoolSize, ejbServer, red));
         daemons.add(createServiceDaemon(connectionPoolSize, ejbServer, blue));
-        
+
         ConfigurationFactory config = new ConfigurationFactory();
         Assembler assembler = SystemInstance.get().getComponent(Assembler.class);
 
@@ -283,10 +286,10 @@ public class FullPoolFailoverTest extend
         return daemon;
     }
 
-
     public static ThreadLocal<URI> host = new ThreadLocal<URI>();
 
     public static class ServiceIdentifier extends ServerServiceFilter {
+
         private final URI me;
 
         public ServiceIdentifier(ServerService service, URI me) {
@@ -296,7 +299,7 @@ public class FullPoolFailoverTest extend
 
         @Override
         public void service(InputStream in, OutputStream out) throws ServiceException, IOException {
-            synchronized (hits){
+            synchronized (hits) {
                 hits.add(me);
             }
             host.set(me);
@@ -311,13 +314,14 @@ public class FullPoolFailoverTest extend
     public static Object lock = new Object[]{};
 
     private static void comment(String x) {
-//        synchronized(lock){
-//            System.out.println(x);
-//            System.out.flush();
-//        }
+        //        synchronized(lock){
+        //            System.out.println(x);
+        //            System.out.flush();
+        //        }
     }
 
     public static interface Counter {
+
         int count();
 
         URI hit();

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/PropertiesPropogationTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/PropertiesPropogationTest.java?rev=1511624&r1=1511623&r2=1511624&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/PropertiesPropogationTest.java (original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/PropertiesPropogationTest.java Thu Aug  8 08:57:43 2013
@@ -19,23 +19,23 @@ package org.apache.openejb.server.ejbd;
 import junit.framework.TestCase;
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.OpenEJB;
-import org.apache.openejb.spi.ContainerSystem;
-import org.apache.openejb.client.proxy.ProxyManager;
-import org.apache.openejb.client.proxy.InvocationHandler;
-import org.apache.openejb.client.EJBObjectHandler;
 import org.apache.openejb.assembler.classic.Assembler;
 import org.apache.openejb.assembler.classic.EjbJarInfo;
 import org.apache.openejb.assembler.classic.EnterpriseBeanInfo;
+import org.apache.openejb.client.EJBObjectHandler;
+import org.apache.openejb.client.proxy.InvocationHandler;
+import org.apache.openejb.client.proxy.ProxyManager;
 import org.apache.openejb.config.ConfigurationFactory;
 import org.apache.openejb.config.EjbModule;
 import org.apache.openejb.core.ServerFederation;
 import org.apache.openejb.jee.EjbJar;
 import org.apache.openejb.jee.StatelessBean;
-import org.apache.openejb.jee.oejb3.OpenejbJar;
 import org.apache.openejb.jee.oejb3.EjbDeployment;
+import org.apache.openejb.jee.oejb3.OpenejbJar;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.server.ServiceDaemon;
 import org.apache.openejb.server.ServicePool;
+import org.apache.openejb.spi.ContainerSystem;
 
 import javax.ejb.Remote;
 import javax.naming.Context;
@@ -81,7 +81,7 @@ public class PropertiesPropogationTest e
         assertTrue(beanInfo.properties.containsKey("openejb.client.color"));
         assertEquals("orange", beanInfo.properties.get("color"));
         assertEquals("red", beanInfo.properties.get("openejb.client.color"));
-        
+
         assembler.createApplication(ejbJarInfo);
 
         ContainerSystem cs = SystemInstance.get().getComponent(ContainerSystem.class);
@@ -94,7 +94,6 @@ public class PropertiesPropogationTest e
         assertEquals("orange", info.getProperties().get("color"));
         assertEquals("red", info.getProperties().get("openejb.client.color"));
 
-
         Properties props = new Properties();
         props.put("java.naming.factory.initial", "org.apache.openejb.client.RemoteInitialContextFactory");
         props.put("java.naming.provider.url", "ejbd://127.0.0.1:" + port);
@@ -116,13 +115,14 @@ public class PropertiesPropogationTest e
         assertEquals("red", properties.getProperty("openejb.client.color"));
     }
 
-
     @Remote
     public static interface Widget {
+
         public Object echo(Object o);
     }
 
     public static class WidgetBean implements Widget {
+
         public Object echo(Object o) {
             return o;
         }



Mime
View raw message