[seam-issues] [JBoss JIRA] Commented: (JBSEAM-2419) IAE: factory method with defined scope outjected a value: guestRole

Denis Forveille (JIRA) jira-events at lists.jboss.org
Mon Jul 26 08:03:33 EDT 2010


    [ https://jira.jboss.org/browse/JBSEAM-2419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12540929#action_12540929 ] 

Denis Forveille commented on JBSEAM-2419:
-----------------------------------------

Ondrej,
Sorry but I'm not in position to perform such a test as we need to setup a stress test and that takes time and resources to do that. We do this from time to time when a new version of one of our app is about to be pushed in production but it will not be the case in the coming months.
As what you say about deadlock, it is true if you take into account only the lock in Component
If some thread takes a reentrant lock in the BI associated with a component "A" then take another reentrant lock in Component to instantiate ANY factory, and another thread do it in the reverse order, ie ake a lock in Component to instantiate ANY factory and to do that tries to go through the lock in Bi associated with Component "A", you're done
And I'm 90%sure that it is quite easy to have this kind of components
So, I continue to think that the path may correct JBSEAM-4669 but is causing much more harm. 

> IAE: factory method with defined scope outjected a value: guestRole
> -------------------------------------------------------------------
>
>                 Key: JBSEAM-2419
>                 URL: https://jira.jboss.org/browse/JBSEAM-2419
>             Project: Seam
>          Issue Type: Bug
>          Components: Core
>            Reporter: Christian Bauer
>            Assignee: Ondrej Skutka
>            Priority: Blocker
>             Fix For: 2.2.1.CR2
>
>         Attachments: JBSEAM-2419.patch, jbseam-2419.zip
>
>
> I can see this on the log on seamframework.org but can't reproduce it:
> java.lang.IllegalArgumentException: factory method with defined scope outjected a value: guestRole
>         at org.jboss.seam.Component.handleFactoryMethodResult(Component.java:1953)
>         at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1927)
>         at org.jboss.seam.Component.getInstance(Component.java:1863)
>         at org.jboss.seam.Component.getInstance(Component.java:1840)
>         at org.jboss.seam.Component.getInstance(Component.java:1834)
>         at org.jboss.seam.wiki.core.action.Authenticator.getGuestAccessLevel(Authenticator.java:199)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
>         at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
>         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
>         at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
>         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
>         at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
>         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
>         at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
>         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
>         at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
>         at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
>         at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
>         at org.jboss.seam.wiki.core.action.Authenticator_$$_javassist_9.getGuestAccessLevel(Authenticator_$$_javassist_9.java)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
>         at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
>         at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
>         at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1926)
>         at org.jboss.seam.Component.getInstance(Component.java:1863)
>         at org.jboss.seam.Component.getInstance(Component.java:1840)
>         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
>         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
>         at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
>         at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
>         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
>         at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
>         at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
>         at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
>         at org.jboss.seam.persistence.HibernatePersistenceProvider.enableFilter(HibernatePersistenceProvider.java:205)
>         at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:88)
>         at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:108)
> This is thrown from the FeedServlet.
> The code doesn't do what the exception says it is doing:
>     /**
>      * Assigns the context variable 'currentAccessLevel' when no user is logged in.
>      * @return Integer Guest access level.
>      */
>     @Factory(value = "currentAccessLevel", scope = ScopeType.SESSION, autoCreate = true)
>     public Integer getGuestAccessLevel() {
>         return ((Role)Component.getInstance("guestRole")).getAccessLevel();
>     }
> This has to be investigated further.

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

        


More information about the seam-issues mailing list