tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andygumbre...@apache.org
Subject [4/5] tomee git commit: Do not mask error
Date Fri, 19 Feb 2016 16:13:18 GMT
Do not mask error


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/7341e10d
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/7341e10d
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/7341e10d

Branch: refs/heads/tomee-1.7.x
Commit: 7341e10d3eeab3abaef3b060c7224954420357d2
Parents: 1e1ad4d
Author: AndyGee <andy.is@gmx.de>
Authored: Fri Feb 19 16:26:36 2016 +0100
Committer: AndyGee <andy.is@gmx.de>
Committed: Fri Feb 19 16:26:36 2016 +0100

----------------------------------------------------------------------
 .../apache/openejb/core/ivm/EjbObjectProxyHandler.java   | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/7341e10d/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbObjectProxyHandler.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbObjectProxyHandler.java
b/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbObjectProxyHandler.java
index 408506e..0d8549b 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbObjectProxyHandler.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/EjbObjectProxyHandler.java
@@ -150,7 +150,11 @@ public abstract class EjbObjectProxyHandler extends BaseEjbProxyHandler
{
             * problem with the container system.
             */
         } catch (final SystemException se) {
-            invalidateReference();
+            try {
+                invalidateReference();
+            } catch (final IllegalStateException ignore) {
+                logger.debug("Tried to invalidate reference before processing system error:
" +ignore.getMessage());
+            }
             exc = se.getRootCause() != null ? se.getRootCause() : se;
             logger.debug("The container received an unexpected exception: ", exc);
             throw new RemoteException("Container has suffered a SystemException", exc);
@@ -247,6 +251,11 @@ public abstract class EjbObjectProxyHandler extends BaseEjbProxyHandler
{
         if (beanContext.isAsynchronous(method)) {
 
             final SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class);
+
+            if(null == securityService){
+                throw new RuntimeException("SecurityService has not been initialized");
+            }
+
             Object stateTmp = securityService.currentState();
             final boolean associate;
             if (stateTmp == null) {


Mime
View raw message