You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Mark Struberg <st...@yahoo.de> on 2012/07/05 09:54:09 UTC

Re: WebBeansPhaseListener conversation issue in OWBs




Hi Hamzah!

I'm registered at openejb-dev@a.o, just didn't have time to response. 

In a new TomEE we should use a new MyFaces. In the newer MyFaces, the DebugPhaseListener is not enabled by default (as it created a few side effects). So this issue should not happen. In fact we did not do a single commit for OWB-626 ;)
I'm also not sure if this is an OWB related issue as we are still using the same 1.1.4 version of OWB since a few months afaik.
I also looked at the changes in the WebBeansPhaseListener. Almost all of of it is from 2009 and 2010, no change since march 2011...


The BusyConversationException really only happens when a Conversation with the same Id is touched from 2 different threads.

In general, I consider the CDI Conversations pretty much broken. This effect could e.g. also happen if you have AJAX enabled, or if you did a redirect. I recommend to use CODI Conversations instead.

Here is what I mean with the redirect problem:

Consider you have a request A and at the time r there is a redirect which leads to request B. The underlines visualize some other work:

A: request______redirect________________response
B:                                   request________________________response

As you see above, the request A needs quite some time for cleaning up after the redirect. E.g. serializing the ViewMap, backing up the session for cluster replication, etc. And in this time (if the client is fast enough) you will already be hit by request B. 


This really su....s conceptionally. You will btw have the same problem with JPA if you store the EntityManager longer than a single request.

LieGrue,
strub

>________________________________
> From: Hamzah Zineddin <ha...@yahoo.com>
>To: "struberg@yahoo.de" <st...@yahoo.de> 
>Sent: Thursday, July 5, 2012 6:48 AM
>Subject: WebBeansPhaseListener conversation issue in OWBs
> 
>
>Hi Mark,
>
>
>Tomee guys recommended I get in touch with you about this issue. I have recently migrated a project from jBoss 7.1 stack to Tomee, which has been working great.
>
>
>I use seam 3.1 with Tomee. I get below error recently with newer jars included in Tomee 1.1.0 snapshot. 
>javax.enterprise.context.BusyConversationException - Propogated conversation with cid=2 is used by other request. It creates a new transient conversation
>at org.apache.webbeans.jsf.WebBeansPhaseListener.beforePhase(WebBeansPhaseListener.java:130) 
>
>
>
>Is this related to https://issues.apache.org/jira/browse/OWB-626?
>
>
>This link has the full stack trace and more details.
>http://openejb.979440.n4.nabble.com/Conversations-broken-on-Tomee-1-1-0-Snapshot-td4656035.html
>
>
>How can I resolve this?
>
>
>I appreciate your help.
>Hamzah
>
>
>
>
>
>