[
http://nagoya.apache.org/jira/browse/BEEHIVE-121?page=comments#action_56199 ]
Kyle Marvin commented on BEEHIVE-121:
-------------------------------------
Another thought: Control jar files themselves can and should also be a source
of resources, as there are likely valid use cases where you are using it to
achieve the equivalent of the following from a control implementation class:
this.getClass().getClassLoader().getResource()
Ideally, the delegation model Jonathan describes might look in the control jar
first, and then in the parent container second.
For many containers, this can be generically accomplished by:
Thread.currentThread().getContextClassLoader().getResource();
> ServletBeanContext should expose ServletContext resources directly.
> -------------------------------------------------------------------
>
> Key: BEEHIVE-121
> URL: http://nagoya.apache.org/jira/browse/BEEHIVE-121
> Project: Beehive
> Type: Improvement
> Components: Controls
> Versions: V1Beta
> Reporter: Jonathan Colwell
> Assignee: Kenneth Tam
> Priority: Minor
>
> ControlContainerContext should provide a getResource method that delegates to
> parent containers until a Context that is able to provide resources is found.
> For example, the ServletBeanContext would expose the getResource method from
> the ServletContext directly rather than requiring an individual control
> implementation to know it runs in a servlet context and call
> getService(ServletContext.class, null);
> on an instance of ControlBeanContext to load a resource from the context.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira