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

Joe Bergmark commented on OWB-369:
----------------------------------

Gurkan, I believe this comes down to another case of tiered classloading 
environments.

Given the way that WebBeansFinder load the ContextService, you are going to 
have a unique instance of the ContextService per Web App (assuming each web app 
has a unique classloader).  However, I think the concern is the static 
variables are going to be shared across instances.  Similar to the problem we 
have had earlier with setting static variables to null leading to NPEs in other 
applications.

In this case the ConversationManager is static and therefore shared between all 
instances of ContextService.  If there is any initialization done in that 
Manager that could be different for different apps then we likely have a 
problem.

> Static ContextsService in ContextFactory causes wrong webContextService used 
> for multiple applications
> ------------------------------------------------------------------------------------------------------
>
>                 Key: OWB-369
>                 URL: https://issues.apache.org/jira/browse/OWB-369
>             Project: OpenWebBeans
>          Issue Type: Bug
>    Affects Versions: M4
>            Reporter: YING WANG
>            Assignee: YING WANG
>             Fix For: 1.0.0
>
>
> To reproduce,
> Application A, which does not support conversation, installed and tested 
> without any issue. then stop and uninstalled.
> Application B, which support conversation, get installed and started.
> When test Application B, ApplicationA's contextService is used and causes 
> conversation scope is not found since it does not support conversation.
> The problem is because of static variable used for contextsService in 
> ContextFactory which is JVM-wide and only init once. While 
> supportConversation flag is application-wide property.
> Probably we need contextService  variable to be  classloader based instead of 
> static variable. or need some change to supportsConversation flag.

-- 
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