openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r964628 - /openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
Date Thu, 15 Jul 2010 22:16:15 GMT
Author: gerdogdu
Date: Thu Jul 15 22:16:15 2010
New Revision: 964628

URL: http://svn.apache.org/viewvc?rev=964628&view=rev
Log:
Call proceed.context for non-contextual EJB

Modified:
    openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java

Modified: openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java?rev=964628&r1=964627&r2=964628&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
(original)
+++ openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
Thu Jul 15 22:16:15 2010
@@ -452,9 +452,9 @@ public class OpenWebBeansEjbInterceptor
         rv.INTERCEPTOR_OR_DECORATOR_CALL = false;
         if(ejbBean == null)
         {
-            if (logger.wblWillLogWarn())
+            if (logger.wblWillLogDebug())
             {
-                logger.warn(OWBLogConst.WARN_0008,  instance.getClass(), manager.getComponents());
+                logger.debug(OWBLogConst.WARN_0008,  instance.getClass(), manager.getComponents());
             }
             return rv;
         }
@@ -627,40 +627,43 @@ public class OpenWebBeansEjbInterceptor
         BeanManagerImpl manager = BeanManagerImpl.getManager();
         Object instance = ejbContext.getTarget();
         
-        BaseEjbBean<?> bean = findTargetBean(instance);
-        if (bean == null)
+        try 
         { 
-            logger.debug("No bean for instance [{0}]", instance);
-            return;
-        }
-        
-        List<InterceptorData> interceptorStack = bean.getInterceptorStack();
-        
-        if (interceptorStack.size() > 0 && WebBeansUtil.isContainsInterceptorMethod(interceptorStack,
interceptorType)) 
-        {
-            localcc = manager.createCreationalContext(null);
             
-            InvocationContextImpl impl = new InvocationContextImpl(null, instance, null,
null, 
-                    InterceptorUtil.getInterceptorMethods(interceptorStack, interceptorType),
interceptorType);
-            impl.setCreationalContext(localcc);
+            BaseEjbBean<?> bean = findTargetBean(instance);
+            if (bean == null)
+            { 
+                logger.debug("No bean for instance [{0}]", instance);
+                ejbContext.proceed();
+                return;
+            }
+            
+            List<InterceptorData> interceptorStack = bean.getInterceptorStack();
             
-            try
+            if (interceptorStack.size() > 0 && WebBeansUtil.isContainsInterceptorMethod(interceptorStack,
interceptorType)) 
             {
-                impl.proceed();
+                localcc = manager.createCreationalContext(null);
+                
+                InvocationContextImpl impl = new InvocationContextImpl(null, instance, null,
null, 
+                        InterceptorUtil.getInterceptorMethods(interceptorStack, interceptorType),
interceptorType);
+                impl.setCreationalContext(localcc);
+                
+                try
+                {
+                    impl.proceed();
+                }
+                catch (Exception e)
+                {
+                    logger.error(OWBLogConst.ERROR_0008, e, interceptorType);           
    
+                }    
+            }       
+            else 
+            { 
+                logger.debug("No lifecycle interceptors for [{0}]", instance);
             }
-            catch (Exception e)
-            {
-                logger.error(OWBLogConst.ERROR_0008, e, interceptorType);               

-            }    
-        }       
-        else 
-        { 
-            logger.debug("No lifecycle interceptors for [{0}]", instance);
-        }
-
-        try 
-        { 
-           ejbContext.proceed();
+    
+            //Call next interceptor
+            ejbContext.proceed();
         }
         catch (Exception e) 
         { 



Mime
View raw message