Questions tagged [conversation-scope]

The conversation scope is a bit like the traditional session scope in that it holds state associated with a user of the system, and spans multiple requests to the server. However, unlike the session scope, the conversation scope:

  • is demarcated explicitly by the application, and

  • holds state associated with a particular web browser tab in a JSF application (browsers tend to share domain cookies, and hence the session cookie, between tabs, so this is not the case for the session scope).

A conversation represents a task—a unit of work from the point of view of the user. The conversation context holds state associated with what the user is currently working on. If the user is doing multiple things at the same time, there are multiple conversations.

The conversation context is active during any JSF request. Most conversations are destroyed at the end of the request. If a conversation should hold state across multiple requests, it must be explicitly promoted to a long-running conversation.

For more about it : https://docs.jboss.org/weld/reference/1.0.1-Final/en-US/html/scopescontexts.html

86 questions
22
votes
1 answer

How does JSF 2 ConversationScope work?

I have a JSF facelets page that displays a table of data depending on which page they are viewing. When I display page 1, I call the view() action method to get the data from the database for both pages and store it as a private member field of the…
Adam
  • 3,860
  • 8
  • 42
  • 70
15
votes
4 answers

How to avoid BusyConversationException in jsf

I'm getting BusyConversationException while navigating through pages in my jsf project. This mostly happens if the user tries to navigate to another page during an ajax call. This also happens when the user clicks on a link right after clicking on…
cubbuk
  • 7,410
  • 4
  • 29
  • 59
9
votes
1 answer

Is the conversation scope an appropriate substitute for the view scope?

In JSF 2.0, the most obvious use-case for the view scope is a single page with potentially multiple AJAX post-backs. Using CDI instead of JSF managed beans leaves us without the view scope so we're either left to implement our own, use a (possibly…
Distortum
  • 6,740
  • 9
  • 58
  • 103
5
votes
1 answer

CDI Conversation Bean - BusyConversationException

I have a Conversation scoped bean, ComponenteM, that is injected in a Request Scoped bean, ComponenteC. @Named @RequestScoped public class ComponenteC implements Serializable { @Inject ComponenteM componenteM; } ComponenteC has an export…
Rita
  • 983
  • 2
  • 12
  • 23
4
votes
2 answers

Is there any way to authenticate the users for my google assistant app?

I am developing an app for Google assistant and I need a suggestion about the authentication of users for my app so that i can manage their data according to their unique id. I am using Firebase as the database and I think that authenticating the…
4
votes
1 answer

Is it possible to activate the Session Scope and Conversation Scope from the existing Request Scope?

I have an @EJB injected bean TransactionCompleteJob. This bean has an @Asynchronous method on it asyncCompleteTransaction(Integer transactionId). When I try to make use of other injected beans and entities that are either session scoped or…
Matt Fellows
  • 6,442
  • 4
  • 31
  • 55
4
votes
4 answers

How to keep JSF Conversations from expiring

I have a requirement to keep the JSF 2.2 CDI conversation from expiring. I tried implementing a heartbeat mechanism where I click a 'hidden' button using Ajax which in turn calls a servlet. But the Conversation still expires. I set the timeout to…
Adwin
  • 105
  • 2
  • 9
4
votes
2 answers

How to configure error page location for NonexistentConversationException?

I need help handling the expired/non-existent conversation when ?cid=XX is in the URL. I have tried to put org.jboss.weld.context.ContextNotActiveException
Yangrui
  • 1,157
  • 2
  • 15
  • 33
4
votes
2 answers

programmatic conversation lookup

Is it possible to obtain a CDI conversation instance programatically only knowing that the current thread is the one being used to process the CDI request associated with the wanted conversation? And if possible then how? In particular, what I want…
Readren
  • 780
  • 1
  • 8
  • 17
4
votes
1 answer

CDI conversation scope propagation: transient vs long running

From the Weld CDI documentation: The conversation context automatically propagates with any JSF faces request (JSF form submission) or redirect. It does not automatically propagate with non-faces requests, for example, navigation via a link. I was…
Panayiotis Karabassis
  • 2,130
  • 3
  • 21
  • 40
3
votes
1 answer

CDI and "Nested" Conversations

I've been reading about the conversation scope in Java EE 6 (and therefore CDI 1.0), and how it can isolate data from different tabs in a browser, and preserve data across many requests of a particular workflow of pages. I've no issues there. In my…
johnm
  • 7,316
  • 1
  • 20
  • 33
3
votes
1 answer

WELD-000321 No conversation found to restore for id 3 when I refresh a page

I get an error when I refresh a page displayed during a conversation. How to avoid this error? The situation: I have 2 JSF pages, index.xhtml and age.xhtml. index.xhtml contains a form where the user enter a birthdate (a property of the backing bean…
user1643352
  • 2,163
  • 2
  • 16
  • 24
3
votes
1 answer

How to use @ConversationScoped with Ajax requests?

I'm using JSF2 and PrimeFaces and each time I make an Ajax request and check if the current conversation is transient, it isn't and a new conversation is started. When I disable the Ajax request, the form automatically passes the cid and the…
Renato Dinhani
  • 30,005
  • 49
  • 125
  • 194
2
votes
1 answer

How to observe (or intercept) conversation beginning in CDI?

I would like to observe or intercept Conversation.begin() method call in CDI in order to stock the new Conversation.getId() and list all the opened conversation. I don't find in the spec (JSR-299) how to observe such event. I'm thinking of complex…
Anthony O.
  • 16,644
  • 12
  • 92
  • 151
2
votes
1 answer

Conversation scope in Stripes Framework

I am currently stuck with using the Stripes Framework. I haven't used it in years, and I've gotten used to the features of other frameworks. One thing I miss is a conversation (or browser window) scope. Is there a way to implement that in Stripes?
Sean Patrick Floyd
  • 274,607
  • 58
  • 445
  • 566
1
2 3 4 5 6