[ 
https://issues.apache.org/jira/browse/OWB-447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Covener resolved OWB-447.
------------------------------

    Resolution: Fixed

>>>* We should be managing a CreationalContext for the lifetime of the 
>>>interceptor instance and using that for dependent instanes 
>>Where you see the problem? We managed CeationalContext per instance that also 
>>contains interceptors and other dependents. 

I think they are an unnecessary complication, and I believe there is a problem 
at least with stateless session beans. In this case EJB interceptors live for 
the life of the bean even as it goes in and out of the pool, but we'll be 
swapping the thread-local CC in and out (and also swapping contextual and 
non-contextual references to the same stateful bean which means the same OWB 
interceptor -- it becomes impossible to really know the significance of the 
thread local)

Since the container is carefully managing the life of the intereptor itself, we 
should be able to piggyback on this and and use PostConstruct/PreDestroy to 
manage a CC for the life of the interceptor.

>>>We should not rely on the thread-locals beyond @PostConstruct ? 
>>What is the problem that you see?

This is more of a simplification. My original issue that led me down this path 
was errors deserializing our openwebbeansejbinterceptor but I think that was 
due to storing references to the underlying EJB instance.   This change is more 
of a side-effect of making contextual/non-contextual a single path outside of 
@PostConstruct.

> unnecessary contextual/non-contextual distinction in 
> OpenWebBeansEJBIntercpetor
> -------------------------------------------------------------------------------
>
>                 Key: OWB-447
>                 URL: https://issues.apache.org/jira/browse/OWB-447
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Enterprise Web Beans
>    Affects Versions: 1.0.0-alpha-2
>            Reporter: Eric Covener
>            Assignee: Eric Covener
>   Original Estimate: 16h
>  Remaining Estimate: 16h
>
> The separation between contextual and non-contextual is wrong/harmful and 
> unnecessary.  
> * We should be managing a CreationalContext for the lifetime of the 
> interceptor instance and using that for dependent instanes
> * We should not rely on the thread-locals beyond @PostConstruct 
> * Method invocations on non-contextual EJB's must be decoratable

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to