@Override public void invalidate() { ManagedConversation currentConversation = getCurrentConversation(); Map<String, ManagedConversation> conversations = getConversationMap(); synchronized (conversations) { for (Entry<String, ManagedConversation> stringManagedConversationEntry : conversations.entrySet()) { ManagedConversation conversation = stringManagedConversationEntry.getValue(); if (!currentConversation.equals(conversation) && !conversation.isTransient() && isExpired(conversation)) { // Try to lock the conversation and log warning if not successful - unlocking should not be necessary if (!conversation.lock(0)) { ConversationLogger.LOG.endLockedConversation(conversation.getId()); } conversation.end(); } } } }
@Override public void invalidate() { ManagedConversation currentConversation = getCurrentConversation(); Map<String, ManagedConversation> conversations = getConversationMap(); synchronized (conversations) { for (Entry<String, ManagedConversation> stringManagedConversationEntry : conversations.entrySet()) { ManagedConversation conversation = stringManagedConversationEntry.getValue(); if (!currentConversation.equals(conversation) && !conversation.isTransient() && isExpired(conversation)) { // Try to lock the conversation and log warning if not successful - unlocking should not be necessary if (!conversation.lock(0)) { ConversationLogger.LOG.endLockedConversation(conversation.getId()); } conversation.end(); } } } }
@Override public void invalidate() { ManagedConversation currentConversation = getCurrentConversation(); Map<String, ManagedConversation> conversations = getConversationMap(); synchronized (conversations) { for (Entry<String, ManagedConversation> stringManagedConversationEntry : conversations.entrySet()) { ManagedConversation conversation = stringManagedConversationEntry.getValue(); if (!currentConversation.equals(conversation) && !conversation.isTransient() && isExpired(conversation)) { // Try to lock the conversation and log warning if not successful - unlocking should not be necessary if (!conversation.lock(0)) { ConversationLogger.LOG.endLockedConversation(conversation.getId()); } conversation.end(); } } } }
@Override public void invalidate() { ManagedConversation currentConversation = getCurrentConversation(); Map<String, ManagedConversation> conversations = getConversationMap(); synchronized (conversations) { for (Entry<String, ManagedConversation> stringManagedConversationEntry : conversations.entrySet()) { ManagedConversation conversation = stringManagedConversationEntry.getValue(); if (!currentConversation.equals(conversation) && !conversation.isTransient() && isExpired(conversation)) { // Try to lock the conversation and log warning if not successful - unlocking should not be necessary if (!conversation.lock(0)) { ConversationLogger.LOG.endLockedConversation(conversation.getId()); } conversation.end(); } } } }
@Override public void invalidate() { ManagedConversation currentConversation = getCurrentConversation(); Map<String, ManagedConversation> conversations = getConversationMap(); synchronized (conversations) { for (Entry<String, ManagedConversation> stringManagedConversationEntry : conversations.entrySet()) { ManagedConversation conversation = stringManagedConversationEntry.getValue(); if (!currentConversation.equals(conversation) && !conversation.isTransient() && isExpired(conversation)) { // Try to lock the conversation and log warning if not successful - unlocking should not be necessary if (!conversation.lock(0)) { ConversationLogger.LOG.endLockedConversation(conversation.getId()); } conversation.end(); } } } }
protected void initialize(String cid) { // Attach the conversation // WELD-1315 Don't try to restore the long-running conversation if cid param is empty if (cid != null && !cid.isEmpty()) { ManagedConversation conversation = getConversation(cid); if (conversation != null && !isExpired(conversation)) { boolean lock = lock(conversation); if (lock) { // WELD-1690 Don't associate a conversation which was ended (race condition) if (conversation.isTransient()) { associateRequestWithNewConversation(); throw ConversationLogger.LOG.noConversationFoundToRestore(cid); } associateRequest(conversation); } else { // CDI 6.7.4 we must activate a new transient conversation before we throw the exception associateRequestWithNewConversation(); throw ConversationLogger.LOG.conversationLockTimedout(cid); } } else { // CDI 6.7.4 we must activate a new transient conversation before we throw the exception associateRequestWithNewConversation(); throw ConversationLogger.LOG.noConversationFoundToRestore(cid); } } else { associateRequestWithNewConversation(); } }
protected void initialize(String cid) { // Attach the conversation // WELD-1315 Don't try to restore the long-running conversation if cid param is empty if (cid != null && !cid.isEmpty()) { ManagedConversation conversation = getConversation(cid); if (conversation != null && !isExpired(conversation)) { boolean lock = lock(conversation); if (lock) { // WELD-1690 Don't associate a conversation which was ended (race condition) if (conversation.isTransient()) { associateRequestWithNewConversation(); throw ConversationLogger.LOG.noConversationFoundToRestore(cid); } associateRequest(conversation); } else { // CDI 6.7.4 we must activate a new transient conversation before we throw the exception associateRequestWithNewConversation(); throw ConversationLogger.LOG.conversationLockTimedout(cid); } } else { // CDI 6.7.4 we must activate a new transient conversation before we throw the exception associateRequestWithNewConversation(); throw ConversationLogger.LOG.noConversationFoundToRestore(cid); } } else { associateRequestWithNewConversation(); } }
protected void initialize(String cid) { // Attach the conversation // WELD-1315 Don't try to restore the long-running conversation if cid param is empty if (cid != null && !cid.isEmpty()) { ManagedConversation conversation = getConversation(cid); if (conversation != null && !isExpired(conversation)) { boolean lock = lock(conversation); if (lock) { // WELD-1690 Don't associate a conversation which was ended (race condition) if (conversation.isTransient()) { associateRequestWithNewConversation(); throw ConversationLogger.LOG.noConversationFoundToRestore(cid); } associateRequest(conversation); } else { // CDI 6.7.4 we must activate a new transient conversation before we throw the exception associateRequestWithNewConversation(); throw ConversationLogger.LOG.conversationLockTimedout(cid); } } else { // CDI 6.7.4 we must activate a new transient conversation before we throw the exception associateRequestWithNewConversation(); throw ConversationLogger.LOG.noConversationFoundToRestore(cid); } } else { associateRequestWithNewConversation(); } }
protected void initialize(String cid) { // Attach the conversation // WELD-1315 Don't try to restore the long-running conversation if cid param is empty if (cid != null && !cid.isEmpty()) { ManagedConversation conversation = getConversation(cid); if (conversation != null && !isExpired(conversation)) { boolean lock = lock(conversation); if (lock) { // WELD-1690 Don't associate a conversation which was ended (race condition) if (conversation.isTransient()) { associateRequestWithNewConversation(); throw ConversationLogger.LOG.noConversationFoundToRestore(cid); } associateRequest(conversation); } else { // CDI 6.7.4 we must activate a new transient conversation before we throw the exception associateRequestWithNewConversation(); throw ConversationLogger.LOG.conversationLockTimedout(cid); } } else { // CDI 6.7.4 we must activate a new transient conversation before we throw the exception associateRequestWithNewConversation(); throw ConversationLogger.LOG.noConversationFoundToRestore(cid); } } else { associateRequestWithNewConversation(); } }
protected void initialize(String cid) { // Attach the conversation // WELD-1315 Don't try to restore the long-running conversation if cid param is empty if (cid != null && !cid.isEmpty()) { ManagedConversation conversation = getConversation(cid); if (conversation != null && !isExpired(conversation)) { boolean lock = lock(conversation); if (lock) { // WELD-1690 Don't associate a conversation which was ended (race condition) if (conversation.isTransient()) { associateRequestWithNewConversation(); throw ConversationLogger.LOG.noConversationFoundToRestore(cid); } associateRequest(conversation); } else { // CDI 6.7.4 we must activate a new transient conversation before we throw the exception associateRequestWithNewConversation(); throw ConversationLogger.LOG.conversationLockTimedout(cid); } } else { // CDI 6.7.4 we must activate a new transient conversation before we throw the exception associateRequestWithNewConversation(); throw ConversationLogger.LOG.noConversationFoundToRestore(cid); } } else { associateRequestWithNewConversation(); } }