You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by Gurkan Erdogdu <gu...@yahoo.com> on 2010/04/11 17:51:25 UTC

Re: svn commit: r932843 - in /openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common: component/BaseEjbBean.java interceptor/OpenWebBeansEjbInterceptor.java proxy/EjbBeanProxyHandler.java util/EjbDefinitionUtility.java

>>>Do you think it's possible to re-use an InterceptorHandler instead of
>>>having the ejb-common code know so much detail of
>>>interceptors/decorators?
Hımm, the first reason is that in EJB scenario, target bean method is called by the EJB container. Second is that InterceptorHandler is a Javassist method handler, the other is interceptor. But it is reasonable to define common methods that are used by both of them.

>>>I wasn't able to rebase my workspace yet, but who is calling the
>>>BaseEJBBean.setThreadLocal() ?
It is called by the EjbBeanProxyHandler#invoke

>>>Finally, does this work whether or not the EJB itself was contextual?
This is written to work with contextual EJB beans. If the EJB bean is not contextual, then it does not support decorators but supports JSR299 style
interceptors. We could create a new EJB interceptor/utility for returning interceptors for non-contextual ejbs.

Thanks;

--Gurkan



________________________________
From: Eric Covener <co...@gmail.com>
To: dev@openwebbeans.apache.org
Sent: Sun, April 11, 2010 2:35:11 PM
Subject: Re: svn commit: r932843 - in /openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common:  component/BaseEjbBean.java interceptor/OpenWebBeansEjbInterceptor.java  proxy/EjbBeanProxyHandler.java util/EjbDefinitionUtility.java

> +    private Object callInterceptorsAndDecorators(Method method, Object instance, Object[] arguments) throws Exception

Do you think it's possible to re-use an InterceptorHandler instead of
having the ejb-common code know so much detail of
interceptors/decorators?

I wasn't able to rebase my workspace yet, but who is calling the
BaseEJBBean.setThreadLocal() ?

Finally, does this work whether or not the EJB itself was contextual?

-- 
Eric Covener
covener@gmail.com



      ___________________________________________________________________
Yahoo! Türkiye açıldı!  http://yahoo.com.tr
İnternet üzerindeki en iyi içeriği Yahoo! Türkiye sizlere sunuyor!

Re: svn commit: r932843 - in /openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common: component/BaseEjbBean.java interceptor/OpenWebBeansEjbInterceptor.java proxy/EjbBeanProxyHandler.java util/EjbDefinitionUtility.java

Posted by Eric Covener <co...@gmail.com>.
>>>>Finally, does this work whether or not the EJB itself was contextual?
> This is written to work with contextual EJB beans. If the EJB bean is not contextual, then it does not support decorators but supports JSR299 style
> interceptors. We could create a new EJB interceptor/utility for returning interceptors for non-contextual ejbs.

Gurkan,

Revisiting this old thread -- are you sure the non-contextual case
should not be deocratable? I think this became part of my conventional
wisdom but I can't find any basis for it.

It seems decoration sould be easy  to add to our interceptor for
non-contextual -- in fact I think all the contextual vs non-contextual
distinction can go away if we do a little more work in @PostConstruct.

(hope to look at it this week)

-- 
Eric Covener
covener@gmail.com

Re: svn commit: r932843 - in /openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common: component/BaseEjbBean.java interceptor/OpenWebBeansEjbInterceptor.java proxy/EjbBeanProxyHandler.java util/EjbDefinitionUtility.java

Posted by Eric Covener <co...@gmail.com>.
>>>>Finally, does this work whether or not the EJB itself was contextual?
> This is written to work with contextual EJB beans. If the EJB bean is not contextual, then it does not support decorators but supports JSR299 style
> interceptors. We could create a new EJB interceptor/utility for returning interceptors for non-contextual ejbs.

Have you discussed at all with David Blevins how we might get hooked
in for this non-contextual case?  Seems like we'd need openEJB to
pretend something like OWBEjbIntercptor was always specified as an
@Interceptor.

-- 
Eric Covener
covener@gmail.com