[seam-issues] [JBoss JIRA] (JBSEAM-5001) Deadlock between SFSB EJB lock and Component.getInstanceFromFactory factoryLock calling factory from the same component
Marek Novotny (JIRA)
jira-events at lists.jboss.org
Thu May 2 17:38:54 EDT 2013
[ https://issues.jboss.org/browse/JBSEAM-5001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marek Novotny closed JBSEAM-5001.
---------------------------------
Resolution: Won't Fix
I think this test case is just a wrong usage of seam components and corner case for real usage. There is a high need for re-factoring and that might result in changed behavior after eliminating this dead lock.
> Deadlock between SFSB EJB lock and Component.getInstanceFromFactory factoryLock calling factory from the same component
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: JBSEAM-5001
> URL: https://issues.jboss.org/browse/JBSEAM-5001
> Project: Seam 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.3.0.BETA2
> Environment: JBoss AS 7.1.2, Seam 2.3.0.CR1-SNAPSHOT r14986
> Reporter: Marek Schmidt
> Assignee: Marek Novotny
> Fix For: 2.3.1.CR1
>
> Attachments: JBSEAM-5001.ear, JBSEAM-5001.tar.gz, test.py
>
>
> The following sample demonstrates a deadlock between SFSB lock and the Component.getInstanceFromFactory factoryLock:
> {code}
> @Stateful
> @Scope(ScopeType.SESSION)
> @Name("test")
> public class TestAction implements Test
> {
>
> public String test() {
> Thread.sleep(500);
> Component.getInstance("testString", true);
> return "test";
> }
>
> @Factory(value="testString", scope=ScopeType.SESSION)
> public String getTestString() {
> return "testString";
> }
> @Remove
> public void remove() {}
> }
> {code}
> when test.xhtml contains:
> {code}
> <h:outputText value="#{test.test()} " />
> {code}
> and othertest.xhtml contains:
> {code}
> <h:outputText value="#{testString} " />
> {code}
> If the othertest.seam is requested just after (<500ms after) the test.seam with the same session cookie.
> The problem seems to be that the #{test.test()} first locks the TestAction SFSB lock and then the Seam factory lock in the Component.getInstance call, while #{testString} locks the factoryLock first.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list