You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2010/07/08 22:24:50 UTC

[jira] Created: (OWB-404) Contexts must not get stored in a static Map in BeanManager

Contexts must not get stored in a static Map in BeanManager
-----------------------------------------------------------

                 Key: OWB-404
                 URL: https://issues.apache.org/jira/browse/OWB-404
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Context and Scopes
    Affects Versions: 1.0.0-alpha-1
            Reporter: Mark Struberg
            Assignee: Mark Struberg
             Fix For: 1.0.0-alpha-2


our BeanManager has a static contextMap. This is broken if OWB gets used in a shared ClassLoader scenario like geronimo or any other EE server

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


[jira] Resolved: (OWB-404) Contexts must not get stored in a static Map in BeanManager

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved OWB-404.
-------------------------------

    Resolution: Fixed

> Contexts must not get stored in a static Map in BeanManager
> -----------------------------------------------------------
>
>                 Key: OWB-404
>                 URL: https://issues.apache.org/jira/browse/OWB-404
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Context and Scopes
>    Affects Versions: 1.0.0-alpha-1
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>             Fix For: 1.0.0-alpha-2
>
>
> our BeanManager has a static contextMap. This is broken if OWB gets used in a shared ClassLoader scenario like geronimo or any other EE server

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


[jira] Commented: (OWB-404) Contexts must not get stored in a static Map in BeanManager

Posted by "Gurkan Erdogdu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12886629#action_12886629 ] 

Gurkan Erdogdu commented on OWB-404:
------------------------------------

Actually the commit is not wrong, assumption may wrong. 

If class is loaded and instantiated by different ClassLoaders for each applications, this assumption is not correct. Each static field gets its own value, that is why we did WebBeansFinder instance "classloader" aware.

> Contexts must not get stored in a static Map in BeanManager
> -----------------------------------------------------------
>
>                 Key: OWB-404
>                 URL: https://issues.apache.org/jira/browse/OWB-404
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Context and Scopes
>    Affects Versions: 1.0.0-alpha-1
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>             Fix For: 1.0.0-alpha-2
>
>
> our BeanManager has a static contextMap. This is broken if OWB gets used in a shared ClassLoader scenario like geronimo or any other EE server

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


[jira] Commented: (OWB-404) Contexts must not get stored in a static Map in BeanManager

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12886638#action_12886638 ] 

Mark Struberg commented on OWB-404:
-----------------------------------

The problem was that this static maps got accessed via public static  methods and not via WebBeansFinder. 
And since webbeans-impl in my setup resides in the SharedClassLoader (resp tomcat common/lib StandardClassLoader), all WebAppClassCloaders really got the same instance of this maps.

> Contexts must not get stored in a static Map in BeanManager
> -----------------------------------------------------------
>
>                 Key: OWB-404
>                 URL: https://issues.apache.org/jira/browse/OWB-404
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Context and Scopes
>    Affects Versions: 1.0.0-alpha-1
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>             Fix For: 1.0.0-alpha-2
>
>
> our BeanManager has a static contextMap. This is broken if OWB gets used in a shared ClassLoader scenario like geronimo or any other EE server

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