[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2663) ResourceLoader context problem

Pierre Ingmansson (JIRA) jira-events at lists.jboss.org
Fri Feb 22 10:36:43 EST 2008


ResourceLoader context problem
------------------------------

                 Key: JBSEAM-2663
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2663
             Project: JBoss Seam
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.0.1.GA
         Environment: Windows XP, Eclipse, Seam running in a Tomcat 5.5.25
            Reporter: Pierre Ingmansson
            Priority: Minor


The ResourceLoader, a core component of Seam, is hard-coded in the ResourceLoader's instance()-method, to be in the stateless context.
Some of the core components in Seam use this static instance()-method to fetch the ResourceLoader. Therefore you can not overload the ResourcLoader with your own component that want to be in another context than stateless.

The ResourceLoader is accessed frequently during the JSF page rendering, and because of the stateless context setting of the ResourceLoader, a new instance of ResourceLoader is instantiated and initlialized everytime it is accessed. My opinion is that it is unnecessary to create a new instance of the ResourceLoader everytime it is accessed, it's just bad for performance.

Also if you want to override the ResourceLoader with your own component, it is only possible to do so in the stateless-context. There is (right now) no way of creating a MyResourceLoader with @Scope(ScopeType.APPLICATION) for example.

This problem is somewhat related to JIRA issue JBSEAM-2364. I bumped in to the ResourceLoader-overloading-problem when trying to find a workaround for this other problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list