tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r816018 - /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbHomeProxyHandler.java
Date Thu, 17 Sep 2009 00:24:55 GMT
Author: dblevins
Date: Thu Sep 17 00:24:54 2009
New Revision: 816018

URL: http://svn.apache.org/viewvc?rev=816018&view=rev
Log:
OPENEJB-1075: Workaround for Sun JDK RemoteException initCause bug

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbHomeProxyHandler.java

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbHomeProxyHandler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbHomeProxyHandler.java?rev=816018&r1=816017&r2=816018&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbHomeProxyHandler.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbHomeProxyHandler.java
Thu Sep 17 00:24:54 2009
@@ -229,7 +229,13 @@
                     if (interfaceType.isLocal()) {
                         throw (AccessLocalException)new AccessLocalException(exc.getMessage()).initCause(exc);
                     } else {
-                        throw new AccessException(exc.getMessage()).initCause(exc);
+                        try {
+                            throw new AccessException(exc.getMessage()).initCause(exc);
+                        } catch (IllegalStateException vmbug) {
+                            // Sun JDK 1.5 bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4871783
+                            // bug affects using initCause on any RemoteException subclasses
in Sun 1.5_07 or lower
+                            throw new AccessException(exc.getMessage(), (Exception) exc);
+                        }
                     }
                 }
 



Mime
View raw message