openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From titou10 <titou10.tito...@gmail.com>
Subject conversation.end() + conversation.begin() in the same method?
Date Fri, 26 Jul 2013 20:07:36 GMT
Hi,
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(){
   ...
   conversation.end();
   conversation.begin();
   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 started..at 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?
Thx




Mime
View raw message