I don’t think that it is possible to remove these query parameters from the URL without breaking the conversation concept of CDI and CODI. These parameters are embedded in the URL for good reason. They are required to identify the current conversation. How should CODI/CDI know which is the active conversation if they are removed?
If you want to solve this problem in the JSF world, you could probably embed this conversation identifier in a form instead of in the URL. But this would have to be implemented by the CDI/CODI as it is a completely different concept for conversation identification.
I am able to remove it, but as you mentioned, it would break the concept of conversation. However this means bookmarkability is not possible once you use conversations?
The query paramter “cid” would be bookmarked, but after some time the conversation would be timed out. Whenever this bookmarked link is called, it would end up in a NonExistentConversationException, right?
I think basically you are right! I’m not sure if the CDI implementation (or CODI) will really throw a NonExistentConversationException. In the best case it will simply start a new conversation if the old one timed out. Perhaps this would be acceptable. But I’m note sure about that.
I’m not a big fan of conversations because they are very “stateful” by design. I worked a long time with MyFaces Orchestra which also supports conversations. But I think it brings more trouble than benefit.
If anyone has another opinion on this please let me know. I would also be very interested in other thoughts regarding this….