[ 
https://issues.apache.org/jira/browse/OWB-931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13895466#comment-13895466
 ] 

Romain Manni-Bucau commented on OWB-931:
----------------------------------------

Ok did the tests:
1) using tccl breaks as expected  about 10% of TCKs.
2) using tccl for provider and bean class for proxy doesn't make sense in 
particular in OSGi where it can be totally different classloaders (I played of  
it in KarafEE to make it working but I'm not happy with it)
3) if the bean relies on OWB it should import it so it should work in OSGi (I 
agree this should be implicit regarding EE programmation model but regarding 
OSGi one it seems natural to do it)

using TCCL is not enough actually so it is clearly better to stick to the 
current logic which is simple to follow and make a "wrapper" in OSGi.


> NormalScopeProxyFactory classloader usage
> -----------------------------------------
>
>                 Key: OWB-931
>                 URL: https://issues.apache.org/jira/browse/OWB-931
>             Project: OpenWebBeans
>          Issue Type: Brainstorming
>          Components: Core
>    Affects Versions: 1.2.0
>            Reporter: Moritz Bechler
>              Labels: ClassLoader, OSGI
>
> createNormalScopeProxy currently uses the bean class ClassLoader for two 
> purposes:
> 1. defining the proxy class
> 2. instantiation of the instance provider.
> In our OSGI/WAB environment this usage does not make much sense:
> 1. the proxy class should be defined in the classloader which most closely 
> reflects the CDI context lifecycle, which is the web context TCCL. 
> 2. causes trouble with scope providers (e.g OWB's own 
> RequestScopedBeanInterceptorHandler) when they are defined in another bundle. 
> I don't think there is a proper compatible solution to this (except maybe 
> making extensions fragments) but also trying the TCCL makes this much more 
> painless to use.
> Is there any explanation for this particular choice of classloaders? Are 
> there any reasons not to try TCCL first?



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to