You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2010/10/10 19:31:31 UTC

[jira] Commented: (TAP5-1301) Allow changing the ClassLoader Tapestry uses for loading classes and resources

    [ https://issues.apache.org/jira/browse/TAP5-1301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919624#action_12919624 ] 

Howard M. Lewis Ship commented on TAP5-1301:
--------------------------------------------

And possibly, once this is set up, @Inject ClassLoader would be the context class loader, or the override for that set up when creating the Registry.


> Allow changing the ClassLoader Tapestry uses for loading classes and resources
> ------------------------------------------------------------------------------
>
>                 Key: TAP5-1301
>                 URL: https://issues.apache.org/jira/browse/TAP5-1301
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-ioc
>    Affects Versions: 5.1.0.4
>            Reporter: Dan Adams
>
> I have a situation where we want to extend the classloader used for the application with additional classes in a non-container-specfic way. TapestryFilter.provideExtraModuleDefs() appears to support this at first except that there are many references throughout Tapestry to Thread.currentThread().getContextClassLoader() which bypasses any classloader you provide when creating the ModuleDef. Furthermore, there is a constructor to RegistryBuilder that allows providing your own root classloader but even if you can get that to work the above call make it's moot as it won't find any of your page templates and such. This could be quite simple if:
> - TapestryFilter and it's related classes allowed extending the ClassLoader (by wrapping it in a URLClassLoader) for instance
> - Using a definitive ClassLoader rather than Thread.currentThread().getContextClassLoader() to get resources.
> May affect more recent versions but I have not checked.

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