tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andygumbre...@apache.org
Subject svn commit: r1206216 - /openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java
Date Fri, 25 Nov 2011 15:29:10 GMT
Author: andygumbrecht
Date: Fri Nov 25 15:29:09 2011
New Revision: 1206216

URL: http://svn.apache.org/viewvc?rev=1206216&view=rev
Log:
Variable 'instance' may be null on logging, so use alternative info.

Modified:
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java

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=1206216&r1=1206215&r2=1206216&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
Fri Nov 25 15:29:09 2011
@@ -550,7 +550,8 @@ public class StatefulContainer implement
                         InterceptorStack interceptorStack = new InterceptorStack(instance.bean,
null, Operation.PRE_DESTROY, callbackInterceptors, instance.interceptors);
                         interceptorStack.invoke();
                     } catch (Throwable t) {
-                        final String logMessage = "An unexpected exception occured while
invoking the preDestroy method on the Stateful SessionBean instance: " + instance.bean.getClass().getName();
+                        final String logMessage = "An unexpected exception occured while
invoking the preDestroy method on the Stateful SessionBean instance: "
+                                + (null != instance ? instance.bean.getClass().getName()
: beanContext.getBeanClass().getName());
                         logger.error(logMessage, t);
 
                     } finally {



Mime
View raw message