myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Forveille (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Created] (EXTCDI-310) ConversationScope producer in a ConversationScope bean = endless loop
Date Wed, 05 Jun 2013 17:34:21 GMT
Denis Forveille created EXTCDI-310:
--------------------------------------

             Summary: ConversationScope producer in a ConversationScope bean = endless loop
                 Key: EXTCDI-310
                 URL: https://issues.apache.org/jira/browse/EXTCDI-310
             Project: MyFaces CODI
          Issue Type: Bug
          Components: JEE-JSF20-Module
    Affects Versions: 1.0.5
         Environment: WebSphere v8.5.0.2 + JDK 7 + OWB embedded in WAS
            Reporter: Denis Forveille


When we declare a CODI ConversationScope producer in a CODI ConversationScope bean, and we
reference the object created by the producer in a facelets page, the server enters an endless
loop and ends up with a StackOverFlowError

With this bean:
@Named("convScopeproducerInConvScopeBean")
@ConversationScoped
public class ConvScopeproducerInConvScopeBean implements Serializable {
   private static final long serialVersionUID = 1L;
  @Produces  @ConversationScoped  @Named("getConvScopeList")
   public ArrayList<String> getConversationScopeList() {
      ArrayList<String> res = new ArrayList<>();
      res.add("dummy string");
      return res;
   }
}

And this in a xhtml page: "Size of list :  #{getConvScopeList.size()}"

The repeated part of the exception stacktrace is :
...
at org.apache.webbeans.inject.InjectableMethods.doInjection(InjectableMethods.java:205)
at org.apache.webbeans.component.ProducerMethodBean.createDefaultInstance(ProducerMethodBean.java:204)
at org.apache.webbeans.component.ProducerMethodBean.createInstance(ProducerMethodBean.java:166)
at org.apache.webbeans.component.AbstractOwbBean.createNewInstance(AbstractOwbBean.java:216)
at org.apache.webbeans.portable.creation.AbstractProducer.produce(AbstractProducer.java:82)
at org.apache.webbeans.component.InjectionTargetWrapper.produce(InjectionTargetWrapper.java:142)
at org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:174)
at org.apache.webbeans.container.SerializableBean.create(SerializableBean.java:128)
at org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.createNewInstanceOfBean(CodiUtils.java:69)
at org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.AbstractConversationBeanEntry.createNewBeanInstance(AbstractConversationBeanEntry.java:139)
at org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.AbstractConversationBeanEntry.getBeanInstance(AbstractConversationBeanEntry.java:84)
at org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.DefaultConversation.getBean(DefaultConversation.java:163)
at org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.GroupedConversationContext.resolveBeanInstance(GroupedConversationContext.java:185)
at org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.AbstractGroupedConversationContext.resolve(AbstractGroupedConversationContext.java:114)
at org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.ConversationContextAdapter.get(ConversationContextAdapter.java:98)
at org.apache.webbeans.context.CustomContextImpl.get(CustomContextImpl.java:48)
at org.apache.webbeans.context.CustomPassivatingContextImpl.get(CustomPassivatingContextImpl.java:47)
at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:127)
at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:95)
at com.test.ConvScopeproducerInConvScopeBean_$$_javassist_154.getConversationScopeList(ConvScopeproducerInConvScopeBean_$$_javassist_154.java)
...

This works well with the CDI ConversatioScope or other scopes or if the bean is not in the
CODI  conversationScope..

I will attach an ear with the problem


--
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

Mime
View raw message