1

I have two JSF controllers and three backing beans which are sharing a CDI conversation. After the first controller is invoked, a call is made to a non-JSF web application to log the user on (OpenAM/OpenSSO) and then the second controller is invoked. The conversation id is retained by appending '?cid=1234' to the page request for the second controller.

My controllers are annotated as follows:

@Named (javax.inject.Named)

@ConversationScoped (javax.enterprise.context.ConversationScoped)

and has the controller injected as follows:

@Inject (javax.inject.Inject)

private transient Conversation conversation; (javax.enterprise.context.Conversation)

The backing beans are annotated as follows:

@Named (javax.inject.Named)

This is being run on JBoss 7.1, which uses Weld for CDI.

This was working fine, but after making some unrelated changes it is not longer working.

The problem now is that when the first controller is invoked, and I call conversation.begin(), the conversation id I have returned is always 1. Furthermore when I come back to the second controller, I get the following error:

org.jboss.weld.context.NonexistentConversationException: WELD-000321 No conversation found to restore for id 1

I have tried accessing the web app multiple times with new sessions, and I have tried accessing it from different tabs, and from different browsers. The conversation id '1' is always returned. Also, as far as I am aware, I am not killing the session or conversation at any time between the two controller calls.

Community
  • 1
  • 1
Caleb
  • 524
  • 5
  • 18
  • 1
    Is `Conversation.begin()` being called still? – LightGuard Dec 17 '12 at 14:28
  • Yes, it's being called. I did logging immediately before and after. Before the conversation was transient, after the conversation had id=1. – Caleb Dec 17 '12 at 22:22
  • 1
    Somewhere along the chain, the cid isn't being passed. Are you doing any Ajax updates? Which component library are you using? Any preRender events? – LightGuard Dec 18 '12 at 05:05

0 Answers0