Re: svn commit: r979071 - in /openwebbeans/trunk: webbeans-ejb/ webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/ webbeans-impl/ webbeans-impl/src/main/java/org/apache/webbeans/

2010-07-26 Thread Eric Covener
On Mon, Jul 26, 2010 at 10:10 AM, Gurkan Erdogdu
gurkanerdo...@yahoo.com wrote:
 Hello,

 This commit breaks following TCK tests,

 1- DecoratorAndInterceptorTest # testInterceptorCalledBeforeDecorator
 2- InterceptorCalledBeforeDecoratorTest # testInterceptorCalledBeforeDecorator


I may be reverting this due to the EJB dependency leaking into -impl,
will take a look this afternoon.  I ran standalone with no
regression, but must have done something wrong.

-- 
Eric Covener
cove...@gmail.com


Re: svn commit: r979071 - in /openwebbeans/trunk: webbeans-ejb/ webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/ webbeans-impl/ webbeans-impl/src/main/java/org/apache/webbeans/

2010-07-25 Thread Eric Covener
Paul, can you submit a followup patch to address a few issues inline below?


 +   �...@aroundtimeout
 +    public Object callAroundTimeouts(InvocationContext context) throws 
 Exception
 +    {
 +        Object retVal = null;
 +        InjectionTargetBean? injectionTarget = (InjectionTargetBean?) 
 threadLocal.get();
 +
 +        logger.debug(OpenWebBeansEjbInterceptor: @AroundTimeout called. 
 Trying to run Interceptors.);
 +
 +        if(injectionTarget != null)
 +        {
 +            if 
 (WebBeansUtil.isContainsInterceptorMethod(injectionTarget.getInterceptorStack(),
  InterceptorType.AROUND_TIMEOUT))
 +            {
 +                InvocationContextImpl impl = new InvocationContextImpl(null, 
 context.getTarget(), null, null,
 +                        
 InterceptorUtil.getInterceptorMethods(injectionTarget.getInterceptorStack(), 
 InterceptorType.AROUND_TIMEOUT), InterceptorType.AROUND_TIMEOUT);
 +                
 impl.setCreationalContext(threadLocalCreationalContext.get());
 +                try
 +                {
 +                    //run OWB interceptors
 +                    impl.proceed();

I think something needs to be done with the return value of the 299
stack.  This does not apply to the passivation related chunks.

 +
 +                    //run EJB interceptors
 +                    retVal = context.proceed();

Please take a look at the recent restructuring of the lifecycle
interceptos == ejbcontect.proceed needs to occur outside of the
if(...intereceptor stack not empty). This does apply to the
passivation related chunks as well.

I think it is safe to a) remove the TODOS around
runPrePostForNonContextual and also to rename that routine.  If it's
used for AroundTimeout, even lifecycle is probably bad.  Maybe
runInterceptorsForNonContextualEJB or something.


-- 
Eric Covener
cove...@gmail.com