You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Thierry Robin (Created) (JIRA)" <ji...@apache.org> on 2011/10/21 12:18:32 UTC

[jira] [Created] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Conversation Scope isn't accessible after RENDER_RESPONSE phase
---------------------------------------------------------------

                 Key: OWB-626
                 URL: https://issues.apache.org/jira/browse/OWB-626
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.1.1
            Reporter: Thierry Robin
            Assignee: Gurkan Erdogdu


In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.

But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

Re: [jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by Gerhard Petracek <ge...@gmail.com>.
hi @ all,

i'll fix it within the next days as soon as i've time.

regards,
gerhard



2012/3/5 Rohit Kelapure <ke...@gmail.com>

> For SEAM 3 the most pertinent information in the defect is this ....
>
> Seam uses @ConversationScoped scope to manage his extended
> persistenceContext which is one of the most convenient features.
>
> I will do some research and find out how they are using @ConversationScoped
> and if there is a sample application that illustrates this issue.
>
> -cheers,
> Rohit
>
>
>
> On Mon, Mar 5, 2012 at 9:43 AM, Mark Struberg (Commented) (JIRA) <
> jira@apache.org> wrote:
>
> >
> >    [
> >
> https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222377#comment-13222377
> ]
> >
> > Mark Struberg commented on OWB-626:
> > -----------------------------------
> >
> > For DeltaSpike and CODI I can guarantee that this is not needed. As for
> > Seam3: do you have any forum references or other links for me? We might
> > reach out to JBoss to fix this in Seam3.
> >
> > > Conversation Scope isn't accessible after RENDER_RESPONSE phase
> > > ---------------------------------------------------------------
> > >
> > >                 Key: OWB-626
> > >                 URL: https://issues.apache.org/jira/browse/OWB-626
> > >             Project: OpenWebBeans
> > >          Issue Type: Bug
> > >          Components: Core
> > >    Affects Versions: 1.1.1
> > >            Reporter: Thierry Robin
> > >            Assignee: Mark Struberg
> > >             Fix For: 1.2.0
> > >
> > >         Attachments: OWB626ConversationPhaseListener.java
> > >
> > >
> > > In CDI 1.0, the Conversation Scope is normaly accessible from after
> > RESTORE_VIEW phase in JSF, to the end of the Response.
> > > But It's not the case during the after phase(RENDER_RESPONSE) of any
> > PhaseListener implementation.
> >
> > --
> > This message is automatically generated by JIRA.
> > If you think it was sent incorrectly, please contact your JIRA
> > administrators:
> > https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> > For more information on JIRA, see:
> http://www.atlassian.com/software/jira
> >
> >
> >
>

Re: [jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by Mark Struberg <st...@yahoo.de>.
Hi Rohit!

I know this stuff, and it's imo principially broken ;)
Because the EntityManager is not Serializable and thus you cannot store it in the Session...
Anything longer than EntityManager-per-Request doesn't work with the current JPA spec!


But anyway, the only thing we do is to close the Conversation context a bit earlier than Weld (at the end of the JSF request and not at the end of the Servlet Request). This is no problem unless you use the Seam provided EntityManager in a ServletFilter outside of the JSF chain.

A thread dump would be fine...


LieGrue,
strub



----- Original Message -----
> From: Rohit Kelapure <ke...@gmail.com>
> To: dev@openwebbeans.apache.org
> Cc: 
> Sent: Monday, March 5, 2012 10:53 PM
> Subject: Re: [jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase
> 
> 28.4. Seam-managed persistence contexts
> http://docs.jboss.org/seam/3/latest/reference/en-US/html_single/
> 
> On Mon, Mar 5, 2012 at 10:02 AM, Rohit Kelapure <ke...@gmail.com> 
> wrote:
>> 
>>  For SEAM 3 the most pertinent information in the defect is this ....
>> 
>>  Seam uses @ConversationScoped scope to manage his extended 
> persistenceContext which is one of the most convenient features.
>> 
>>  I will do some research and find out how they are using @ConversationScoped
>>  and if there is a sample application that illustrates this issue.
>> 
>>  -cheers,
>>  Rohit
>> 
>> 
>> 
>>  On Mon, Mar 5, 2012 at 9:43 AM, Mark Struberg (Commented) (JIRA) 
> <ji...@apache.org> wrote:
>>> 
>>> 
>>>     [ 
> https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222377#comment-13222377 
> ]
>>> 
>>>  Mark Struberg commented on OWB-626:
>>>  -----------------------------------
>>> 
>>>  For DeltaSpike and CODI I can guarantee that this is not needed. As for 
> Seam3: do you have any forum references or other links for me? We might reach 
> out to JBoss to fix this in Seam3.
>>> 
>>>  > Conversation Scope isn't accessible after RENDER_RESPONSE 
> phase
>>>  > ---------------------------------------------------------------
>>>  >
>>>  >                 Key: OWB-626
>>>  >                 URL: https://issues.apache.org/jira/browse/OWB-626
>>>  >             Project: OpenWebBeans
>>>  >          Issue Type: Bug
>>>  >          Components: Core
>>>  >    Affects Versions: 1.1.1
>>>  >            Reporter: Thierry Robin
>>>  >            Assignee: Mark Struberg
>>>  >             Fix For: 1.2.0
>>>  >
>>>  >         Attachments: OWB626ConversationPhaseListener.java
>>>  >
>>>  >
>>>  > In CDI 1.0, the Conversation Scope is normaly accessible from 
> after RESTORE_VIEW phase in JSF, to the end of the Response.
>>>  > But It's not the case during the after phase(RENDER_RESPONSE) 
> of any PhaseListener implementation.
>>> 
>>>  --
>>>  This message is automatically generated by JIRA.
>>>  If you think it was sent incorrectly, please contact your JIRA 
> administrators: 
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
>>>  For more information on JIRA, see: 
> http://www.atlassian.com/software/jira
>>> 
>>> 
>> 
> 

Re: [jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by Rohit Kelapure <ke...@gmail.com>.
28.4. Seam-managed persistence contexts
http://docs.jboss.org/seam/3/latest/reference/en-US/html_single/

On Mon, Mar 5, 2012 at 10:02 AM, Rohit Kelapure <ke...@gmail.com> wrote:
>
> For SEAM 3 the most pertinent information in the defect is this ....
>
> Seam uses @ConversationScoped scope to manage his extended persistenceContext which is one of the most convenient features.
>
> I will do some research and find out how they are using @ConversationScoped
> and if there is a sample application that illustrates this issue.
>
> -cheers,
> Rohit
>
>
>
> On Mon, Mar 5, 2012 at 9:43 AM, Mark Struberg (Commented) (JIRA) <ji...@apache.org> wrote:
>>
>>
>>    [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222377#comment-13222377 ]
>>
>> Mark Struberg commented on OWB-626:
>> -----------------------------------
>>
>> For DeltaSpike and CODI I can guarantee that this is not needed. As for Seam3: do you have any forum references or other links for me? We might reach out to JBoss to fix this in Seam3.
>>
>> > Conversation Scope isn't accessible after RENDER_RESPONSE phase
>> > ---------------------------------------------------------------
>> >
>> >                 Key: OWB-626
>> >                 URL: https://issues.apache.org/jira/browse/OWB-626
>> >             Project: OpenWebBeans
>> >          Issue Type: Bug
>> >          Components: Core
>> >    Affects Versions: 1.1.1
>> >            Reporter: Thierry Robin
>> >            Assignee: Mark Struberg
>> >             Fix For: 1.2.0
>> >
>> >         Attachments: OWB626ConversationPhaseListener.java
>> >
>> >
>> > In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
>> > But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.
>>
>> --
>> This message is automatically generated by JIRA.
>> If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>>
>

Re: [jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by Rohit Kelapure <ke...@gmail.com>.
For SEAM 3 the most pertinent information in the defect is this ....

Seam uses @ConversationScoped scope to manage his extended
persistenceContext which is one of the most convenient features.

I will do some research and find out how they are using @ConversationScoped
and if there is a sample application that illustrates this issue.

-cheers,
Rohit



On Mon, Mar 5, 2012 at 9:43 AM, Mark Struberg (Commented) (JIRA) <
jira@apache.org> wrote:

>
>    [
> https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222377#comment-13222377]
>
> Mark Struberg commented on OWB-626:
> -----------------------------------
>
> For DeltaSpike and CODI I can guarantee that this is not needed. As for
> Seam3: do you have any forum references or other links for me? We might
> reach out to JBoss to fix this in Seam3.
>
> > Conversation Scope isn't accessible after RENDER_RESPONSE phase
> > ---------------------------------------------------------------
> >
> >                 Key: OWB-626
> >                 URL: https://issues.apache.org/jira/browse/OWB-626
> >             Project: OpenWebBeans
> >          Issue Type: Bug
> >          Components: Core
> >    Affects Versions: 1.1.1
> >            Reporter: Thierry Robin
> >            Assignee: Mark Struberg
> >             Fix For: 1.2.0
> >
> >         Attachments: OWB626ConversationPhaseListener.java
> >
> >
> > In CDI 1.0, the Conversation Scope is normaly accessible from after
> RESTORE_VIEW phase in JSF, to the end of the Response.
> > But It's not the case during the after phase(RENDER_RESPONSE) of any
> PhaseListener implementation.
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

Re: [jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by Rohit Kelapure <ke...@gmail.com>.
Mark,

I am afraid that customers may claim that OWB-626 is needed  for seam 3 /
delta -spike. I am trying to understand the problem and see if a fix can be
provided. This fix based on your comments regarding spec compliance will be
disabled by default and ONLY enabled via some JVM system property or an
openwebbeans property, till the (CDI & JSF) specs. provides better
guidance. Thanks for the info.  on when we destroy the conversation scope.

what do you think ?

--cheers,
Rohit



On Sun, Mar 4, 2012 at 2:51 AM, Mark Struberg (Commented) (JIRA) <
jira@apache.org> wrote:

>
>    [
> https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221823#comment-13221823]
>
> Mark Struberg commented on OWB-626:
> -----------------------------------
>
> Hi Rohit!
>
> Do you really need this for a customer? Actually I think the spec is not
> 100% clear as it says 'until the end of the request' but doesn't say if it
> means the servlet request or the faces request. In OWB we decided to end
> the conversation at the end of the faces request because afterwards the JSF
> behaviour is undefined anyway. We played through quite some use cases and
> didn't find a sane usage but quite some arguments against it.
> E.g. if you manually close your session, then the CDI conversation would
> continue per the strict spec, even if the session (containing the
> conversation) doesn't exist anymore. This interpretation also would brake
> the asyncSupported use case in the future, I fear.
>
> > Conversation Scope isn't accessible after RENDER_RESPONSE phase
> > ---------------------------------------------------------------
> >
> >                 Key: OWB-626
> >                 URL: https://issues.apache.org/jira/browse/OWB-626
> >             Project: OpenWebBeans
> >          Issue Type: Bug
> >          Components: Core
> >    Affects Versions: 1.1.1
> >            Reporter: Thierry Robin
> >            Assignee: Mark Struberg
> >             Fix For: 1.2.0
> >
> >         Attachments: OWB626ConversationPhaseListener.java
> >
> >
> > In CDI 1.0, the Conversation Scope is normaly accessible from after
> RESTORE_VIEW phase in JSF, to the end of the Response.
> > But It's not the case during the after phase(RENDER_RESPONSE) of any
> PhaseListener implementation.
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

[jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Mark Struberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221823#comment-13221823 ] 

Mark Struberg commented on OWB-626:
-----------------------------------

Hi Rohit!

Do you really need this for a customer? Actually I think the spec is not 100% clear as it says 'until the end of the request' but doesn't say if it means the servlet request or the faces request. In OWB we decided to end the conversation at the end of the faces request because afterwards the JSF behaviour is undefined anyway. We played through quite some use cases and didn't find a sane usage but quite some arguments against it. 
E.g. if you manually close your session, then the CDI conversation would continue per the strict spec, even if the session (containing the conversation) doesn't exist anymore. This interpretation also would brake the asyncSupported use case in the future, I fear. 
                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.2.0
>
>         Attachments: OWB626ConversationPhaseListener.java
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Thierry Robin (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133955#comment-13133955 ] 

Thierry Robin commented on OWB-626:
-----------------------------------

Thanks for your response. 

I'm agree about CDI spec contradictions but I'm testing Seam3 with OWB in hope running it on Websphere V8 .. so I can't use CODI @ConversationScoped. 

Seam uses this scope to manage his extended persistenceContext which is one of the most convenient features.

                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.1.3
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Mark Struberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223673#comment-13223673 ] 

Mark Struberg commented on OWB-626:
-----------------------------------

Hi!

The old DebugPhaseListener had quite a few side effects and thus got disabled in newer MyFaces version. If you upgrade to a more recent version you will not see this bug anymore. You can also disable the DebugPhaseListener manually in older MyFaces versions. 

See http://myfaces.apache.org/core20/myfaces-impl/webconfig.html for all available config params. You will need to set 
      <context-param>
        <param-name>org.apache.myfaces.DEBUG_PHASE_LISTENER</param-name>
        <param-value>false</param-value>
      </context-param>

                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.2.0
>
>         Attachments: OWB626ConversationPhaseListener.java
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Updated] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Mark Struberg (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg updated OWB-626:
------------------------------

    Fix Version/s:     (was: 1.1.3)
                   1.2.0

moved to 1.2.0 because I first need to check if this is really not an issue with the CDI spec. 

The CDI-1.0 spec currently has this passage, but it actually might be against the JSF spec.
                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.2.0
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Updated] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Rohit Dilip Kelapure (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rohit Dilip Kelapure updated OWB-626:
-------------------------------------

    Attachment: OWB626ConversationPhaseListener.java

I tried to reproduce the issue to no avail using this JSF 2 PhaseListener
                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.2.0
>
>         Attachments: OWB626ConversationPhaseListener.java
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Rohit Dilip Kelapure (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221743#comment-13221743 ] 

Rohit Dilip Kelapure commented on OWB-626:
------------------------------------------

I attempted to reproduce the issue by modifying the JSF-2 sample. Added a PhaseListener for RENDER_RESPONSE phase that accesses the current Conversation scoped bean and retrieves conversation state. (See attached file). In all cases I was able to access the correct current in-scope value of the conversation scoped ConversationData bean.The conversation scope was active in OWB626ConversationPhaseListener.afterPhase(PhaseEvent pe) method. 

Thierry, can you please attach a testcase or sample code or let me know which seam 3 example to run to reproduce this issue.
                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.2.0
>
>         Attachments: OWB626ConversationPhaseListener.java
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Mark Struberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133041#comment-13133041 ] 

Mark Struberg commented on OWB-626:
-----------------------------------

there are quite a few contradicting sentences in the CDI spec and in the JSF spec.
See OWB-321, OWB-168, etc

Actually I don't really like the CDI @ConversationScoped because it is seriously flawed.

If you like a working solution, then you might take a look at Apache MyFaces CODI @ConversationScoped (different package, different impl)
http://myfaces.apache.org/extensions/cdi/index.html
https://cwiki.apache.org/confluence/display/EXTCDI/JSF+Usage#JSFUsage-Scopes
                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Gurkan Erdogdu
>             Fix For: 1.1.3
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Mark Struberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133977#comment-13133977 ] 

Mark Struberg commented on OWB-626:
-----------------------------------

Btw, Seam3 and CODI runs perfectly fine within the same Application. You just might to disable the @ViewScoped Extension in one of the two (I happened to write both of them, so blame me ;)
                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.1.3
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Mark Struberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222377#comment-13222377 ] 

Mark Struberg commented on OWB-626:
-----------------------------------

For DeltaSpike and CODI I can guarantee that this is not needed. As for Seam3: do you have any forum references or other links for me? We might reach out to JBoss to fix this in Seam3.
                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.2.0
>
>         Attachments: OWB626ConversationPhaseListener.java
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Updated] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Thierry Robin (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thierry Robin updated OWB-626:
------------------------------

    Fix Version/s: 1.1.2
    
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Gurkan Erdogdu
>             Fix For: 1.1.2
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Mark Struberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133976#comment-13133976 ] 

Mark Struberg commented on OWB-626:
-----------------------------------

The extended persistence context is imo pretty questionable. It is basically the EntityManager-per-Session approach and you can find a lot of documentation on the internet why this is broken by design.
It really only works with the special assumption that you are using Hibernate (which is not used in WebSphere) and don't use clustering at all. The reason is that per the JPA spec any EntityManager is *NOT* Serializable. Thus you cannot put it into a bean with a passivating scope (especially @SessionScoped, @ConversationScoped). 

Hibernates EntityManager is Serializable, but only under _very_ special conditions! You also will lose any current state of all your entities and things like 'select for update' and EntityManager.lock() will lead to blowup your hibernate session.
Btw, clustering has been broken in Seam2 also...

The are 3 ways to get clustering support in JavaEE  
* use EJBs transaction handling. But be aware that you need to load all the data in your EJBs, otherwise you might get a LazyInitialisationException

* use @RequestScoped EntityManagers and a @Transactional interceptor (from Seam3 or CODI) This will allow lazy loading in your JSF, Wicket, etc views, but also has the downside that you need to care about parallel request. E.g. it is not possible to  stuff such entities into a shared cache because that might lead to concurrency Exceptions (btw you as well have the same restriction in any pattern which use EM-per-Session)

* use @TransactionalScoped EntityManagers and @Transactional from CODI. This basically gives you almost the same behaviour as EJB auto-transactions (but currently without distributed transactions), so you need to take care of LazyInitialisationExceptions. This is really similar to having the old DAO pattern, but without having to write DAO objects ;)
 

                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.1.3
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "gonzalad (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223680#comment-13223680 ] 

gonzalad commented on OWB-626:
------------------------------

Thanks for the tip mark !
                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.2.0
>
>         Attachments: OWB626ConversationPhaseListener.java
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "gonzalad (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223563#comment-13223563 ] 

gonzalad commented on OWB-626:
------------------------------

Hi, I'm working with Thierry on reproducing this issue.

This also happens in some configurations when JSF 2 (myfaces 2.x) is used in Development ProjectStage with a conversation scoped cdi bean.

More specifically, I get error [1] when the jsf page tries to access the cdi bean in its DebugPhaseListener.

The error happens when the order of phaselisteners (PhaseListenerManager#informPhaseListenersAfter(PhaseId)) is 
phaseListeners = [org.apache.myfaces.view.facelets.tag.ui.DebugPhaseListener@3f1e6a4, org.apache.webbeans.jsf.WebBeansPhaseListener@3f1e6a2]

This happens to me in the following configuration : Websphere 8.0.0.1 (uses OWB 1.1.0 I think) with the following web.xml [2].
Please, note when I omit explicit Faces Servlet configuration, everything works fine.

[1]
SRVE0293E: [Erreur de servlet]-[Faces Servlet]: javax.enterprise.context.ContextNotActiveException: WebBeans context with scope type annotation @ConversationScoped does not exist within current thread

[2]
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>

    <servlet>
    	<servlet-name>Faces Servlet</servlet-name>
    	<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
    </servlet-mapping>

</web-app>

                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.2.0
>
>         Attachments: OWB626ConversationPhaseListener.java
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Mark Struberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135068#comment-13135068 ] 

Mark Struberg commented on OWB-626:
-----------------------------------

I see. most probably the EM-per-request pattern will work best for you.
You can use CODIs @Transactional interceptor on your Services and just need to provide the produer method for your EntityManager.

You might take a look at a conference talk I did this year
people.apache.org/~struberg/jax2011/CODI_JAX_2011.pdf
and also check the wiki link I posted initially.
                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.1.3
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Updated] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Mark Struberg (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg updated OWB-626:
------------------------------

    Fix Version/s:     (was: 1.1.2)
                   1.1.3
    
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Gurkan Erdogdu
>             Fix For: 1.1.3
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Rohit Dilip Kelapure (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219831#comment-13219831 ] 

Rohit Dilip Kelapure commented on OWB-626:
------------------------------------------

Do you have a sample application or code that you can provide to illustrate the exception.
This will make it easy to reproduce and provide a patch
                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.2.0
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Commented] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Thierry Robin (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135058#comment-13135058 ] 

Thierry Robin commented on OWB-626:
-----------------------------------

Thank you very much for your detailed response.

You're right "the extended persistence context is pretty questionable" ... for standard uses. But we have (also) some little applications, non critical, written in few weeks and which don't care about clustering, concurrency modifications, and so on .. 

For this kind of applications (and only this kind), we've decided to use the Seam(2) managed persistence context (with it's restrictions) and we'll probably do the same with Seam3.

So, the question isn't about extended persistence context rightness, but just running seam3 with another CDI implementation.

btw, I'm going to take a look at CODI.

                
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.1.3
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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

        

[jira] [Assigned] (OWB-626) Conversation Scope isn't accessible after RENDER_RESPONSE phase

Posted by "Mark Struberg (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg reassigned OWB-626:
---------------------------------

    Assignee: Mark Struberg  (was: Gurkan Erdogdu)
    
> Conversation Scope isn't accessible after RENDER_RESPONSE phase
> ---------------------------------------------------------------
>
>                 Key: OWB-626
>                 URL: https://issues.apache.org/jira/browse/OWB-626
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Thierry Robin
>            Assignee: Mark Struberg
>             Fix For: 1.1.3
>
>
> In CDI 1.0, the Conversation Scope is normaly accessible from after RESTORE_VIEW phase in JSF, to the end of the Response.
> But It's not the case during the after phase(RENDER_RESPONSE) of any PhaseListener implementation.

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