tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1296892 [1/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
Author: rmannibucau
Date: Sun Mar  4 22:55:51 2012
New Revision: 1296892

URL: http://svn.apache.org/viewvc?rev=1296892&view=rev
Log:
trying to not use RuntimeException anymore

Added:
    openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/ArquillianRuntimeException.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/OpenEJBRuntimeException.java
    openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/LoaderRuntimeException.java
    openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ClientRuntimeException.java
    openejb/trunk/openejb/server/openejb-server/src/main/java/org/apache/openejb/server/ServerRuntimeException.java
    openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/OpenEJBTCKRuntimeException.java
Modified:
    openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/ObjectMap.java
    openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/Setup.java
    openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEConfiguration.java
    openejb/trunk/openejb/arquillian-tomee/ziplock/src/main/java/org/apache/ziplock/WebModule.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/BeanContext.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/DeployerEjb.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Info.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBLifecycle.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBValidatorService.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConvertDataSourceDefinitions.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/RemoteServer.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/VmDeploymentManager.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckAsynchronous.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckClasses.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/LocalInitialContext.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/cmp/cmp2/Cmp2Generator.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/cmp/cmp2/EjbSelect.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbHomeProxyHandler.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbObjectProxyHandler.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/IntraVmHandle.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/IvmJndiFactory.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/NameNode.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/managed/ManagedContainer.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/managed/SimpleCache.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/SimpleCache.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/timer/DatabaseTimerStore.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EjbTimerServiceImpl.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/JaxWsUtils.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/UriResolver.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/math/MathRuntimeException.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQFactory.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/StaticDESPasswordCipher.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/AsmParameterNameLoader.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/UrlCache.java
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/proxy/DynamicProxyImplFactory.java
    openejb/trunk/openejb/container/openejb-junit/src/main/java/org/apache/openejb/junit/context/OpenEjbTestContext.java
    openejb/trunk/openejb/container/openejb-junit/src/test/java/org/apache/openejb/junit/context/ContextWrapperStatementTest.java
    openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/Files.java
    openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/OpenEJBInstance.java
    openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemClassPath.java
    openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemInstance.java
    openejb/trunk/openejb/container/openejb-loader/src/main/java/org/apache/openejb/loader/TomcatClassPath.java
    openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/AxisWsContainer.java
    openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/EjbRpcProvider.java
    openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/HandlerChainImpl.java
    openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/assembler/CommonsSchemaLoader.java
    openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/SeiFactoryImpl.java
    openejb/trunk/openejb/server/openejb-axis/src/main/java/org/apache/openejb/server/axis/client/ServiceEndpointMethodInterceptor.java
    openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ClientInstance.java
    openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/EJBHomeHandler.java
    openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIContext.java
    openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/JaxWsProviderWrapper.java
    openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/ThrowableArtifact.java
    openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/proxy/Jdk13ProxyFactory.java
    openejb/trunk/openejb/server/openejb-client/src/main/java/org/apache/openejb/client/proxy/ProxyManager.java
    openejb/trunk/openejb/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/ejb/EjbInterceptor.java
    openejb/trunk/openejb/server/openejb-daemon/src/main/java/org/apache/openejb/daemon/NTService.java
    openejb/trunk/openejb/server/openejb-multicast/src/main/java/org/apache/openejb/server/discovery/MultipointServer.java
    openejb/trunk/openejb/server/openejb-server/src/main/java/org/apache/openejb/server/Start.java
    openejb/trunk/openejb/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SaajFactoryFinder.java
    openejb/trunk/openejb/tck/cdi-tomee-embedded/src/main/java/org/apache/openejb/tck/cdi/tomee/embedded/ContainersImpl.java
    openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/AbstractContainers.java
    openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/Archive.java
    openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/ContainersImplTomEE.java
    openejb/trunk/openejb/tck/tck-common/src/main/java/org/apache/openejb/tck/impl/FullRestartContainer.java
    openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/BackportUtil.java
    openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEERuntimeException.java
    openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
    openejb/trunk/openejb/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java
    openejb/trunk/openejb/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/EmbeddedTomEEContainer.java
    openejb/trunk/openejb/tomee/tomee-webservices/src/main/java/org/apache/tomee/webservices/TomcatRsRegistry.java
    openejb/trunk/openejb/tomee/tomee-webservices/src/main/java/org/apache/tomee/webservices/TomcatWsRegistry.java
    openejb/trunk/openejb/utils/webdeployer/src/main/java/org/apache/tomee/catalina/deployer/WebappDeployer.java

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

Modified: openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/ObjectMap.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/ObjectMap.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/ObjectMap.java (original)
+++ openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/ObjectMap.java Sun Mar  4 22:55:51 2012
@@ -160,7 +160,7 @@ public class ObjectMap extends AbstractM
             } catch (IllegalAccessException e) {
                 throw new IllegalStateException(e);
             } catch (InvocationTargetException e) {
-                throw new RuntimeException(e.getCause());
+                throw new ArquillianRuntimeException(e.getCause());
             }
         }
 

Modified: openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/Setup.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/Setup.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/Setup.java (original)
+++ openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/Setup.java Sun Mar  4 22:55:51 2012
@@ -103,7 +103,7 @@ public class Setup {
             return artifact;
         } finally {
             if (cache == null) {
-                System.getProperties().remove(ProvisioningUtil.OPENEJB_DEPLOYER_CACHE_FOLDER);
+                System.clearProperty(ProvisioningUtil.OPENEJB_DEPLOYER_CACHE_FOLDER);
             } else {
                 System.setProperty(ProvisioningUtil.OPENEJB_DEPLOYER_CACHE_FOLDER, cache);
             }

Modified: openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEConfiguration.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEConfiguration.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEConfiguration.java (original)
+++ openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/TomEEConfiguration.java Sun Mar  4 22:55:51 2012
@@ -85,7 +85,7 @@ public class TomEEConfiguration implemen
                 }
             });
         } catch (IOException e) {
-            throw new RuntimeException("can't read " + systemProperties);
+            throw new ArquillianRuntimeException("can't read " + systemProperties);
         }
         return p;
     }

Modified: openejb/trunk/openejb/arquillian-tomee/ziplock/src/main/java/org/apache/ziplock/WebModule.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian-tomee/ziplock/src/main/java/org/apache/ziplock/WebModule.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian-tomee/ziplock/src/main/java/org/apache/ziplock/WebModule.java (original)
+++ openejb/trunk/openejb/arquillian-tomee/ziplock/src/main/java/org/apache/ziplock/WebModule.java Sun Mar  4 22:55:51 2012
@@ -128,7 +128,7 @@ public class WebModule {
                 JaxbJavaee.marshal(descriptor.getClass(), descriptor, out);
                 return new ByteArrayInputStream(out.toByteArray());
             } catch (JAXBException e) {
-                throw new RuntimeException("Unable to marshal descriptor", e);
+                throw new IllegalArgumentException("Unable to marshal descriptor", e);
             }
         }
     }

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/BeanContext.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/BeanContext.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/BeanContext.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/BeanContext.java Sun Mar  4 22:55:51 2012
@@ -1018,7 +1018,7 @@ public class BeanContext extends Deploym
                     mapMethods(method, beanMethod);
                 }
             } catch (NoSuchMethodException nsme) {
-//                throw new RuntimeException("Invalid method [" + method + "] Not declared by " + beanClass.getName() + " class");
+//                throw new OpenEJBRuntimeException("Invalid method [" + method + "] Not declared by " + beanClass.getName() + " class");
             }
         }
     }
@@ -1042,7 +1042,7 @@ public class BeanContext extends Deploym
                 Method beanMethod = beanClass.getMethod(method.getName(), method.getParameterTypes());
                 mapMethods(method, beanMethod);
             } catch (NoSuchMethodException nsme) {
-                throw new RuntimeException("Invalid method [" + method + "]. Not declared by " + beanClass.getName() + " class");
+                throw new OpenEJBRuntimeException("Invalid method [" + method + "]. Not declared by " + beanClass.getName() + " class");
             }
         }
     }

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

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/DeployerEjb.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/DeployerEjb.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/DeployerEjb.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/DeployerEjb.java Sun Mar  4 22:55:51 2012
@@ -19,6 +19,7 @@ package org.apache.openejb.assembler;
 import org.apache.openejb.ClassLoaderUtil;
 import org.apache.openejb.NoSuchApplicationException;
 import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.UndeployException;
 import org.apache.openejb.assembler.classic.AppInfo;
 import org.apache.openejb.assembler.classic.Assembler;
@@ -68,7 +69,7 @@ public class DeployerEjb implements Depl
             uniqueFile = new File(tempDir, uniqueName).getCanonicalFile();
             uniqueFile.createNewFile();
         } catch (IOException e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBRuntimeException(e);
         }
         uniqueFile.deleteOnExit();
     }

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java Sun Mar  4 22:55:51 2012
@@ -34,6 +34,7 @@ import org.apache.openejb.MethodContext;
 import org.apache.openejb.NoSuchApplicationException;
 import org.apache.openejb.OpenEJB;
 import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.UndeployException;
 import org.apache.openejb.cdi.CdiAppContextsService;
 import org.apache.openejb.cdi.CdiBuilder;
@@ -1518,7 +1519,7 @@ public class Assembler extends Assembler
             // create the connection manager
             ConnectionManager connectionManager = (ConnectionManager) connectionManagerRecipe.create();
             if (connectionManager == null) {
-                throw new RuntimeException(messages.format("assembler.invalidConnectionManager", serviceInfo.id));
+                throw new OpenEJBRuntimeException(messages.format("assembler.invalidConnectionManager", serviceInfo.id));
             }
 
             Map<String, Object> unsetA = serviceRecipe.getUnsetProperties();

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Info.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Info.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Info.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Info.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,8 @@
  */
 package org.apache.openejb.assembler.classic;
 
+import org.apache.openejb.OpenEJBRuntimeException;
+
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Marshaller;
@@ -36,8 +38,7 @@ public class Info {
         try {
             JAXB_CONTEXT = JAXBContext.newInstance(Info.class);
         } catch (JAXBException e) {
-            // TODO: find a better exception?
-            throw new RuntimeException("can't create jaxbcontext for Info class");
+            throw new OpenEJBRuntimeException("can't create jaxbcontext for Info class");
         }
     }
 

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiBuilder.java Sun Mar  4 22:55:51 2012
@@ -16,41 +16,41 @@
  */
 package org.apache.openejb.assembler.classic;
 
-import static org.apache.openejb.util.Classes.packageName;
-
-import java.util.TreeMap;
-import javax.ejb.embeddable.EJBContainer;
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.naming.NameAlreadyBoundException;
-import javax.naming.Context;
-import javax.jms.MessageListener;
-
 import org.apache.openejb.AppContext;
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.InterfaceType;
 import org.apache.openejb.ModuleContext;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.core.ivm.naming.BusinessLocalBeanReference;
-import org.apache.openejb.spi.ContainerSystem;
-import org.apache.openejb.util.LogCategory;
-import org.apache.openejb.util.Logger;
-import org.apache.openejb.util.Strings;
-import org.apache.openejb.loader.SystemInstance;
-import org.apache.openejb.loader.Options;
 import org.apache.openejb.core.ivm.naming.BusinessLocalReference;
 import org.apache.openejb.core.ivm.naming.BusinessRemoteReference;
-import org.apache.openejb.core.ivm.naming.ObjectReference;
 import org.apache.openejb.core.ivm.naming.IntraVmJndiReference;
+import org.apache.openejb.core.ivm.naming.ObjectReference;
+import org.apache.openejb.loader.Options;
+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 org.apache.openejb.util.StringTemplate;
+import org.apache.openejb.util.Strings;
 
+import javax.ejb.embeddable.EJBContainer;
+import javax.jms.MessageListener;
+import javax.naming.Context;
+import javax.naming.NameAlreadyBoundException;
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import java.lang.reflect.Constructor;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
-import java.util.ArrayList;
 import java.util.Map;
-import java.util.HashMap;
-import java.util.Comparator;
 import java.util.Properties;
-import java.lang.reflect.Constructor;
+import java.util.TreeMap;
+
+import static org.apache.openejb.util.Classes.packageName;
 
 
 /**
@@ -410,7 +410,7 @@ public class JndiBuilder {
                 simpleNameRef = ref;
             }
         } catch (NamingException e) {
-            throw new RuntimeException("Unable to bind business remote deployment in jndi.", e);
+            throw new OpenEJBRuntimeException("Unable to bind business remote deployment in jndi.", e);
         }
 
         try {
@@ -432,7 +432,7 @@ public class JndiBuilder {
                 if (simpleNameRef == null) simpleNameRef = ref;
             }
         } catch (NamingException e) {
-            throw new RuntimeException("Unable to bind business local interface for deployment " + id, e);
+            throw new OpenEJBRuntimeException("Unable to bind business local interface for deployment " + id, e);
         }
 
         try {
@@ -455,7 +455,7 @@ public class JndiBuilder {
                 if (simpleNameRef == null) simpleNameRef = ref;
             }
         } catch (NamingException e) {
-            throw new RuntimeException("Unable to bind business remote deployment in jndi.", e);
+            throw new OpenEJBRuntimeException("Unable to bind business remote deployment in jndi.", e);
         }
 
         try {
@@ -479,7 +479,7 @@ public class JndiBuilder {
                 if (simpleNameRef == null) simpleNameRef = ref;
             }
         } catch (NamingException e) {
-            throw new RuntimeException("Unable to bind local home interface for deployment " + id, e);
+            throw new OpenEJBRuntimeException("Unable to bind local home interface for deployment " + id, e);
         }
 
         try {
@@ -504,7 +504,7 @@ public class JndiBuilder {
                 if (simpleNameRef == null) simpleNameRef = ref;
             }
         } catch (NamingException e) {
-            throw new RuntimeException("Unable to bind remote home interface for deployment " + id, e);
+            throw new OpenEJBRuntimeException("Unable to bind remote home interface for deployment " + id, e);
         }
 
         try {
@@ -512,7 +512,7 @@ public class JndiBuilder {
                 bindJava(bean, null, simpleNameRef, bindings, beanInfo);
             }
         } catch (NamingException e) {
-            throw new RuntimeException("Unable to bind simple java:global name in jndi", e);
+            throw new OpenEJBRuntimeException("Unable to bind simple java:global name in jndi", e);
         }
 
         try {
@@ -527,7 +527,7 @@ public class JndiBuilder {
                 bind("openejb/remote/" + deploymentId, reference, bindings, beanInfo, MessageListener.class);
             }
         } catch (NamingException e) {
-            throw new RuntimeException("Unable to bind mdb destination in jndi.", e);
+            throw new OpenEJBRuntimeException("Unable to bind mdb destination in jndi.", e);
         }
     }
 

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBLifecycle.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBLifecycle.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBLifecycle.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBLifecycle.java Sun Mar  4 22:55:51 2012
@@ -18,6 +18,7 @@ package org.apache.openejb.cdi;
 
 import org.apache.openejb.AppContext;
 import org.apache.openejb.BeanContext;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.assembler.classic.Assembler;
 import org.apache.webbeans.component.InjectionPointBean;
 import org.apache.webbeans.component.InjectionTargetWrapper;
@@ -342,7 +343,7 @@ public class OpenEJBLifecycle implements
 
         } catch (Exception e1) {
             Assembler.logger.error("CDI Beans module deployment failed", e1);
-            throw new RuntimeException(e1);
+            throw new OpenEJBRuntimeException(e1);
         }
         //Start actual starting on sub-classes
         afterStartApplication(startupObject);

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBValidatorService.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBValidatorService.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBValidatorService.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBValidatorService.java Sun Mar  4 22:55:51 2012
@@ -18,6 +18,7 @@
 
 package org.apache.openejb.cdi;
 
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.webbeans.spi.ValidatorService;
 
 import javax.naming.InitialContext;
@@ -34,7 +35,7 @@ public class OpenEJBValidatorService imp
         try {
             return (ValidatorFactory)new InitialContext().lookup("java:comp/ValidatorFactory");
         } catch (NamingException e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBRuntimeException(e);
         }
     }
 
@@ -43,7 +44,7 @@ public class OpenEJBValidatorService imp
         try {
             return (Validator)new InitialContext().lookup("java:comp/Validator");
         } catch (NamingException e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBRuntimeException(e);
         }
     }
 }

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java Sun Mar  4 22:55:51 2012
@@ -19,6 +19,7 @@
 package org.apache.openejb.cdi;
 
 import org.apache.openejb.AppContext;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.assembler.classic.AppInfo;
 import org.apache.openejb.assembler.classic.EjbJarInfo;
 import org.apache.openejb.loader.SystemInstance;
@@ -106,7 +107,7 @@ public class ThreadSingletonServiceImpl 
             try {
                 webBeansContext.getService(ContainerLifecycle.class).startApplication(startupObject);
             } catch (Exception e) {
-                throw new RuntimeException("couldn't start owb context", e);
+                throw new OpenEJBRuntimeException("couldn't start owb context", e);
             }
         } finally {
             contextExited(old);

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConvertDataSourceDefinitions.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConvertDataSourceDefinitions.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConvertDataSourceDefinitions.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConvertDataSourceDefinitions.java Sun Mar  4 22:55:51 2012
@@ -17,6 +17,7 @@
 package org.apache.openejb.config;
 
 import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.config.sys.Resource;
 import org.apache.openejb.jee.DataSource;
 import org.apache.openejb.jee.JndiConsumer;
@@ -117,7 +118,7 @@ public class ConvertDataSourceDefinition
             p.store(out, "");
             return new String(out.toByteArray());
         } catch (IOException e) {
-            throw new RuntimeException(String.format("Cannot canonicalize the @DataSourceDefinition %s as a properties string", d.getName()));
+            throw new OpenEJBRuntimeException(String.format("Cannot canonicalize the @DataSourceDefinition %s as a properties string", d.getName()));
         }
     }
 

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/RemoteServer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/RemoteServer.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/RemoteServer.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/RemoteServer.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.openejb.config;
 
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.loader.Options;
 import org.apache.openejb.util.Join;
 import org.apache.openejb.util.Pipe;
@@ -84,7 +85,7 @@ public class RemoteServer {
             remoteServer.serverHasAlreadyBeenStarted = false;
             remoteServer.stop();
         } else {
-            throw new RuntimeException("valid arguments are 'start' or 'stop'");
+            throw new OpenEJBRuntimeException("valid arguments are 'start' or 'stop'");
         }
     }
     public Properties getProperties() {
@@ -309,13 +310,13 @@ public class RemoteServer {
                 Pipe.pipe(server);
 
             } catch (Exception e) {
-                throw (RuntimeException)new RuntimeException("Cannot start the server.  Exception: "+e.getClass().getName()+": "+e.getMessage()).initCause(e);
+                throw (RuntimeException) new OpenEJBRuntimeException("Cannot start the server.  Exception: "+e.getClass().getName()+": "+e.getMessage()).initCause(e);
             }
             if (checkPortAvailable) {
                 if (debug) {
-                    if (!connect(Integer.MAX_VALUE)) throw new RuntimeException("Could not connect to server");
+                    if (!connect(Integer.MAX_VALUE)) throw new OpenEJBRuntimeException("Could not connect to server");
                 } else {
-                    if (!connect(tries)) throw new RuntimeException("Could not connect to server");
+                    if (!connect(tries)) throw new OpenEJBRuntimeException("Could not connect to server");
                 }
             }
         } else {

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/VmDeploymentManager.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/VmDeploymentManager.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/VmDeploymentManager.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/VmDeploymentManager.java Sun Mar  4 22:55:51 2012
@@ -18,6 +18,7 @@ package org.apache.openejb.config;
 
 import org.apache.openejb.NoSuchApplicationException;
 import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.UndeployException;
 import org.apache.openejb.assembler.Deployer;
 import org.apache.openejb.assembler.classic.AppInfo;
@@ -50,7 +51,6 @@ import javax.enterprise.deploy.spi.statu
 import javax.naming.InitialContext;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintStream;
@@ -97,7 +97,7 @@ public class VmDeploymentManager impleme
             try {
                 openejbUri = new URI("ejbd", null, "localhost", 4201, null, null, null).toString();
             } catch (URISyntaxException e) {
-                throw new RuntimeException(e);
+                throw new OpenEJBRuntimeException(e);
             }
         }
         this.openejbUri = openejbUri;
@@ -116,7 +116,7 @@ public class VmDeploymentManager impleme
                 InitialContext ctx = new InitialContext(p);
                 deployer = (Deployer) ctx.lookup(deployerJndi);
             } catch (Exception e) {
-                throw new RuntimeException(e);
+                throw new OpenEJBRuntimeException(e);
             }
         }
         return deployer;

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckAsynchronous.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckAsynchronous.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckAsynchronous.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckAsynchronous.java Sun Mar  4 22:55:51 2012
@@ -17,15 +17,8 @@
 
 package org.apache.openejb.config.rules;
 
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.Future;
-
-import javax.ejb.Asynchronous;
-
 import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.config.EjbModule;
 import org.apache.openejb.jee.ApplicationException;
 import org.apache.openejb.jee.AsyncMethod;
@@ -34,6 +27,13 @@ import org.apache.openejb.jee.MethodPara
 import org.apache.openejb.jee.SessionBean;
 import org.apache.xbean.finder.ClassFinder;
 
+import javax.ejb.Asynchronous;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.Future;
+
 /**
  * @version $Rev$ $Date$
  */
@@ -139,7 +139,7 @@ public class CheckAsynchronous extends V
         } catch (NoSuchMethodException e) {
             return null;
         } catch (OpenEJBException e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBRuntimeException(e);
         }
     }
 }

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckClasses.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckClasses.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckClasses.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckClasses.java Sun Mar  4 22:55:51 2012
@@ -17,32 +17,33 @@
 package org.apache.openejb.config.rules;
 
 import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.api.Proxy;
+import org.apache.openejb.config.EjbModule;
 import org.apache.openejb.jee.EnterpriseBean;
-import org.apache.openejb.jee.RemoteBean;
 import org.apache.openejb.jee.EntityBean;
-import org.apache.openejb.jee.SessionBean;
 import org.apache.openejb.jee.Interceptor;
-import org.apache.openejb.config.EjbModule;
+import org.apache.openejb.jee.RemoteBean;
+import org.apache.openejb.jee.SessionBean;
 import org.apache.openejb.util.SafeToolkit;
 import org.apache.openejb.util.Strings;
 import org.apache.xbean.finder.ClassFinder;
 
+import javax.ejb.EJBHome;
 import javax.ejb.EJBLocalHome;
 import javax.ejb.EJBLocalObject;
-import javax.ejb.EJBHome;
 import javax.ejb.EJBObject;
 import javax.ejb.Local;
 import javax.ejb.Remote;
 import javax.jws.WebService;
 import javax.persistence.PersistenceContext;
-
-import static java.lang.reflect.Modifier.isAbstract;
-import java.lang.reflect.Method;
 import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
 
+import static java.lang.reflect.Modifier.isAbstract;
+
 /**
  * @version $Rev$ $Date$
  */
@@ -115,7 +116,7 @@ public class CheckClasses extends Valida
                     }
                 }
             } catch (RuntimeException e) {
-                throw new RuntimeException(bean.getEjbName(), e);
+                throw new OpenEJBRuntimeException(bean.getEjbName(), e);
             }
         }
 

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java Sun Mar  4 22:55:51 2012
@@ -19,15 +19,15 @@ package org.apache.openejb.core;
 import org.apache.openejb.AppContext;
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.Container;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.loader.SystemInstance;
 
+import javax.naming.Context;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import javax.naming.Context;
-
 /**
  * @org.apache.xbean.XBean element="containerSystem"
  */
@@ -62,11 +62,11 @@ public class CoreContainerSystem impleme
             || !(jndiContext.lookup("openejb/client") instanceof Context)
             || !(jndiContext.lookup("openejb/Deployment") instanceof Context)
             || !(jndiContext.lookup("openejb/global") instanceof Context)) {
-                throw new RuntimeException("core openejb naming context not properly initialized.  It must have subcontexts for openejb/local, openejb/remote, openejb/client, and openejb/Deployment already present");
+                throw new OpenEJBRuntimeException("core openejb naming context not properly initialized.  It must have subcontexts for openejb/local, openejb/remote, openejb/client, and openejb/Deployment already present");
             }
         }
         catch (javax.naming.NamingException exception) {
-            throw new RuntimeException("core openejb naming context not properly initialized.  It must have subcontexts for openejb/local, openejb/remote, openejb/client, and openejb/Deployment already present", exception);
+            throw new OpenEJBRuntimeException("core openejb naming context not properly initialized.  It must have subcontexts for openejb/local, openejb/remote, openejb/client, and openejb/Deployment already present", exception);
         }
         SystemInstance.get().setComponent(JndiFactory.class, jndiFactory);
     }

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/LocalInitialContext.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/LocalInitialContext.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/LocalInitialContext.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/LocalInitialContext.java Sun Mar  4 22:55:51 2012
@@ -21,6 +21,7 @@ import org.apache.openejb.OpenEJB;
 import org.apache.openejb.Injection;
 import org.apache.openejb.InjectionProcessor;
 import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.api.LocalClient;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.loader.Options;
@@ -141,7 +142,7 @@ public class LocalInitialContext extends
                 ClientSecurity.setIdentity(null);
             }
         } catch (LoginException e) {
-            throw new RuntimeException("User could not be logged out.", e);
+            throw new OpenEJBRuntimeException("User could not be logged out.", e);
         }
     }
 

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/cmp/cmp2/Cmp2Generator.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/cmp/cmp2/Cmp2Generator.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/cmp/cmp2/Cmp2Generator.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/cmp/cmp2/Cmp2Generator.java Sun Mar  4 22:55:51 2012
@@ -28,6 +28,7 @@ import java.util.Map;
 
 import javax.ejb.EntityContext;
 
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.xbean.asm.ClassWriter;
 import org.apache.xbean.asm.FieldVisitor;
 import org.apache.xbean.asm.Label;
@@ -1174,7 +1175,7 @@ public class Cmp2Generator implements Op
                 toObject = objectClass.getMethod("valueOf", primitiveClass);
                 toPrimitive = objectClass.getMethod(toPrimitiveMethodName);
             } catch (NoSuchMethodException e) {
-                throw new RuntimeException(e);
+                throw new OpenEJBRuntimeException(e);
             }
 
             conversionsByPrimitive.put(primitiveClass, this);

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/cmp/cmp2/EjbSelect.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/cmp/cmp2/EjbSelect.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/cmp/cmp2/EjbSelect.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/cmp/cmp2/EjbSelect.java Sun Mar  4 22:55:51 2012
@@ -16,15 +16,15 @@
  */
 package org.apache.openejb.core.cmp.cmp2;
 
-import java.lang.reflect.Method;
-import java.util.HashMap;
-
-import javax.ejb.FinderException;
-
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.Container;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.core.cmp.CmpContainer;
 
+import javax.ejb.FinderException;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+
 /**
  * DO NOT REFACTOR THIS CLASS.  This class is referenced directly by generated code.
  * 
@@ -50,7 +50,7 @@ public class EjbSelect {
             selectMethods.put(Float.TYPE, EjbSelect.class.getMethod("execute_float", Object.class, String.class, Object[].class));
             selectMethods.put(Double.TYPE, EjbSelect.class.getMethod("execute_double", Object.class, String.class, Object[].class));
         } catch (NoSuchMethodException e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBRuntimeException(e);
         }
     }
     

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbHomeProxyHandler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbHomeProxyHandler.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbHomeProxyHandler.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbHomeProxyHandler.java Sun Mar  4 22:55:51 2012
@@ -19,6 +19,7 @@ package org.apache.openejb.core.ivm;
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.BeanType;
 import org.apache.openejb.InterfaceType;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.ProxyInfo;
 import org.apache.openejb.core.ServerFederation;
 import org.apache.openejb.core.entity.EntityEjbHomeHandler;
@@ -29,7 +30,6 @@ import org.apache.openejb.core.stateless
 import org.apache.openejb.spi.ApplicationServer;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
-import org.apache.openejb.util.proxy.DynamicProxyImplFactory;
 import org.apache.openejb.util.proxy.LocalBeanProxyFactory;
 import org.apache.openejb.util.proxy.ProxyManager;
 
@@ -120,7 +120,7 @@ public abstract class EjbHomeProxyHandle
 
             return ProxyManager.newProxyInstance(proxyInterfaces.toArray(new Class[]{}), handler);
         } catch (Exception e) {
-            throw new RuntimeException("Can't create EJBHome stub" + e.getMessage(), e);
+            throw new OpenEJBRuntimeException("Can't create EJBHome stub" + e.getMessage(), e);
         }
     }
 
@@ -144,7 +144,7 @@ public abstract class EjbHomeProxyHandle
             }
 
         } catch (IllegalAccessException iae) {
-            throw new RuntimeException("Could not create IVM proxy for " + getInterfaces().get(0), iae);
+            throw new OpenEJBRuntimeException("Could not create IVM proxy for " + getInterfaces().get(0), iae);
         }
     }
 
@@ -195,7 +195,7 @@ public abstract class EjbHomeProxyHandle
                         break;
                     }
                     default:
-                        throw new RuntimeException("Inconsistent internal state: value " + operation + " for operation " + methodName);
+                        throw new OpenEJBRuntimeException("Inconsistent internal state: value " + operation + " for operation " + methodName);
                 }
             }
 

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbObjectProxyHandler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbObjectProxyHandler.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbObjectProxyHandler.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbObjectProxyHandler.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,22 @@
  */
 package org.apache.openejb.core.ivm;
 
+import org.apache.openejb.AppContext;
+import org.apache.openejb.BeanContext;
+import org.apache.openejb.InterfaceType;
+import org.apache.openejb.OpenEJBRuntimeException;
+import org.apache.openejb.core.ServerFederation;
+import org.apache.openejb.core.ThreadContext;
+import org.apache.openejb.spi.ApplicationServer;
+import org.apache.openejb.util.LogCategory;
+import org.apache.openejb.util.Logger;
+
+import javax.ejb.AccessLocalException;
+import javax.ejb.EJBAccessException;
+import javax.ejb.EJBException;
+import javax.ejb.EJBLocalObject;
+import javax.ejb.EJBObject;
+import javax.ejb.NoSuchEJBException;
 import java.io.ObjectStreamException;
 import java.lang.reflect.Method;
 import java.rmi.AccessException;
@@ -33,23 +49,6 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import javax.ejb.AccessLocalException;
-import javax.ejb.ConcurrentAccessTimeoutException;
-import javax.ejb.EJBAccessException;
-import javax.ejb.EJBException;
-import javax.ejb.EJBLocalObject;
-import javax.ejb.EJBObject;
-import javax.ejb.NoSuchEJBException;
-
-import org.apache.openejb.AppContext;
-import org.apache.openejb.BeanContext;
-import org.apache.openejb.InterfaceType;
-import org.apache.openejb.core.ServerFederation;
-import org.apache.openejb.core.ThreadContext;
-import org.apache.openejb.spi.ApplicationServer;
-import org.apache.openejb.util.LogCategory;
-import org.apache.openejb.util.Logger;
-
 public abstract class EjbObjectProxyHandler extends BaseEjbProxyHandler {
     private static final Logger logger = Logger.getInstance(LogCategory.OPENEJB, "org.apache.openejb.util.resources");
     static final Map<String, Integer> dispatchTable;
@@ -111,7 +110,7 @@ public abstract class EjbObjectProxyHand
                         retValue = getEJBLocalHome(m, a, p);
                         break;
                     default:
-                        throw new RuntimeException("Inconsistent internal state");
+                        throw new OpenEJBRuntimeException("Inconsistent internal state");
                 }
             }
 

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/IntraVmHandle.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/IntraVmHandle.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/IntraVmHandle.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/IntraVmHandle.java Sun Mar  4 22:55:51 2012
@@ -16,14 +16,14 @@
  */
 package org.apache.openejb.core.ivm;
 
-import java.io.ObjectStreamException;
+import org.apache.openejb.OpenEJBRuntimeException;
+import org.apache.openejb.core.ServerFederation;
+import org.apache.openejb.spi.ApplicationServer;
+import org.apache.openejb.util.proxy.ProxyManager;
 
 import javax.ejb.EJBHome;
 import javax.ejb.EJBObject;
-
-import org.apache.openejb.util.proxy.ProxyManager;
-import org.apache.openejb.spi.ApplicationServer;
-import org.apache.openejb.core.ServerFederation;
+import java.io.ObjectStreamException;
 
 public class IntraVmHandle implements java.io.Serializable, javax.ejb.HomeHandle, javax.ejb.Handle {
     protected Object theProxy;
@@ -76,7 +76,7 @@ public class IntraVmHandle implements ja
                 ApplicationServer applicationServer = ServerFederation.getApplicationServer();
                 return applicationServer.getHomeHandle(handler.getProxyInfo());
             } else {
-                throw new RuntimeException("Invalid proxy type. Handles are only supported by EJBObject types in EJB 1.1");
+                throw new OpenEJBRuntimeException("Invalid proxy type. Handles are only supported by EJBObject types in EJB 1.1");
             }
         }
     }

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/IvmJndiFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/IvmJndiFactory.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/IvmJndiFactory.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/IvmJndiFactory.java Sun Mar  4 22:55:51 2012
@@ -18,13 +18,12 @@
 
 package org.apache.openejb.core.ivm.naming;
 
-import java.util.Map;
-
-
-import javax.naming.*;
-
-import org.apache.openejb.core.JndiFactory;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.SystemException;
+import org.apache.openejb.core.JndiFactory;
+
+import javax.naming.Context;
+import java.util.Map;
 
 /**
  * @version $Rev$ $Date$
@@ -41,7 +40,7 @@ public class IvmJndiFactory implements J
             jndiRootContext.bind("openejb/Deployment/.", "");
             jndiRootContext.bind("openejb/global/.", "");
         } catch (javax.naming.NamingException e) {
-            throw new RuntimeException("this should not happen", e);
+            throw new OpenEJBRuntimeException("this should not happen", e);
         }
     }
 

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/NameNode.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/NameNode.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/NameNode.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/NameNode.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,8 @@
  */
 package org.apache.openejb.core.ivm.naming;
 
+import org.apache.openejb.OpenEJBRuntimeException;
+
 import javax.naming.*;
 import java.io.PrintStream;
 import java.util.ArrayList;
@@ -333,7 +335,7 @@ public class NameNode implements java.io
         }
         catch (javax.naming.NameNotFoundException exception) {
             exception.printStackTrace();
-            throw new RuntimeException(exception);
+            throw new OpenEJBRuntimeException(exception);
         }
     }
 

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/managed/ManagedContainer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/managed/ManagedContainer.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/managed/ManagedContainer.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/managed/ManagedContainer.java Sun Mar  4 22:55:51 2012
@@ -22,6 +22,7 @@ import org.apache.openejb.ContainerType;
 import org.apache.openejb.InterfaceType;
 import org.apache.openejb.InvalidateReferenceException;
 import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.ProxyInfo;
 import org.apache.openejb.RpcContainer;
 import org.apache.openejb.SystemException;
@@ -68,7 +69,6 @@ import javax.naming.NamingException;
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManagerFactory;
 import javax.transaction.Transaction;
-import java.lang.management.ManagementFactory;
 import java.lang.reflect.Method;
 import java.rmi.NoSuchObjectException;
 import java.rmi.RemoteException;
@@ -896,7 +896,7 @@ public class ManagedContainer implements
                 // Caller handles transaction rollback and discardInstance
 
                 // [4] throw the java.rmi.RemoteException to the client
-                throw new RuntimeException(message, e);
+                throw new OpenEJBRuntimeException(message, e);
             } finally {
                 ThreadContext.exit(oldCallContext);
             }
@@ -941,7 +941,7 @@ public class ManagedContainer implements
                     discardInstance(callContext);
 
                     // [4] throw the java.rmi.RemoteException to the client
-                    throw new RuntimeException(message, e);
+                    throw new OpenEJBRuntimeException(message, e);
                 } finally {
                     ThreadContext.exit(oldCallContext);
                 }
@@ -989,7 +989,7 @@ public class ManagedContainer implements
             }
 
             if (firstException != null) {
-                throw new RuntimeException("An unexpected system exception occured while invoking the afterCompletion method on the SessionSynchronization object", firstException);
+                throw new OpenEJBRuntimeException("An unexpected system exception occured while invoking the afterCompletion method on the SessionSynchronization object", firstException);
             }
         }
     }

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/managed/SimpleCache.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/managed/SimpleCache.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/managed/SimpleCache.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/managed/SimpleCache.java Sun Mar  4 22:55:51 2012
@@ -27,6 +27,7 @@ import java.util.concurrent.LinkedBlocki
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.ReentrantLock;
 
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
 import org.apache.openejb.util.Duration;
@@ -200,7 +201,7 @@ public class SimpleCache<K, V> implement
         if (entry != null) {
             lru.remove(entry);
         }
-        throw new RuntimeException("Cache is corrupted: the entry " + key + " in the Map 'cache' is in state PASSIVATED");
+        throw new OpenEJBRuntimeException("Cache is corrupted: the entry " + key + " in the Map 'cache' is in state PASSIVATED");
     }
 
     public void checkIn(K key) {

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/SimpleCache.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/SimpleCache.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/SimpleCache.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/SimpleCache.java Sun Mar  4 22:55:51 2012
@@ -31,6 +31,7 @@ import java.util.concurrent.ThreadFactor
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.ReentrantLock;
 
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
 import org.apache.openejb.util.Duration;
@@ -273,7 +274,7 @@ public class SimpleCache<K, V> implement
         if (entry != null) {
             lru.remove(entry);
         }
-        throw new RuntimeException("Cache is corrupted: the entry " + key + " in the Map 'cache' is in state PASSIVATED");
+        throw new OpenEJBRuntimeException("Cache is corrupted: the entry " + key + " in the Map 'cache' is in state PASSIVATED");
     }
 
     public void checkIn(K key) {

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java Sun Mar  4 22:55:51 2012
@@ -22,6 +22,7 @@ import org.apache.openejb.ContainerType;
 import org.apache.openejb.InterfaceType;
 import org.apache.openejb.InvalidateReferenceException;
 import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.ProxyInfo;
 import org.apache.openejb.RpcContainer;
 import org.apache.openejb.SystemException;
@@ -71,7 +72,6 @@ import javax.naming.NamingException;
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManagerFactory;
 import javax.transaction.Transaction;
-import java.lang.management.ManagementFactory;
 import java.lang.reflect.Method;
 import java.rmi.NoSuchObjectException;
 import java.rmi.RemoteException;
@@ -998,7 +998,7 @@ public class StatefulContainer implement
                 // Caller handles transaction rollback and discardInstance
 
                 // [4] throw the java.rmi.RemoteException to the client
-                throw new RuntimeException(message, e);
+                throw new OpenEJBRuntimeException(message, e);
             } finally {
                 ThreadContext.exit(oldCallContext);
             }
@@ -1043,7 +1043,7 @@ public class StatefulContainer implement
                     discardInstance(callContext);
 
                     // [4] throw the java.rmi.RemoteException to the client
-                    throw new RuntimeException(message, e);
+                    throw new OpenEJBRuntimeException(message, e);
                 } finally {
                     ThreadContext.exit(oldCallContext);
                 }
@@ -1091,7 +1091,7 @@ public class StatefulContainer implement
             }
 
             if (firstException != null) {
-                throw new RuntimeException("An unexpected system exception occured while invoking the afterCompletion method on the SessionSynchronization object", firstException);
+                throw new OpenEJBRuntimeException("An unexpected system exception occured while invoking the afterCompletion method on the SessionSynchronization object", firstException);
             }
         }
     }

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/timer/DatabaseTimerStore.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/timer/DatabaseTimerStore.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/timer/DatabaseTimerStore.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/timer/DatabaseTimerStore.java Sun Mar  4 22:55:51 2012
@@ -17,9 +17,20 @@
 
 package org.apache.openejb.core.timer;
 
+import org.apache.openejb.OpenEJBRuntimeException;
+import org.apache.openejb.util.Base64;
+import org.apache.openejb.util.LogCategory;
+import org.apache.openejb.util.Logger;
+
 import javax.ejb.ScheduleExpression;
 import javax.ejb.TimerConfig;
 import javax.sql.DataSource;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.lang.reflect.Method;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
@@ -27,16 +38,6 @@ import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutputStream;
-import java.io.IOException;
-import java.io.ByteArrayInputStream;
-import java.io.ObjectInputStream;
-import java.lang.reflect.Method;
-
-import org.apache.openejb.util.LogCategory;
-import org.apache.openejb.util.Logger;
-import org.apache.openejb.util.Base64;
 
 public class DatabaseTimerStore implements TimerStore {
     private static final Logger log = Logger.getInstance(LogCategory.TIMER, "org.apache.openejb.util.resources");
@@ -282,7 +283,7 @@ public class DatabaseTimerStore implemen
             byte[] encoded = Base64.encodeBase64(baos.toByteArray());
             return new String(encoded);
         } catch (IOException e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBRuntimeException(e);
         }
     }
 
@@ -293,7 +294,7 @@ public class DatabaseTimerStore implemen
             ObjectInputStream in = new ObjectInputStream(bais);
             return in.readObject();
         } catch (Exception e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBRuntimeException(e);
         }
     }
 

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EjbTimerServiceImpl.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EjbTimerServiceImpl.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EjbTimerServiceImpl.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EjbTimerServiceImpl.java Sun Mar  4 22:55:51 2012
@@ -19,6 +19,7 @@ package org.apache.openejb.core.timer;
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.InterfaceType;
 import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.RpcContainer;
 import org.apache.openejb.core.BaseContext;
 import org.apache.openejb.core.transaction.TransactionType;
@@ -103,7 +104,7 @@ public class EjbTimerServiceImpl impleme
                         .build();
                 scheduler.addJob(job, true);
             } catch (SchedulerException e) {
-                throw new RuntimeException("Fail to initialize the default scheduler", e);
+                throw new OpenEJBRuntimeException("Fail to initialize the default scheduler", e);
             }
             SystemInstance.get().setComponent(Scheduler.class, scheduler);
         }
@@ -116,7 +117,7 @@ public class EjbTimerServiceImpl impleme
         if (scheduler != null) try {
             scheduler.shutdown();
         } catch (SchedulerException e) {
-            throw new RuntimeException("Unable to shutdown scheduler", e);
+            throw new OpenEJBRuntimeException("Unable to shutdown scheduler", e);
         }
 
     }
@@ -161,7 +162,7 @@ public class EjbTimerServiceImpl impleme
             atrigger.setJobName(OPENEJB_TIMEOUT_JOB_NAME);
             atrigger.setJobGroup(OPENEJB_TIMEOUT_JOB_GROUP_NAME);
         } else {
-            throw new RuntimeException("the trigger was not an AbstractTrigger - it shouldn't be possible");
+            throw new OpenEJBRuntimeException("the trigger was not an AbstractTrigger - it shouldn't be possible");
         }
         JobDataMap triggerDataMap = trigger.getJobDataMap();
         triggerDataMap.put(EjbTimeoutJob.EJB_TIMERS_SERVICE, this);

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/JaxWsUtils.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/JaxWsUtils.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/JaxWsUtils.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/JaxWsUtils.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,8 @@
  */
 package org.apache.openejb.core.webservices;
 
+import org.apache.openejb.OpenEJBRuntimeException;
+
 import javax.jws.WebService;
 import javax.xml.namespace.QName;
 import javax.xml.ws.BindingType;
@@ -187,7 +189,7 @@ public class JaxWsUtils {
                     Class seiClass = clazz.getClassLoader().loadClass(sei.trim());
                     return getNameFromInterface(seiClass);
                 } catch (ClassNotFoundException e) {
-                    throw new RuntimeException("Unable to load SEI class: " + sei, e);
+                    throw new OpenEJBRuntimeException("Unable to load SEI class: " + sei, e);
                 }
             }
             return getName(clazz, webService.name());

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.openejb.core.webservices;
 
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.loader.IO;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
@@ -439,7 +440,7 @@ public class ProviderWrapper extends Pro
                 out.close();
                 PROVIDER_URL = tempFile.toURI().toURL();
             } catch (IOException e) {
-                throw new RuntimeException("Cound not create openejb-jaxws-provider file");
+                throw new OpenEJBRuntimeException("Cound not create openejb-jaxws-provider file");
             }
         }
 

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/UriResolver.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/UriResolver.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/UriResolver.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/UriResolver.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.openejb.core.webservices;
 
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.loader.IO;
 import org.apache.openejb.util.Base64;
 
@@ -182,7 +183,7 @@ public class UriResolver {
             try {
                 is = new FileInputStream(file);
             } catch (FileNotFoundException e) {
-                throw new RuntimeException("File was deleted! " + uriStr, e);
+                throw new OpenEJBRuntimeException("File was deleted! " + uriStr, e);
             }
             url = file.toURI().toURL();
         } else if (is == null) {

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/math/MathRuntimeException.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/math/MathRuntimeException.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/math/MathRuntimeException.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/math/MathRuntimeException.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,8 @@
  */
 package org.apache.openejb.math;
 
+import org.apache.openejb.OpenEJBRuntimeException;
+
 import java.io.EOFException;
 import java.io.IOException;
 import java.io.PrintStream;
@@ -488,29 +490,7 @@ public class MathRuntimeException extend
      * @return an {@link java.lang.RuntimeException} for an internal error
      */
     public static RuntimeException createInternalError(final Throwable cause) {
-
-        final String pattern  = "internal error, please fill a bug report at {0}";
-        final String argument = "https://issues.apache.org/jira/browse/MATH";
-
-        return new RuntimeException() {
-
-            /** Serializable version identifier. */
-            private static final long serialVersionUID = -201865440834027016L;
-
-            /** {@inheritDoc} */
-            @Override
-            public String getMessage() {
-                return buildMessage(Locale.US, pattern, argument);
-            }
-
-            /** {@inheritDoc} */
-            @Override
-            public String getLocalizedMessage() {
-                return buildMessage(Locale.getDefault(), pattern, argument);
-            }
-
-        };
-
+        return new OpenEJBRuntimeException("internal error, please fill a bug report at https://issues.apache.org/jira/browse/MATH", cause);
     }
 
 }

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQFactory.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQFactory.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQFactory.java Sun Mar  4 22:55:51 2012
@@ -17,6 +17,7 @@
 package org.apache.openejb.resource.activemq;
 
 import org.apache.activemq.broker.BrokerService;
+import org.apache.openejb.OpenEJBRuntimeException;
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -50,7 +51,7 @@ public class ActiveMQFactory {
                         tmp = Class.forName("org.apache.openejb.resource.activemq.ActiveMQ4Factory");
                         brokerPrefix = "amq4factory:";
                     } catch (java.lang.Throwable t2) {
-                        throw new RuntimeException("Unable to load ActiveMQFactory: Check ActiveMQ jar files are on classpath", t1);
+                        throw new OpenEJBRuntimeException("Unable to load ActiveMQFactory: Check ActiveMQ jar files are on classpath", t1);
                     }
                 }
 
@@ -59,27 +60,27 @@ public class ActiveMQFactory {
                 try {
                     instance = clazz.newInstance();
                 } catch (InstantiationException e) {
-                    throw new RuntimeException("Unable to create ActiveMQFactory instance", e);
+                    throw new OpenEJBRuntimeException("Unable to create ActiveMQFactory instance", e);
                 } catch (IllegalAccessException e) {
-                    throw new RuntimeException("Unable to access ActiveMQFactory instance", e);
+                    throw new OpenEJBRuntimeException("Unable to access ActiveMQFactory instance", e);
                 }
 
                 try {
                     setThreadProperties = clazz.getDeclaredMethod("setThreadProperties", new Class[]{Properties.class});
                 } catch (NoSuchMethodException e) {
-                    throw new RuntimeException("Unable to create ActiveMQFactory setThreadProperties method", e);
+                    throw new OpenEJBRuntimeException("Unable to create ActiveMQFactory setThreadProperties method", e);
                 }
 
                 try {
                     createBroker = clazz.getDeclaredMethod("createBroker", new Class[]{URI.class});
                 } catch (NoSuchMethodException e) {
-                    throw new RuntimeException("Unable to create ActiveMQFactory createBroker method", e);
+                    throw new OpenEJBRuntimeException("Unable to create ActiveMQFactory createBroker method", e);
                 }
 
                 try {
                     getBrokers = clazz.getDeclaredMethod("getBrokers", (Class[]) null);
                 } catch (NoSuchMethodException e) {
-                    throw new RuntimeException("Unable to create ActiveMQFactory createBroker method", e);
+                    throw new OpenEJBRuntimeException("Unable to create ActiveMQFactory createBroker method", e);
                 }
             }
         }
@@ -104,11 +105,11 @@ public class ActiveMQFactory {
         try {
             setThreadProperties.invoke(instance, p);
         } catch (IllegalAccessException e) {
-            throw new RuntimeException("ActiveMQFactory.setThreadProperties.IllegalAccessException", e);
+            throw new OpenEJBRuntimeException("ActiveMQFactory.setThreadProperties.IllegalAccessException", e);
         } catch (IllegalArgumentException e) {
-            throw new RuntimeException("ActiveMQFactory.setThreadProperties.IllegalArgumentException", e);
+            throw new OpenEJBRuntimeException("ActiveMQFactory.setThreadProperties.IllegalArgumentException", e);
         } catch (InvocationTargetException e) {
-            throw new RuntimeException("ActiveMQFactory.setThreadProperties.InvocationTargetException", e);
+            throw new OpenEJBRuntimeException("ActiveMQFactory.setThreadProperties.InvocationTargetException", e);
         }
     }
 

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/StaticDESPasswordCipher.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/StaticDESPasswordCipher.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/StaticDESPasswordCipher.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/StaticDESPasswordCipher.java Sun Mar  4 22:55:51 2012
@@ -16,11 +16,12 @@
  */
 package org.apache.openejb.resource.jdbc;
 
+import org.apache.openejb.OpenEJBRuntimeException;
+import org.apache.openejb.util.Base64;
+
 import javax.crypto.Cipher;
 import javax.crypto.spec.SecretKeySpec;
 
-import org.apache.openejb.util.Base64;
-
 /**
  * This {@link PasswordCipher} implementation uses a the Triple-DES encryption
  * algorithm.
@@ -63,7 +64,7 @@ public class StaticDESPasswordCipher imp
             return new String(Base64.encodeBase64(cipherText)).toCharArray();
 
         } catch (Exception e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBRuntimeException(e);
         }
     }
 
@@ -91,7 +92,7 @@ public class StaticDESPasswordCipher imp
             return plainText;
 
         } catch (Exception e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBRuntimeException(e);
         }
     }
 

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/AsmParameterNameLoader.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/AsmParameterNameLoader.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/AsmParameterNameLoader.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/AsmParameterNameLoader.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.openejb.util;
 
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.xbean.asm.ClassReader;
 import org.apache.xbean.asm.Label;
 import org.apache.xbean.asm.MethodVisitor;
@@ -140,10 +141,10 @@ public class AsmParameterNameLoader impl
 
             Map exceptions = visitor.getExceptions();
             if (exceptions.size() == 1) {
-                throw new RuntimeException((Exception) exceptions.values().iterator().next());
+                throw new OpenEJBRuntimeException((Exception) exceptions.values().iterator().next());
             }
             if (!exceptions.isEmpty()) {
-                throw new RuntimeException(exceptions.toString());
+                throw new OpenEJBRuntimeException(exceptions.toString());
             }
 
             constructorParameters = visitor.getConstructorParameters();
@@ -190,10 +191,10 @@ public class AsmParameterNameLoader impl
 
             Map exceptions = visitor.getExceptions();
             if (exceptions.size() == 1) {
-                throw new RuntimeException((Exception) exceptions.values().iterator().next());
+                throw new OpenEJBRuntimeException((Exception) exceptions.values().iterator().next());
             }
             if (!exceptions.isEmpty()) {
-                throw new RuntimeException(exceptions.toString());
+                throw new OpenEJBRuntimeException(exceptions.toString());
             }
 
             methodParameters = visitor.getMethodParameters();

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/UrlCache.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/UrlCache.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/UrlCache.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/UrlCache.java Sun Mar  4 22:55:51 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.openejb.util;
 
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.loader.FileUtils;
 import org.apache.openejb.loader.IO;
 import org.apache.openejb.loader.SystemInstance;
@@ -348,7 +349,7 @@ public class UrlCache {
             return dir;
 
         } catch (IOException e) {
-            throw new RuntimeException(e);
+            throw new OpenEJBRuntimeException(e);
         }
     }
 

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/proxy/DynamicProxyImplFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/proxy/DynamicProxyImplFactory.java?rev=1296892&r1=1296891&r2=1296892&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/proxy/DynamicProxyImplFactory.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/util/proxy/DynamicProxyImplFactory.java Sun Mar  4 22:55:51 2012
@@ -18,6 +18,7 @@
 package org.apache.openejb.util.proxy;
 
 import org.apache.openejb.BeanContext;
+import org.apache.openejb.OpenEJBRuntimeException;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
 
@@ -35,7 +36,7 @@ public class DynamicProxyImplFactory {
             try {
                 em = (EntityManager) context.getJndiEnc().lookup(emLookupName);
             } catch (NamingException e) {
-                throw new RuntimeException("a dynamic bean should reference at least one correct PersistenceContext", e);
+                throw new OpenEJBRuntimeException("a dynamic bean should reference at least one correct PersistenceContext", e);
             }
 
             ((QueryProxy) invocationHandler).setEntityManager(em);
@@ -44,7 +45,7 @@ public class DynamicProxyImplFactory {
         try {
             return ProxyManager.newProxyInstance(context.getLocalInterface(), new Handler(invocationHandler));
         } catch (IllegalAccessException e) {
-            throw new RuntimeException("illegal access", e);
+            throw new OpenEJBRuntimeException("illegal access", e);
         }
     }
 



Mime
View raw message