-
1. Re: Configuring concurrent timeout for conversations in Seam3
lightguard Feb 3, 2012 12:11 PM (in response to egaga)1 of 1 people found this helpfulThat's a CDI API. Check the Weld documentation, or look at the API for Conversation.
-
2. Re: Configuring concurrent timeout for conversations in Seam3
egaga Feb 3, 2012 12:22 PM (in response to lightguard)Only reference about timeouts I have found is about non-concurrent timeouts. In Weld documentation there's this:
http://docs.jboss.org/weld/reference/1.1.0.Final/en-US/html_single/
conversation.setTimeout(timeoutInMillis);
Unfortunately this is not the timeout I want to change. That method or the parameter for @Begin gives only possibility to change the general timeout for single conversation, not concurrent-timeout. Is it so that Seam 2 provided more fine grained control via configuration even though clearly the implementation of Weld component would permit better control.
I found a mention of this in the documentation (lock timeouts):
edit:
I think the following might provide what I need.
@Inject BoundConversationContext conversationContext;
-
3. Re: Configuring concurrent timeout for conversations in Seam3
egaga Feb 3, 2012 12:43 PM (in response to egaga)BoundConversationContext provides a way to call setConcurrentAccessTimeout(10000) but even if it's done after a method annotated with @Begin, the value getConcurrentAccess gives for the second thread is 1000 (ten times lower). When should I set the value, and is it only for the current conversationContext? Maybe it is not thread-safe?
-
4. Re: Configuring concurrent timeout for conversations in Seam3
lightguard Feb 3, 2012 1:02 PM (in response to egaga)Anything you do will be CDI implementation specific. I'm not really sure as everything I've been doing has been to the spec. I'd inject the conversation and call the methods instead of using the interceptor (@Begin)
-
5. Re: Configuring concurrent timeout for conversations in Seam3
egaga Feb 3, 2012 1:11 PM (in response to lightguard)I did inject the ConversationContext, and called the setter but when the getter is called, the value is still the default. Also the Conversation does not have the wanted method (setConcurrentTimeout). The documentation lacks a bit specifically on this point.
I try to debug this next Monday more but if you have any ideas, I would be grateful.