tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1296892 [2/2] - in /openejb/trunk/openejb: arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/ arquillian-tomee/ziplock/src/main/java/org/apache/ziplock/ container/openejb-core/src/main/java/org/apa...
Date Sun, 04 Mar 2012 22:55:54 GMT
Modified: openejb/trunk/openejb/container/openejb-junit/src/main/java/org/apache/openejb/junit/context/OpenEjbTestContext.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-junit/src/main/java/org/apache/openejb/junit/context/OpenEjbTestContext.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-junit/src/main/java/org/apache/openejb/junit/context/OpenEjbTestContext.java (original)
+++ openejb/trunk/openejb/container/openejb-junit/src/main/java/org/apache/openejb/junit/context/OpenEjbTestContext.java Sun Mar  4 22:55:51 2012
@@ -17,6 +17,7 @@
 
 package org.apache.openejb.junit.context;
 
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.api.LocalClient;
 import org.apache.openejb.junit.ContextConfig;
 import org.apache.openejb.junit.Property;
@@ -124,13 +125,13 @@ public class OpenEjbTestContext implemen
             performInjections(testObj);
         }
         catch (IOException e) {
-            throw new RuntimeException("Failed to load configuration.", e);
+            throw new OpenEJBRuntimeException("Failed to load configuration.", e);
         }
         catch (NamingException e) {
-            throw new RuntimeException("Failed to configure object.", e);
+            throw new OpenEJBRuntimeException("Failed to configure object.", e);
         }
         catch (Exception e) {
-            throw new RuntimeException("Unknown error trying to configure object.", e);
+            throw new OpenEJBRuntimeException("Unknown error trying to configure object.", e);
         }
     }
 
@@ -326,7 +327,7 @@ public class OpenEjbTestContext implemen
                 field.set(testObj, injectValue);
             }
             catch (Exception e) {
-                throw new RuntimeException("Failed to inject on: " + clazz.getCanonicalName() + "." + field.getName(), e);
+                throw new OpenEJBRuntimeException("Failed to inject on: " + clazz.getCanonicalName() + "." + field.getName(), e);
             }
         }
     }

Modified: openejb/trunk/openejb/container/openejb-junit/src/test/java/org/apache/openejb/junit/context/ContextWrapperStatementTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-junit/src/test/java/org/apache/openejb/junit/context/ContextWrapperStatementTest.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-junit/src/test/java/org/apache/openejb/junit/context/ContextWrapperStatementTest.java (original)
+++ openejb/trunk/openejb/container/openejb-junit/src/test/java/org/apache/openejb/junit/context/ContextWrapperStatementTest.java Sun Mar  4 22:55:51 2012
@@ -16,12 +16,14 @@
  */
 package org.apache.openejb.junit.context;
 
+import org.apache.openejb.OpenEJBRuntimeException;
+import org.junit.Test;
+import org.junit.runners.model.Statement;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import org.junit.Test;
-import org.junit.runners.model.Statement;
 
 public class ContextWrapperStatementTest {
     private static boolean configuredInvoked = false;
@@ -55,7 +57,7 @@ public class ContextWrapperStatementTest
 
         public void configureTest(Object testObj) {
             if (fail) {
-                throw new RuntimeException("Fail");
+                throw new OpenEJBRuntimeException("Fail");
             }
 
             assertEquals(fakeTestObject, testObj);

Modified: openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/Files.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/Files.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/Files.java (original)
+++ openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/Files.java Sun Mar  4 22:55:51 2012
@@ -77,33 +77,33 @@ public class Files {
     }
 
     public static File exists(File file, String s) {
-        if (!file.exists()) throw new RuntimeException(s + " does not exist: " + file.getAbsolutePath());
+        if (!file.exists()) throw new FileRuntimeException(s + " does not exist: " + file.getAbsolutePath());
         return file;
     }
 
     public static File exists(File file) {
-        if (!file.exists()) throw new RuntimeException("Does not exist: " + file.getAbsolutePath());
+        if (!file.exists()) throw new FileRuntimeException("Does not exist: " + file.getAbsolutePath());
         return file;
     }
 
     public static File dir(File file) {
-        if (!file.isDirectory()) throw new RuntimeException("Not a directory: " + file.getAbsolutePath());
+        if (!file.isDirectory()) throw new FileRuntimeException("Not a directory: " + file.getAbsolutePath());
         return file;
     }
 
     public static File file(File file) {
         exists(file);
-        if (!file.isFile()) throw new RuntimeException("Not a file: " + file.getAbsolutePath());
+        if (!file.isFile()) throw new FileRuntimeException("Not a file: " + file.getAbsolutePath());
         return file;
     }
 
     public static File writable(File file) {
-        if (!file.canWrite()) throw new RuntimeException("Not writable: " + file.getAbsolutePath());
+        if (!file.canWrite()) throw new FileRuntimeException("Not writable: " + file.getAbsolutePath());
         return file;
     }
 
     public static File readable(File file) {
-        if (!file.canRead()) throw new RuntimeException("Not readable: " + file.getAbsolutePath());
+        if (!file.canRead()) throw new FileRuntimeException("Not readable: " + file.getAbsolutePath());
         return file;
     }
 
@@ -113,7 +113,7 @@ public class Files {
 
     public static File mkdir(File file) {
         if (file.exists()) return file;
-        if (!file.mkdirs()) throw new RuntimeException("Cannot mkdir: " + file.getAbsolutePath());
+        if (!file.mkdirs()) throw new FileRuntimeException("Cannot mkdir: " + file.getAbsolutePath());
         return file;
     }
 
@@ -125,7 +125,7 @@ public class Files {
             deleteOnExit(file);
             return file;
         } catch (IOException e) {
-            throw new RuntimeException(e);
+            throw new FileRuntimeException(e);
         }
     }
 
@@ -138,7 +138,7 @@ public class Files {
 
         if (!file.exists()) {
 
-            if (!file.mkdirs()) throw new RuntimeException("Cannot mkdirs: " + file.getAbsolutePath());
+            if (!file.mkdirs()) throw new FileRuntimeException("Cannot mkdirs: " + file.getAbsolutePath());
 
             return file;
         }
@@ -199,4 +199,13 @@ public class Files {
         return sb.substring(0, sb.length() - delimiter.length());
     }
 
+    public static class FileRuntimeException extends RuntimeException {
+        public FileRuntimeException(final String str) {
+            super(str);
+        }
+
+        public FileRuntimeException(final Exception e) {
+            super(e);
+        }
+    }
 }

Added: openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/LoaderRuntimeException.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/LoaderRuntimeException.java?rev=1296892&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/LoaderRuntimeException.java (added)
+++ openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/LoaderRuntimeException.java Sun Mar  4 22:55:51 2012
@@ -0,0 +1,15 @@
+package org.apache.openejb.loader;
+
+public class LoaderRuntimeException extends RuntimeException {
+    public LoaderRuntimeException(final String str) {
+        super(str);
+    }
+
+    public LoaderRuntimeException(final String str, final Throwable e) {
+        super(str, e);
+    }
+
+    public LoaderRuntimeException(final Exception e) {
+        super(e);
+    }
+}

Modified: openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/OpenEJBInstance.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/OpenEJBInstance.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/OpenEJBInstance.java (original)
+++ openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/OpenEJBInstance.java Sun Mar  4 22:55:51 2012
@@ -40,7 +40,7 @@ public class OpenEJBInstance {
             }
             throw (Error) e.getCause();
         } catch (Exception e) {
-            throw new RuntimeException("OpenEJB.init: ", e);
+            throw new LoaderRuntimeException("OpenEJB.init: ", e);
         }
     }
 
@@ -48,9 +48,9 @@ public class OpenEJBInstance {
         try {
             return (Boolean) isInitialized.invoke(null);
         } catch (InvocationTargetException e) {
-            throw new RuntimeException("OpenEJB.isInitialized: ", e.getCause());
+            throw new LoaderRuntimeException("OpenEJB.isInitialized: ", e.getCause());
         } catch (Exception e) {
-            throw new RuntimeException("OpenEJB.isInitialized: ", e);
+            throw new LoaderRuntimeException("OpenEJB.isInitialized: ", e);
         }
     }
 

Modified: openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemClassPath.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemClassPath.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemClassPath.java (original)
+++ openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemClassPath.java Sun Mar  4 22:55:51 2012
@@ -50,7 +50,7 @@ public class SystemClassPath extends Bas
         try {
             return getSystemLoader();
         } catch (Exception e) {
-            throw new RuntimeException(e);
+            throw new LoaderRuntimeException(e);
         }
     }
 
@@ -105,7 +105,7 @@ public class SystemClassPath extends Bas
                     }
 
                 } catch (Exception e) {
-                    throw new RuntimeException(e);
+                    throw new LoaderRuntimeException(e);
                 }
 
             }

Modified: openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemInstance.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemInstance.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemInstance.java (original)
+++ openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemInstance.java Sun Mar  4 22:55:51 2012
@@ -174,7 +174,7 @@ public class SystemInstance {
             system = new SystemInstance(System.getProperties());
             initialized = false;
         } catch (Exception e) {
-            throw new RuntimeException("Failed to create default instance of SystemInstance", e);
+            throw new LoaderRuntimeException("Failed to create default instance of SystemInstance", e);
         }
     }
 

Modified: openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/TomcatClassPath.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/TomcatClassPath.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/TomcatClassPath.java (original)
+++ openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/TomcatClassPath.java Sun Mar  4 22:55:51 2012
@@ -19,18 +19,19 @@ package org.apache.openejb.loader;
 import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.Method;
+import java.net.HttpURLConnection;
+import java.net.JarURLConnection;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
-import java.net.JarURLConnection;
 import java.net.URLConnection;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
 import java.net.URLDecoder;
-import static java.net.URLDecoder.*;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.jar.JarFile;
 
+import static java.net.URLDecoder.decode;
+
 /*-------------------------------------------------------*/
 /* Tomcat ClassLoader Support */
 /*-------------------------------------------------------*/
@@ -56,7 +57,7 @@ public class TomcatClassPath extends Bas
             try {
                 addURLMethod = getAddURLMethod();
             } catch (Exception tomcat5Exception) {
-                throw new RuntimeException("Failed accessing classloader for Tomcat 5 or 6", tomcat5Exception);
+                throw new LoaderRuntimeException("Failed accessing classloader for Tomcat 5 or 6", tomcat5Exception);
             }
         }
 
@@ -161,7 +162,7 @@ public class TomcatClassPath extends Bas
                     Class<?> clazz = cp.getClass();
                     return clazz.getDeclaredMethod("getURLs", URL.class);
                 } catch (Exception e) {
-                    throw new RuntimeException(e);
+                    throw new LoaderRuntimeException(e);
                 }
 
             }

Modified: openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/AxisWsContainer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/AxisWsContainer.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/AxisWsContainer.java (original)
+++ openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/AxisWsContainer.java Sun Mar  4 22:55:51 2012
@@ -16,18 +16,6 @@
  */
 package org.apache.openejb.server.axis;
 
-import java.io.InputStream;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URL;
-import java.util.Iterator;
-import java.util.Map;
-import javax.servlet.http.HttpServletResponse;
-import javax.wsdl.OperationType;
-import javax.xml.soap.MimeHeader;
-import javax.xml.soap.MimeHeaders;
-import javax.xml.soap.SOAPMessage;
-
 import org.apache.axis.AxisEngine;
 import org.apache.axis.AxisFault;
 import org.apache.axis.Constants;
@@ -39,15 +27,28 @@ import org.apache.axis.message.SOAPEnvel
 import org.apache.axis.soap.SOAPConstants;
 import org.apache.axis.transport.http.HTTPConstants;
 import org.apache.axis.utils.Messages;
-import org.apache.openejb.server.webservices.WsConstants;
-import org.apache.openejb.server.webservices.saaj.SaajUniverse;
+import org.apache.openejb.server.ServerRuntimeException;
+import org.apache.openejb.server.httpd.HttpListener;
 import org.apache.openejb.server.httpd.HttpRequest;
 import org.apache.openejb.server.httpd.HttpResponse;
-import org.apache.openejb.server.httpd.HttpListener;
-import org.apache.openejb.util.Logger;
+import org.apache.openejb.server.webservices.WsConstants;
+import org.apache.openejb.server.webservices.saaj.SaajUniverse;
 import org.apache.openejb.util.LogCategory;
+import org.apache.openejb.util.Logger;
 import org.w3c.dom.Element;
 
+import javax.servlet.http.HttpServletResponse;
+import javax.wsdl.OperationType;
+import javax.xml.soap.MimeHeader;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.SOAPMessage;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.Map;
+
 public class AxisWsContainer implements HttpListener {
     private static final Logger logger = Logger.getInstance(LogCategory.AXIS, AxisWsContainer.class);
     public static final String REQUEST = AxisWsContainer.class.getName() + "@Request";
@@ -151,7 +152,7 @@ public class AxisWsContainer implements 
                     res.setStatus(HttpServletResponse.SC_ACCEPTED);
                     return;
                 } else if (responseMessage == null) {
-                    responseMessage = handleException(messageContext, null, new RuntimeException("No response for non-one-way operation"));
+                    responseMessage = handleException(messageContext, null, new ServerRuntimeException("No response for non-one-way operation"));
                 }
             } else if (responseMessage == null) {
                 res.setStatus(HttpServletResponse.SC_ACCEPTED);

Modified: openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/EjbRpcProvider.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/EjbRpcProvider.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/EjbRpcProvider.java (original)
+++ openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/EjbRpcProvider.java Sun Mar  4 22:55:51 2012
@@ -38,6 +38,7 @@ import org.apache.openejb.BeanContext;
 import org.apache.openejb.InvalidateReferenceException;
 import org.apache.openejb.RpcContainer;
 import org.apache.openejb.InterfaceType;
+import org.apache.openejb.server.ServerRuntimeException;
 import org.xml.sax.SAXException;
 import org.xml.sax.InputSource;
 
@@ -308,7 +309,7 @@ public class EjbRpcProvider extends RPCP
                 responseEnvelope.removeBody();
                 responseEnvelope.addBodyElement(responseBody);
             } catch (Exception e) {
-                throw new RuntimeException("Failed while creating response message body", e);
+                throw new ServerRuntimeException("Failed while creating response message body", e);
             }
         }
 

Modified: openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/HandlerChainImpl.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/HandlerChainImpl.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/HandlerChainImpl.java (original)
+++ openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/HandlerChainImpl.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,8 @@
  */
 package org.apache.openejb.server.axis;
 
+import org.apache.openejb.server.ServerRuntimeException;
+
 import javax.xml.rpc.JAXRPCException;
 import javax.xml.rpc.handler.Handler;
 import javax.xml.rpc.handler.HandlerInfo;
@@ -149,7 +151,7 @@ public class HandlerChainImpl extends Ar
                 message.saveChanges();
             }
         } catch (SOAPException e) {
-            throw new RuntimeException("Unable to save changes to SOAPMessage : " + e.toString());
+            throw new ServerRuntimeException("Unable to save changes to SOAPMessage : " + e.toString());
         }
     }
 
@@ -190,7 +192,7 @@ public class HandlerChainImpl extends Ar
             try {
                 return message.getSOAPPart().getEnvelope().getBody();
             } catch (SOAPException e) {
-                throw new RuntimeException(e);
+                throw new ServerRuntimeException(e);
             }
         }
 

Modified: openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/CommonsSchemaLoader.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/CommonsSchemaLoader.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/CommonsSchemaLoader.java (original)
+++ openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/CommonsSchemaLoader.java Sun Mar  4 22:55:51 2012
@@ -22,6 +22,7 @@ import com.ibm.wsdl.extensions.schema.Sc
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.server.ServerRuntimeException;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.w3c.dom.Element;
 import org.xml.sax.InputSource;
@@ -176,7 +177,7 @@ public class CommonsSchemaLoader {
         public InputSource getBaseInputSource() {
             ZipEntry entry = moduleFile.getEntry(wsdlURI.toString());
             if(entry == null){
-                throw new RuntimeException("The webservices.xml file points to a non-existant WSDL file "+wsdlURI.toString());
+                throw new ServerRuntimeException("The webservices.xml file points to a non-existant WSDL file "+wsdlURI.toString());
             }
 
             InputStream wsdlInputStream;
@@ -184,7 +185,7 @@ public class CommonsSchemaLoader {
                 wsdlInputStream = moduleFile.getInputStream(entry);
                 streams.add(wsdlInputStream);
             } catch (Exception e) {
-                throw new RuntimeException("Could not open stream to wsdl file", e);
+                throw new ServerRuntimeException("Could not open stream to wsdl file", e);
             }
             return new InputSource(wsdlInputStream);
         }
@@ -203,7 +204,7 @@ public class CommonsSchemaLoader {
                 importInputStream = moduleFile.getInputStream(entry);
                 streams.add(importInputStream);
             } catch (Exception e) {
-                throw new RuntimeException("Could not open stream to import file", e);
+                throw new ServerRuntimeException("Could not open stream to import file", e);
             }
 
             InputSource inputSource = new InputSource(importInputStream);

Modified: openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/SeiFactoryImpl.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/SeiFactoryImpl.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/SeiFactoryImpl.java (original)
+++ openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/SeiFactoryImpl.java Sun Mar  4 22:55:51 2012
@@ -34,6 +34,7 @@ import org.apache.axis.encoding.TypeMapp
 import org.apache.axis.encoding.ser.SimpleDeserializerFactory;
 import org.apache.axis.encoding.ser.SimpleSerializerFactory;
 import org.apache.axis.handlers.HandlerInfoChainFactory;
+import org.apache.openejb.server.ServerRuntimeException;
 
 import javax.xml.namespace.QName;
 import javax.xml.rpc.ServiceException;
@@ -94,7 +95,7 @@ public class SeiFactoryImpl implements S
             Signature signature = operationInfo.getSignature();
             MethodProxy methodProxy = MethodProxy.find(serviceEndpointClass, signature);
             if (methodProxy == null) {
-                throw new RuntimeException("No method proxy for operationInfo " + signature);
+                throw new ServerRuntimeException("No method proxy for operationInfo " + signature);
             }
             int index = methodProxy.getSuperIndex();
             sortedOperationInfos[index] = operationInfo;

Modified: openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/ServiceEndpointMethodInterceptor.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/ServiceEndpointMethodInterceptor.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/ServiceEndpointMethodInterceptor.java (original)
+++ openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/ServiceEndpointMethodInterceptor.java Sun Mar  4 22:55:51 2012
@@ -21,6 +21,7 @@ import net.sf.cglib.proxy.MethodProxy;
 import org.apache.axis.client.Call;
 import org.apache.axis.description.ParameterDesc;
 import org.apache.axis.utils.JavaUtils;
+import org.apache.openejb.server.ServerRuntimeException;
 import org.apache.openejb.server.webservices.saaj.SaajUniverse;
 
 import javax.wsdl.OperationType;
@@ -56,7 +57,7 @@ public class ServiceEndpointMethodInterc
         int index = methodProxy.getSuperIndex();
         OperationInfo operationInfo = operations[index];
         if (operationInfo == null) {
-            throw new RuntimeException("Operation not mapped: " + method.getName() + " index: " + index + "\n OperationInfos: " + Arrays.asList(operations));
+            throw new ServerRuntimeException("Operation not mapped: " + method.getName() + " index: " + index + "\n OperationInfos: " + Arrays.asList(operations));
         }
         stub.checkCachedEndpoint();
 
@@ -116,7 +117,7 @@ public class ServiceEndpointMethodInterc
             call.invokeOneWay(unwrapped);
             return null;
         } else {
-            throw new RuntimeException("Invalid messaging style: " + operationInfo.getOperationDesc().getMep());
+            throw new ServerRuntimeException("Invalid messaging style: " + operationInfo.getOperationDesc().getMep());
         }
     }
 

Modified: openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ClientInstance.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ClientInstance.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ClientInstance.java (original)
+++ openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ClientInstance.java Sun Mar  4 22:55:51 2012
@@ -112,7 +112,7 @@ public class ClientInstance {
         try {
             client = new ClientInstance(System.getProperties());
         } catch (Exception e) {
-            throw new RuntimeException("Failed to create default instance of SystemInstance", e);
+            throw new ClientRuntimeException("Failed to create default instance of SystemInstance", e);
         }
     }
 

Added: openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ClientRuntimeException.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ClientRuntimeException.java?rev=1296892&view=auto
==============================================================================
--- openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ClientRuntimeException.java (added)
+++ openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ClientRuntimeException.java Sun Mar  4 22:55:51 2012
@@ -0,0 +1,11 @@
+package org.apache.openejb.client;
+
+public class ClientRuntimeException extends RuntimeException {
+    public ClientRuntimeException(final String str) {
+        super(str);
+    }
+
+    public ClientRuntimeException(final String str, final Throwable e) {
+        super(str, e);
+    }
+}

Modified: openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/EJBHomeHandler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/EJBHomeHandler.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/EJBHomeHandler.java (original)
+++ openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/EJBHomeHandler.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,11 @@
  */
 package org.apache.openejb.client;
 
+import org.apache.openejb.client.proxy.ProxyManager;
+
+import javax.ejb.EJBException;
+import javax.ejb.EJBHome;
+import javax.ejb.Handle;
 import java.io.Externalizable;
 import java.io.IOException;
 import java.io.ObjectInput;
@@ -23,12 +28,6 @@ import java.io.ObjectOutput;
 import java.lang.reflect.Method;
 import java.rmi.RemoteException;
 
-import javax.ejb.EJBHome;
-import javax.ejb.Handle;
-import javax.ejb.EJBException;
-
-import org.apache.openejb.client.proxy.ProxyManager;
-
 public abstract class EJBHomeHandler extends EJBInvocationHandler implements Externalizable {
 
     protected static final Method GETEJBMETADATA = getMethod(EJBHome.class, "getEJBMetaData", null);
@@ -78,7 +77,7 @@ public abstract class EJBHomeHandler ext
             Class[] interfaces = new Class[]{ejb.homeClass, EJBHomeProxy.class};
             return (EJBHomeProxy) ProxyManager.newProxyInstance(interfaces, this);
         } catch (IllegalAccessException e) {
-            throw new RuntimeException("Unable to create proxy for "+ ejb.homeClass, e);
+            throw new ClientRuntimeException("Unable to create proxy for "+ ejb.homeClass, e);
         }
     }
 

Modified: openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIContext.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIContext.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIContext.java (original)
+++ openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIContext.java Sun Mar  4 22:55:51 2012
@@ -284,7 +284,7 @@ public class JNDIContext implements Init
                 throw (Error) res.getResult();
 
             default:
-                throw new RuntimeException("Invalid response from server: " + res.getResponseCode());
+                throw new ClientRuntimeException("Invalid response from server: " + res.getResponseCode());
         }
     }
 
@@ -391,7 +391,7 @@ public class JNDIContext implements Init
                 throw (Error) res.getResult();
 
             default:
-                throw new RuntimeException("Invalid response from server :" + res.getResponseCode());
+                throw new ClientRuntimeException("Invalid response from server :" + res.getResponseCode());
         }
 
     }
@@ -436,7 +436,7 @@ public class JNDIContext implements Init
                 try {
                     super.setObject(context.lookup(getName()));
                 } catch (NamingException e) {
-                    throw failed = new RuntimeException("Failed to lazily fetch the binding '"+getName()+"'", e);
+                    throw failed = new ClientRuntimeException("Failed to lazily fetch the binding '"+getName()+"'", e);
                 }
             }
             return super.getObject();

Modified: openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/JaxWsProviderWrapper.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/JaxWsProviderWrapper.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/JaxWsProviderWrapper.java (original)
+++ openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/JaxWsProviderWrapper.java Sun Mar  4 22:55:51 2012
@@ -453,7 +453,7 @@ public class JaxWsProviderWrapper extend
                 out.close();
                 PROVIDER_URL = tempFile.toURI().toURL();
             } catch (IOException e) {
-                throw new RuntimeException("Cound not create openejb-jaxws-provider file");
+                throw new ClientRuntimeException("Cound not create openejb-jaxws-provider file");
             }
         }
 

Modified: openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ThrowableArtifact.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ThrowableArtifact.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ThrowableArtifact.java (original)
+++ openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ThrowableArtifact.java Sun Mar  4 22:55:51 2012
@@ -67,7 +67,7 @@ public class ThrowableArtifact implement
             throwable = stack.pop().initCause(throwable);
         }
 
-        return new RuntimeException("The exception sent could not be serialized or deserialized.  This is a mock recreation:\n"+throwable, throwable);
+        return new ClientRuntimeException("The exception sent could not be serialized or deserialized.  This is a mock recreation:\n"+throwable, throwable);
     }
 
     public Throwable getThrowable() {

Modified: openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/proxy/Jdk13ProxyFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/proxy/Jdk13ProxyFactory.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/proxy/Jdk13ProxyFactory.java (original)
+++ openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/proxy/Jdk13ProxyFactory.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,8 @@
  */
 package org.apache.openejb.client.proxy;
 
+import org.apache.openejb.client.ClientRuntimeException;
+
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Proxy;
@@ -44,7 +46,7 @@ public class Jdk13ProxyFactory implement
                     "Please download the latest 1.3 Virtual Machine.      \n" +
                     "For more details see:                                \n" +
                     "http://developer.java.sun.com/developer/bugParade/bugs/4346224.html\n  ";
-            throw new RuntimeException(message);
+            throw new ClientRuntimeException(message);
         }
     }
 

Modified: openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/proxy/ProxyManager.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/proxy/ProxyManager.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/proxy/ProxyManager.java (original)
+++ openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/proxy/ProxyManager.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,8 @@
  */
 package org.apache.openejb.client.proxy;
 
+import org.apache.openejb.client.ClientRuntimeException;
+
 import java.util.Properties;
 
 public class ProxyManager {
@@ -30,12 +32,12 @@ public class ProxyManager {
             version = System.getProperty("java.vm.version");
         } catch (Exception e) {
 
-            throw new RuntimeException("Unable to determine the version of your VM.  No ProxyFactory Can be installed");
+            throw new ClientRuntimeException("Unable to determine the version of your VM.  No ProxyFactory Can be installed");
         }
         ClassLoader cl = getContextClassLoader();
 
         if (version.startsWith("1.1")) {
-            throw new RuntimeException("This VM version is not supported: " + version);
+            throw new ClientRuntimeException("This VM version is not supported: " + version);
         } else if (version.startsWith("1.2")) {
             defaultFactoryName = "JDK 1.2 ProxyFactory";
 
@@ -43,14 +45,14 @@ public class ProxyManager {
                 Class.forName("org.opentools.proxies.Proxy", true, cl);
             } catch (Exception e) {
 
-                throw new RuntimeException("No ProxyFactory Can be installed. Unable to load the class org.opentools.proxies.Proxy.  This class is needed for generating proxies in JDK 1.2 VMs.");
+                throw new ClientRuntimeException("No ProxyFactory Can be installed. Unable to load the class org.opentools.proxies.Proxy.  This class is needed for generating proxies in JDK 1.2 VMs.");
             }
 
             try {
                 factory = Class.forName("org.apache.openejb.client.proxy.Jdk12ProxyFactory", true, cl);
             } catch (Exception e) {
 
-                throw new RuntimeException("No ProxyFactory Can be installed. Unable to load the class org.apache.openejb.client.proxy.Jdk12ProxyFactory.");
+                throw new ClientRuntimeException("No ProxyFactory Can be installed. Unable to load the class org.apache.openejb.client.proxy.Jdk12ProxyFactory.");
             }
         } else {
             defaultFactoryName = "JDK 1.3 ProxyFactory";
@@ -59,7 +61,7 @@ public class ProxyManager {
                 factory = Class.forName("org.apache.openejb.client.proxy.Jdk13ProxyFactory", true, cl);
             } catch (Exception e) {
 
-                throw new RuntimeException("No ProxyFactory Can be installed. Unable to load the class org.apache.openejb.client.proxy.Jdk13ProxyFactory.");
+                throw new ClientRuntimeException("No ProxyFactory Can be installed. Unable to load the class org.apache.openejb.client.proxy.Jdk13ProxyFactory.");
             }
         }
 
@@ -70,7 +72,7 @@ public class ProxyManager {
 
         } catch (Exception e) {
 
-            throw new RuntimeException("No ProxyFactory Can be installed. Unable to load the class org.apache.openejb.client.proxy.Jdk13ProxyFactory.");
+            throw new ClientRuntimeException("No ProxyFactory Can be installed. Unable to load the class org.apache.openejb.client.proxy.Jdk13ProxyFactory.");
         }
 
     }

Modified: openejb/trunk/openejb/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/ejb/EjbInterceptor.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/ejb/EjbInterceptor.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/ejb/EjbInterceptor.java (original)
+++ openejb/trunk/openejb/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/ejb/EjbInterceptor.java Sun Mar  4 22:55:51 2012
@@ -20,21 +20,15 @@ package org.apache.openejb.server.cxf.ej
 import org.apache.cxf.Bus;
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor;
-import org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor;
-import org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor;
-import org.apache.cxf.binding.soap.interceptor.SoapHeaderInterceptor;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.interceptor.AbstractInDatabindingInterceptor;
-import org.apache.cxf.interceptor.AttachmentInInterceptor;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.interceptor.InterceptorChain;
 import org.apache.cxf.interceptor.OutgoingChainInterceptor;
 import org.apache.cxf.interceptor.ServiceInvokerInterceptor;
-import org.apache.cxf.interceptor.StaxInInterceptor;
 import org.apache.cxf.jaxws.handler.logical.LogicalHandlerInInterceptor;
 import org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor;
 import org.apache.cxf.jaxws.interceptors.HolderInInterceptor;
-import org.apache.cxf.jaxws.interceptors.HolderOutInterceptor;
 import org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor;
 import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
 import org.apache.cxf.message.Exchange;
@@ -43,6 +37,7 @@ import org.apache.cxf.phase.PhaseInterce
 import org.apache.cxf.phase.PhaseManager;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.staxutils.StaxUtils;
+import org.apache.openejb.server.ServerRuntimeException;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
 
@@ -52,8 +47,6 @@ import javax.xml.soap.SOAPMessage;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.ws.Binding;
-
-import java.io.InputStream;
 import java.lang.reflect.Method;
 import java.util.List;
 
@@ -116,7 +109,7 @@ public class EjbInterceptor {
                 try {
                     reserialize((SoapMessage) inMessage);
                 } catch (Exception e) {
-                    throw new RuntimeException("Failed to reserialize soap message", e);
+                    throw new ServerRuntimeException("Failed to reserialize soap message", e);
                 }
             } else {
                 // TODO: how to handle XML/HTTP binding?

Modified: openejb/trunk/openejb/server/openejb-daemon/src/main/java/org/apache/openejb/daemon/NTService.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-daemon/src/main/java/org/apache/openejb/daemon/NTService.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-daemon/src/main/java/org/apache/openejb/daemon/NTService.java (original)
+++ openejb/trunk/openejb/server/openejb-daemon/src/main/java/org/apache/openejb/daemon/NTService.java Sun Mar  4 22:55:51 2012
@@ -1,24 +1,25 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
-    * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+    * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.openejb.daemon;
 
 import org.apache.openejb.cli.Bootstrap;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.server.Server;
+import org.apache.openejb.server.ServerRuntimeException;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -85,7 +86,7 @@ public class NTService {
 
             } catch (Exception e) {
                 running.set(false);
-                throw new RuntimeException("Failed to Bootstrap OpenEJB", e);
+                throw new ServerRuntimeException("Failed to Bootstrap OpenEJB", e);
             }
 
         }

Modified: openejb/trunk/openejb/server/openejb-multicast/src/main/java/org/apache/openejb/server/discovery/MultipointServer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-multicast/src/main/java/org/apache/openejb/server/discovery/MultipointServer.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-multicast/src/main/java/org/apache/openejb/server/discovery/MultipointServer.java (original)
+++ openejb/trunk/openejb/server/openejb-multicast/src/main/java/org/apache/openejb/server/discovery/MultipointServer.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.openejb.server.discovery;
 
+import org.apache.openejb.server.ServerRuntimeException;
 import org.apache.openejb.util.Duration;
 import org.apache.openejb.util.Join;
 import org.apache.openejb.util.LogCategory;
@@ -462,7 +463,7 @@ public class MultipointServer {
                     // seen - needs to get maintained as "connected"
                     // TODO remove from seen
                 } catch (IOException e) {
-                    throw new RuntimeException(e);
+                    throw new ServerRuntimeException(e);
                 }
             }
         }

Added: openejb/trunk/openejb/server/openejb-server/src/main/java/org/apache/openejb/server/ServerRuntimeException.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-server/src/main/java/org/apache/openejb/server/ServerRuntimeException.java?rev=1296892&view=auto
==============================================================================
--- openejb/trunk/openejb/server/openejb-server/src/main/java/org/apache/openejb/server/ServerRuntimeException.java (added)
+++ openejb/trunk/openejb/server/openejb-server/src/main/java/org/apache/openejb/server/ServerRuntimeException.java Sun Mar  4 22:55:51 2012
@@ -0,0 +1,15 @@
+package org.apache.openejb.server;
+
+public class ServerRuntimeException extends RuntimeException {
+    public ServerRuntimeException(final String str) {
+        super(str);
+    }
+
+    public ServerRuntimeException(final String str, final Throwable e) {
+        super(str, e);
+    }
+
+    public ServerRuntimeException(final Exception e) {
+        super(e);
+    }
+}

Modified: openejb/trunk/openejb/server/openejb-server/src/main/java/org/apache/openejb/server/Start.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-server/src/main/java/org/apache/openejb/server/Start.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-server/src/main/java/org/apache/openejb/server/Start.java (original)
+++ openejb/trunk/openejb/server/openejb-server/src/main/java/org/apache/openejb/server/Start.java Sun Mar  4 22:55:51 2012
@@ -106,7 +106,7 @@ public class Start {
 
         } catch (Exception e) {
 
-            throw new RuntimeException("Cannot start the server.");
+            throw new ServerRuntimeException("Cannot start the server.");
 
         }
 

Modified: openejb/trunk/openejb/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SaajFactoryFinder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SaajFactoryFinder.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SaajFactoryFinder.java (original)
+++ openejb/trunk/openejb/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SaajFactoryFinder.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.openejb.server.webservices.saaj;
 
+import org.apache.openejb.server.ServerRuntimeException;
 import org.apache.openejb.util.Logger;
 import org.apache.openejb.util.LogCategory;
 
@@ -58,7 +59,7 @@ class SaajFactoryFinder {
             } else if (provider.equalsIgnoreCase("sun")) {
                 DEFAULT_SAAJ_UNIVERSE = SaajUniverse.Type.SUN;
             } else {
-                throw new RuntimeException("Invalid SAAJ universe specified: " + provider);
+                throw new ServerRuntimeException("Invalid SAAJ universe specified: " + provider);
             }
 
             logger.info("Default SAAJ universe: " + DEFAULT_SAAJ_UNIVERSE);

Modified: openejb/trunk/openejb/tck/cdi-tomee-embedded/src/main/java/org/apache/openejb/tck/cdi/tomee/embedded/ContainersImpl.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tck/cdi-tomee-embedded/src/main/java/org/apache/openejb/tck/cdi/tomee/embedded/ContainersImpl.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/tck/cdi-tomee-embedded/src/main/java/org/apache/openejb/tck/cdi/tomee/embedded/ContainersImpl.java (original)
+++ openejb/trunk/openejb/tck/cdi-tomee-embedded/src/main/java/org/apache/openejb/tck/cdi/tomee/embedded/ContainersImpl.java Sun Mar  4 22:55:51 2012
@@ -18,6 +18,7 @@ package org.apache.openejb.tck.cdi.tomee
 
 import org.apache.commons.io.FileUtils;
 import org.apache.openejb.config.ValidationException;
+import org.apache.openejb.tck.OpenEJBTCKRuntimeException;
 import org.apache.tomee.embedded.Container;
 import org.jboss.testharness.api.DeploymentException;
 import org.jboss.testharness.spi.Containers;
@@ -94,7 +95,7 @@ public class ContainersImpl implements C
             }
             Util.close(fos);
         } catch (Exception e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBTCKRuntimeException(e);
         }
     }
 
@@ -123,7 +124,7 @@ public class ContainersImpl implements C
             container.undeploy(name);
         } catch (Exception e) {
             e.printStackTrace();
-            throw new RuntimeException(e);
+            throw new OpenEJBTCKRuntimeException(e);
         }
 
         File file = FILES.remove(name);

Added: openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/OpenEJBTCKRuntimeException.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/OpenEJBTCKRuntimeException.java?rev=1296892&view=auto
==============================================================================
--- openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/OpenEJBTCKRuntimeException.java (added)
+++ openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/OpenEJBTCKRuntimeException.java Sun Mar  4 22:55:51 2012
@@ -0,0 +1,11 @@
+package org.apache.openejb.tck;
+
+public class OpenEJBTCKRuntimeException extends RuntimeException {
+    public OpenEJBTCKRuntimeException(final Exception e) {
+        super(e);
+    }
+
+    public OpenEJBTCKRuntimeException(final String str) {
+        super(str);
+    }
+}

Modified: openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/AbstractContainers.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/AbstractContainers.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/AbstractContainers.java (original)
+++ openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/AbstractContainers.java Sun Mar  4 22:55:51 2012
@@ -17,6 +17,8 @@
 
 package org.apache.openejb.tck.impl;
 
+import org.apache.openejb.tck.OpenEJBTCKRuntimeException;
+
 import java.io.Closeable;
 import java.io.File;
 import java.io.FileOutputStream;
@@ -41,7 +43,7 @@ public class AbstractContainers {
             }
             Util.close(fos);
         } catch (Exception e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBTCKRuntimeException(e);
         }
     }
 

Modified: openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/Archive.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/Archive.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/Archive.java (original)
+++ openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/Archive.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.openejb.tck.impl;
 
+import org.apache.openejb.tck.OpenEJBTCKRuntimeException;
 import org.apache.openejb.tck.util.ZipUtil;
 
 import java.io.BufferedInputStream;
@@ -105,7 +106,7 @@ public class Archive {
 
             this.in = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
         } catch (IOException e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBTCKRuntimeException(e);
         }
     }
 

Modified: openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/ContainersImplTomEE.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/ContainersImplTomEE.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/ContainersImplTomEE.java (original)
+++ openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/ContainersImplTomEE.java Sun Mar  4 22:55:51 2012
@@ -22,6 +22,7 @@ import org.apache.openejb.client.RemoteI
 import org.apache.openejb.config.RemoteServer;
 import org.apache.openejb.config.ValidationException;
 import org.apache.openejb.loader.Options;
+import org.apache.openejb.tck.OpenEJBTCKRuntimeException;
 import org.jboss.testharness.api.DeploymentException;
 import org.jboss.testharness.spi.Containers;
 
@@ -51,7 +52,7 @@ public class ContainersImplTomEE extends
         if (port != null) {
             props.put(Context.PROVIDER_URL, options.get(Context.PROVIDER_URL,"http://localhost:" + port + "/tomee/ejb"));
         } else {
-            throw new RuntimeException("Please set the tomee port as a system property");
+            throw new OpenEJBTCKRuntimeException("Please set the tomee port as a system property");
         }
 
         final String deployerJndi = System.getProperty("openejb.deployer.jndiname", "openejb/DeployerBusinessRemote");
@@ -60,7 +61,7 @@ public class ContainersImplTomEE extends
             InitialContext context = new InitialContext(props);
             return (Deployer) context.lookup(deployerJndi);
         } catch (Exception e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBTCKRuntimeException(e);
         }
     }
     public ContainersImplTomEE() {
@@ -129,7 +130,7 @@ public class ContainersImplTomEE extends
             deployer.undeploy(appInfo.path);
         } catch (Exception e) {
             e.printStackTrace();
-            throw new RuntimeException(e);
+            throw new OpenEJBTCKRuntimeException(e);
         }
 
         File toDelete;

Modified: openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/FullRestartContainer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/FullRestartContainer.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/FullRestartContainer.java (original)
+++ openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/FullRestartContainer.java Sun Mar  4 22:55:51 2012
@@ -20,6 +20,7 @@ package org.apache.openejb.tck.impl;
 import org.apache.openejb.client.RemoteInitialContextFactory;
 import org.apache.openejb.config.RemoteServer;
 import org.apache.openejb.loader.Options;
+import org.apache.openejb.tck.OpenEJBTCKRuntimeException;
 import org.apache.tomee.catalina.facade.ExceptionManagerFacade;
 import org.jboss.testharness.api.DeploymentException;
 import org.jboss.testharness.spi.Containers;
@@ -110,14 +111,14 @@ public class FullRestartContainer extend
             System.out.println("provider url = " + "http://localhost:" + port + "/tomee/ejb");
             props.put(Context.PROVIDER_URL, options.get(Context.PROVIDER_URL,"http://localhost:" + port + "/tomee/ejb"));
         } else {
-            throw new RuntimeException("Please set the tomee port as a system property");
+            throw new OpenEJBTCKRuntimeException("Please set the tomee port as a system property");
         }
 
         try {
             InitialContext context = new InitialContext(props);
             return (ExceptionManagerFacade) context.lookup("openejb/ExceptionManagerFacadeRemote");
         } catch (Exception e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBTCKRuntimeException(e);
         }
     }
 }

Modified: openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/BackportUtil.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/BackportUtil.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/BackportUtil.java (original)
+++ openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/BackportUtil.java Sun Mar  4 22:55:51 2012
@@ -98,7 +98,7 @@ public class BackportUtil {
             try {
                 standardContext.setConfigFile(contextXmlFile.toURI().toURL());
             } catch (MalformedURLException e) {
-                throw new RuntimeException(e);
+                throw new TomEERuntimeException(e);
             }
         }
     }

Modified: openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEERuntimeException.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEERuntimeException.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEERuntimeException.java (original)
+++ openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEERuntimeException.java Sun Mar  4 22:55:51 2012
@@ -18,7 +18,15 @@
 package org.apache.tomee.catalina;
 
 public class TomEERuntimeException extends RuntimeException {
-    public TomEERuntimeException(Throwable cause) {
+    public TomEERuntimeException(final Throwable cause) {
         super(cause);
     }
+
+    public TomEERuntimeException(final String str) {
+        super(str);
+    }
+
+    public TomEERuntimeException(final String str, final Throwable e) {
+        super(str, e);
+    }
 }

Modified: openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java (original)
+++ openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java Sun Mar  4 22:55:51 2012
@@ -91,7 +91,6 @@ import javax.servlet.jsp.JspFactory;
 import javax.transaction.TransactionManager;
 import javax.transaction.TransactionSynchronizationRegistry;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.lang.reflect.Field;
@@ -1061,7 +1060,7 @@ public class TomcatWebAppBuilder impleme
         try {
             appModule = tomcatDeploymentLoader.load(new File(servletContext.getRealPath(".")).getParentFile());
         } catch (OpenEJBException e) {
-            throw new RuntimeException(e);
+            throw new TomEERuntimeException(e);
         }
 
         // create the web module

Modified: openejb/trunk/openejb/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java (original)
+++ openejb/trunk/openejb/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java Sun Mar  4 22:55:51 2012
@@ -41,6 +41,7 @@ import org.apache.openejb.config.Configu
 import org.apache.openejb.loader.IO;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.util.Logger;
+import org.apache.tomee.catalina.TomEERuntimeException;
 import org.apache.tomee.catalina.TomcatLoader;
 import org.apache.velocity.Template;
 import org.apache.velocity.VelocityContext;
@@ -210,7 +211,7 @@ public class Container {
             final File file = File.createTempFile("apache-tomee", "-home");
             return file.getAbsolutePath();
         } catch (IOException e) {
-            throw new RuntimeException(e);
+            throw new TomEERuntimeException(e);
         }
     }
 

Modified: openejb/trunk/openejb/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/EmbeddedTomEEContainer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/EmbeddedTomEEContainer.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/EmbeddedTomEEContainer.java (original)
+++ openejb/trunk/openejb/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/EmbeddedTomEEContainer.java Sun Mar  4 22:55:51 2012
@@ -21,6 +21,7 @@ import org.apache.geronimo.osgi.locator.
 import org.apache.openejb.OpenEJBException;
 import org.apache.openejb.util.Exceptions;
 import org.apache.openejb.util.NetworkUtil;
+import org.apache.tomee.catalina.TomEERuntimeException;
 
 import javax.ejb.EJBException;
 import javax.ejb.embeddable.EJBContainer;
@@ -94,7 +95,7 @@ public class EmbeddedTomEEContainer exte
                 } else if (portValue instanceof String) {
                     port = Integer.parseInt((String) portValue);
                 } else {
-                    throw new RuntimeException("port value should be an integer or a string");
+                    throw new TomEERuntimeException("port value should be an integer or a string");
                 }
                 if (port <= 0) {
                     port = NetworkUtil.getNextAvailablePort();
@@ -139,7 +140,7 @@ public class EmbeddedTomEEContainer exte
                 if (e instanceof EJBException) {
                     throw (EJBException) e;
                 }
-                throw new RuntimeException("initialization exception", e);
+                throw new TomEERuntimeException("initialization exception", e);
             } finally {
                 if (tomEEContainer == null) {
                     try {

Modified: openejb/trunk/openejb/tomee/tomee-webservices/src/main/java/org/apache/tomee/webservices/TomcatRsRegistry.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webservices/src/main/java/org/apache/tomee/webservices/TomcatRsRegistry.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webservices/src/main/java/org/apache/tomee/webservices/TomcatRsRegistry.java (original)
+++ openejb/trunk/openejb/tomee/tomee-webservices/src/main/java/org/apache/tomee/webservices/TomcatRsRegistry.java Sun Mar  4 22:55:51 2012
@@ -33,6 +33,7 @@ import org.apache.openejb.server.rest.Rs
 import org.apache.openejb.server.rest.RsServlet;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
+import org.apache.tomee.catalina.TomEERuntimeException;
 import org.apache.tomee.loader.TomcatHelper;
 
 import java.net.URI;
@@ -184,7 +185,7 @@ public class TomcatRsRegistry implements
             context.stop();
             context.destroy();
         } catch (Exception e) {
-            throw new RuntimeException(e);
+            throw new TomEERuntimeException(e);
         }
         Host host = (Host) context.getParent();
         host.removeChild(context);

Modified: openejb/trunk/openejb/tomee/tomee-webservices/src/main/java/org/apache/tomee/webservices/TomcatWsRegistry.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webservices/src/main/java/org/apache/tomee/webservices/TomcatWsRegistry.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webservices/src/main/java/org/apache/tomee/webservices/TomcatWsRegistry.java (original)
+++ openejb/trunk/openejb/tomee/tomee-webservices/src/main/java/org/apache/tomee/webservices/TomcatWsRegistry.java Sun Mar  4 22:55:51 2012
@@ -41,6 +41,7 @@ import org.apache.openejb.server.httpd.H
 import org.apache.openejb.server.webservices.WsRegistry;
 import org.apache.openejb.server.webservices.WsServlet;
 import org.apache.tomee.catalina.OpenEJBValve;
+import org.apache.tomee.catalina.TomEERuntimeException;
 import org.apache.tomee.loader.TomcatHelper;
 
 import java.net.URI;
@@ -331,7 +332,7 @@ public class TomcatWsRegistry implements
                 context.destroy();
                 context.stop();
             } catch (Exception e) {
-                throw new RuntimeException(e);
+                throw new TomEERuntimeException(e);
             }
             Host host = (Host) context.getParent();
             host.removeChild(context);

Modified: openejb/trunk/openejb/utils/webdeployer/src/main/java/org/apache/tomee/catalina/deployer/WebappDeployer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/utils/webdeployer/src/main/java/org/apache/tomee/catalina/deployer/WebappDeployer.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/utils/webdeployer/src/main/java/org/apache/tomee/catalina/deployer/WebappDeployer.java (original)
+++ openejb/trunk/openejb/utils/webdeployer/src/main/java/org/apache/tomee/catalina/deployer/WebappDeployer.java Sun Mar  4 22:55:51 2012
@@ -16,19 +16,6 @@
  */
 package org.apache.tomee.catalina.deployer;
 
-import static javax.ejb.TransactionManagementType.BEAN;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Properties;
-
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-import javax.ejb.TransactionManagement;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
 import org.apache.catalina.Container;
 import org.apache.catalina.Engine;
 import org.apache.catalina.Service;
@@ -46,9 +33,22 @@ import org.apache.openejb.assembler.clas
 import org.apache.openejb.loader.IO;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.tomcat.util.modeler.Registry;
+import org.apache.tomee.catalina.TomEERuntimeException;
 import org.apache.tomee.catalina.TomcatWebAppBuilder;
 import org.apache.tomee.loader.TomcatHelper;
 
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.ejb.TransactionManagement;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import java.io.File;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Properties;
+
+import static javax.ejb.TransactionManagementType.BEAN;
+
 @Stateless(name = "openejb/WebappDeployer")
 @Remote(Deployer.class)
 @TransactionManagement(BEAN)
@@ -67,7 +67,7 @@ public class WebappDeployer implements D
 	}
 
 	public String getUniqueFile() {
-		throw new RuntimeException("This method is not used");
+		throw new TomEERuntimeException("This method is not used");
 	}
 
 	public Collection<AppInfo> getDeployedApps() {



Mime
View raw message