You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2009/11/03 20:34:32 UTC

[jira] Commented: (MYFACES-1158) Use of context classloader as key in _registeredFactoryNames

    [ https://issues.apache.org/jira/browse/MYFACES-1158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773141#action_12773141 ] 

Leonardo Uribe commented on MYFACES-1158:
-----------------------------------------

See MYFACES-2290 for details about myfaces and OSGi. I tested that config and it does not work because pax web extender does not deal with current thread context class loader (in OSGi this one is not defined, so it FactoryFinder cannot found the required factory classes on myfaces-impl.jar) and with .tld files (load them to jsp compiler, note that if this files are not loaded StartupServletContextListener will not be called)

> Use of context classloader as key in _registeredFactoryNames
> ------------------------------------------------------------
>
>                 Key: MYFACES-1158
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1158
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 1.1.1
>         Environment: Any
>            Reporter: Toh Kim Huat
>            Priority: Minor
>
> In FactoryFinder.java, the context classloader is used as the key to set/retrieve the factoryClassNames Map from the _registeredFactoryNames map. Problems will occur if the context classloader used to put a factoryClassNames into the factoryClassNames Map is different from the context classloader used to retrieve a factoryClassNames from the factoryClassNames Map. The context classloader might be different if for instance the application uses a custom classloader which is inserted into the classloader hierarchy by setting the current context classloader as its parent classloader and then setting itself to be the current thread's context classloader.
> Is it possible not to use the context classloader as the Map's key? Or perhaps if an entry cannot be retrieved from the Map using the current context classloader, can we use its parent (iteratively) to retrieve from the Map until we get an entry?

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