[ 
https://issues.jboss.org/browse/JBSEAM-4861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ahus1 updated JBSEAM-4861:
--------------------------

    Attachment: Component.patch


updated w/ most recent conditions
                
> Component.java uses application wide factoryLock too often 
> -----------------------------------------------------------
>
>                 Key: JBSEAM-4861
>                 URL: https://issues.jboss.org/browse/JBSEAM-4861
>             Project: Seam 2
>          Issue Type: Patch
>          Components: Core
>    Affects Versions: 2.2.2.Final, 2.3.0.ALPHA
>            Reporter: ahus1
>         Attachments: Component.patch, Component.patch
>
>
> Whenever getInstanceFromFactory() is called and a factory is used, a 
> (application wide) lock is used: factoryLock.
> In my environments the Factory uses expensive calls to the backend to create 
> an object, and during this time no other Factory method is allowed to be 
> called. This is a severe bottleneck in a multiuser environment. 
> This lock is important for APPLICATION scoped components, but other 
> components that are i.e. CONVERSATION scoped, Seam already ensures that only 
> one Thread has access to the current conversation. The same should be true 
> for PAGE and EVENT. In this cases no lock should be acquired.
> See the follwing code snippet. I also attach a patch. 
> I tested the patch for Seam 2.2.2.Final - I would be most happy to have this 
> included in 2.2 and 2.3 branch.
> Br Alexander.
>         ScopeType s = getOutScope(factoryMethod.getScope(),
>             factoryMethod.getComponent());
>         if (s != ScopeType.CONVERSATION && s != ScopeType.EVENT
>             && s != ScopeType.PAGE) {
>           factoryLock.lock();
>         }
>         try {
>         /*  ****  */
>         } finally {
>           if (s != ScopeType.CONVERSATION && s != ScopeType.EVENT
>               && s != ScopeType.PAGE) {
>             factoryLock.unlock();
>           }
>         }
>     

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues

Reply via email to