openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From titou10 <>
Subject conversation.end() + conversation.begin() in the same method?
Date Fri, 26 Jul 2013 20:07:36 GMT
We want to end() the current conversation and begin() a new one a the end of the request.

Is this correct to code:

@Inject private Conversation conversation;
public String doSomeBusinessStuff(){
   return "/some/prettyPage.jsf?faces-redirect=true";

It *seems* to work but is this correct? What does really happen here?
- the current conversation is terminated at the end of the request as per the CDI 1.0 spec
- then a new one is the begining of the next one (ie the begin() is queued somewhere)
When calling begin(), I can't find anywhere where exactly the conversation is promoted to
a LRC? immediately? at the end of the 
request? In our case after the end() has been processed?

Is this the correct way to achieve this?

View raw message