Author: struberg
Date: Thu May 14 14:36:53 2015
New Revision: 1679384
URL: http://svn.apache.org/r1679384
Log:
OWB-1050 ignore BusyConversationException during timeout check
If a Conversation is currently being used in a parallel request then it is
obviously not timed out.
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java?rev=1679384&r1=1679383&r2=1679384&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
Thu May 14 14:36:53 2015
@@ -168,7 +168,17 @@ public class ConversationManager
public boolean conversationTimedOut(ConversationImpl conv)
{
- long timeout = conv.getTimeout();
+ long timeout = 0L;
+ try
+ {
+ timeout = conv.getTimeout();
+ }
+ catch (BusyConversationException bce)
+ {
+ // if the Conversation is concurrently used by another thread then
it is surely not timed out
+ return false;
+ }
+
if (timeout != 0L && (System.currentTimeMillis() -
conv.getLastAccessTime()) > timeout)
{
logger.log(Level.FINE, OWBLogConst.INFO_0011, conv.getId());