openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r993530 - /openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
Date Tue, 07 Sep 2010 20:50:49 GMT
Author: covener
Date: Tue Sep  7 20:50:49 2010
New Revision: 993530

URL: http://svn.apache.org/viewvc?rev=993530&view=rev
Log:
whitespace only for re-indent after r993525

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=993530&r1=993529&r2=993530&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
Tue Sep  7 20:50:49 2010
@@ -486,82 +486,82 @@ public class OpenWebBeansEjbInterceptor 
         InjectionTargetBean<?> injectionTarget = (InjectionTargetBean<?>) threadLocal.get();
         InterceptorDataImpl decoratorInterceptorDataImpl = null;
         
-            List<Object> decorators = null;
-            DelegateHandler delegateHandler = null;
-            logger.debug("Decorator stack for target {0}", injectionTarget.getDecoratorStack());
+        List<Object> decorators = null;
+        DelegateHandler delegateHandler = null;
+        logger.debug("Decorator stack for target {0}", injectionTarget.getDecoratorStack());
 
-            if (injectionTarget.getDecoratorStack().size() > 0)
+        if (injectionTarget.getDecoratorStack().size() > 0)
+        {
+            Class<?> proxyClass = JavassistProxyFactory.getInstance().getInterceptorProxyClasses().get(injectionTarget);
+            if (proxyClass == null)
             {
-                Class<?> proxyClass = JavassistProxyFactory.getInstance().getInterceptorProxyClasses().get(injectionTarget);
-                if (proxyClass == null)
-                {
-                    ProxyFactory delegateFactory = JavassistProxyFactory.getInstance().createProxyFactory(injectionTarget);
-                    proxyClass = JavassistProxyFactory.getInstance().getProxyClass(delegateFactory);
-                    JavassistProxyFactory.getInstance().getInterceptorProxyClasses().put(injectionTarget,
proxyClass);
-                }
-                Object delegate = proxyClass.newInstance();
-                delegateHandler = new DelegateHandler(threadLocal.get(),ejbContext);
-                ((ProxyObject)delegate).setHandler(delegateHandler);
-
-                // Gets component decorator stack
-                decorators = WebBeansDecoratorConfig.getDecoratorStack(injectionTarget, instance,
delegate,
-                                                                       (CreationalContextImpl<?>)threadLocalCreationalContext.get());
                       
-                //Sets decorator stack of delegate
-                delegateHandler.setDecorators(decorators);
-                
-            }
+                ProxyFactory delegateFactory = JavassistProxyFactory.getInstance().createProxyFactory(injectionTarget);
+                proxyClass = JavassistProxyFactory.getInstance().getProxyClass(delegateFactory);
+                JavassistProxyFactory.getInstance().getInterceptorProxyClasses().put(injectionTarget,
proxyClass);
+            }
+            Object delegate = proxyClass.newInstance();
+            delegateHandler = new DelegateHandler(threadLocal.get(),ejbContext);
+            ((ProxyObject)delegate).setHandler(delegateHandler);
+
+            // Gets component decorator stack
+            decorators = WebBeansDecoratorConfig.getDecoratorStack(injectionTarget, instance,
delegate,
+                                                                   (CreationalContextImpl<?>)threadLocalCreationalContext.get());
                       
+            //Sets decorator stack of delegate
+            delegateHandler.setDecorators(decorators);
+            
+        }
 
-            // Run around invoke chain
-            List<InterceptorData> interceptorStack = injectionTarget.getInterceptorStack();
-            if (interceptorStack.size() > 0)
+        // Run around invoke chain
+        List<InterceptorData> interceptorStack = injectionTarget.getInterceptorStack();
+        if (interceptorStack.size() > 0)
+        {
+            if (decorators != null)
             {
-                if (decorators != null)
-                {
-                    // We have interceptors and decorators, Our delegateHandler will need
to be wrapped in an interceptor
-                    WebBeansDecoratorInterceptor lastInterceptor = new WebBeansDecoratorInterceptor(delegateHandler,
instance);
-                    decoratorInterceptorDataImpl = new InterceptorDataImpl(true, lastInterceptor);
-                    decoratorInterceptorDataImpl.setDefinedInInterceptorClass(true);
-                    decoratorInterceptorDataImpl.setAroundInvoke(SecurityUtil.doPrivilegedGetDeclaredMethods(lastInterceptor.getClass())[0]);
-                }
-                
-                if (this.interceptedMethodMap.get(method) == null)
-                {
-                    //Holds filtered interceptor stack
-                    List<InterceptorData> filteredInterceptorStack = new ArrayList<InterceptorData>(interceptorStack);
-
-                    // Filter both EJB and WebBeans interceptors
-                    InterceptorUtil.filterCommonInterceptorStackList(filteredInterceptorStack,
method);
+                // We have interceptors and decorators, Our delegateHandler will need to
be wrapped in an interceptor
+                WebBeansDecoratorInterceptor lastInterceptor = new WebBeansDecoratorInterceptor(delegateHandler,
instance);
+                decoratorInterceptorDataImpl = new InterceptorDataImpl(true, lastInterceptor);
+                decoratorInterceptorDataImpl.setDefinedInInterceptorClass(true);
+                decoratorInterceptorDataImpl.setAroundInvoke(SecurityUtil.doPrivilegedGetDeclaredMethods(lastInterceptor.getClass())[0]);
+            }
+            
+            if (this.interceptedMethodMap.get(method) == null)
+            {
+                //Holds filtered interceptor stack
+                List<InterceptorData> filteredInterceptorStack = new ArrayList<InterceptorData>(interceptorStack);
 
-                    this.interceptedMethodMap.put(method, filteredInterceptorStack);
-                }
-                
-                List<InterceptorData> filteredInterceptorStack = new ArrayList<InterceptorData>(this.interceptedMethodMap.get(method));
-                if (decoratorInterceptorDataImpl != null)
-                {
-                    // created an intereceptor to run our decorators, add it to the calculated
stack
-                    filteredInterceptorStack.add(decoratorInterceptorDataImpl);
-                }
+                // Filter both EJB and WebBeans interceptors
+                InterceptorUtil.filterCommonInterceptorStackList(filteredInterceptorStack,
method);
 
-                // Call Around Invokes
-                if (WebBeansUtil.isContainsInterceptorMethod(filteredInterceptorStack, InterceptorType.AROUND_INVOKE))
-                {
-                     rv.INTERCEPTOR_OR_DECORATOR_CALL = true;
-                     rv.RETURN_VALUE = InterceptorUtil.callAroundInvokes(threadLocal.get(),
instance, (CreationalContextImpl<?>)threadLocalCreationalContext.get(), method, 
-                            arguments, InterceptorUtil.getInterceptorMethods(filteredInterceptorStack,
InterceptorType.AROUND_INVOKE), ejbContext);
-                     
-                     return rv;
-                }
-                
+                this.interceptedMethodMap.put(method, filteredInterceptorStack);
             }
             
-            // If there are Decorators, allow the delegate handler to
-            // manage the stack
-            if (decorators != null)
+            List<InterceptorData> filteredInterceptorStack = new ArrayList<InterceptorData>(this.interceptedMethodMap.get(method));
+            if (decoratorInterceptorDataImpl != null)
+            {
+                // created an intereceptor to run our decorators, add it to the calculated
stack
+                filteredInterceptorStack.add(decoratorInterceptorDataImpl);
+            }
+
+            // Call Around Invokes
+            if (WebBeansUtil.isContainsInterceptorMethod(filteredInterceptorStack, InterceptorType.AROUND_INVOKE))
             {
-                rv.INTERCEPTOR_OR_DECORATOR_CALL = true;
-                rv.RETURN_VALUE = delegateHandler.invoke(instance, method, null, arguments);

-                return rv;
-            } 
+                 rv.INTERCEPTOR_OR_DECORATOR_CALL = true;
+                 rv.RETURN_VALUE = InterceptorUtil.callAroundInvokes(threadLocal.get(), instance,
(CreationalContextImpl<?>)threadLocalCreationalContext.get(), method, 
+                        arguments, InterceptorUtil.getInterceptorMethods(filteredInterceptorStack,
InterceptorType.AROUND_INVOKE), ejbContext);
+                 
+                 return rv;
+            }
+            
+        }
+        
+        // If there are Decorators, allow the delegate handler to
+        // manage the stack
+        if (decorators != null)
+        {
+            rv.INTERCEPTOR_OR_DECORATOR_CALL = true;
+            rv.RETURN_VALUE = delegateHandler.invoke(instance, method, null, arguments);

+            return rv;
+        } 
         
         rv.INTERCEPTOR_OR_DECORATOR_CALL = false;
         



Mime
View raw message