|
1 | 1 | /* |
2 | | - * Copyright 2002-2015 the original author or authors. |
| 2 | + * Copyright 2002-2016 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
@@ -91,8 +91,6 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe |
91 | 91 |
|
92 | 92 | private long receiveTimeout = DEFAULT_RECEIVE_TIMEOUT; |
93 | 93 |
|
94 | | - private volatile Boolean commitAfterNoMessageReceived; |
95 | | - |
96 | 94 |
|
97 | 95 | @Override |
98 | 96 | public void setSessionTransacted(boolean sessionTransacted) { |
@@ -343,7 +341,6 @@ protected boolean doReceiveAndExecute( |
343 | 341 | } |
344 | 342 | noMessageReceived(invoker, sessionToUse); |
345 | 343 | // Nevertheless call commit, in order to reset the transaction timeout (if any). |
346 | | - // However, don't do this on Tibco since this may lead to a deadlock there. |
347 | 344 | if (shouldCommitAfterNoMessageReceived(sessionToUse)) { |
348 | 345 | commitIfNecessary(sessionToUse, message); |
349 | 346 | } |
@@ -377,17 +374,12 @@ protected boolean isSessionLocallyTransacted(Session session) { |
377 | 374 |
|
378 | 375 | /** |
379 | 376 | * Determine whether to trigger a commit after no message has been received. |
380 | | - * This is a good idea on any JMS provider other than Tibco, which is what |
381 | | - * this default implementation checks for. |
| 377 | + * This is a good idea on any modern-day JMS provider. |
382 | 378 | * @param session the current JMS Session which received no message |
383 | 379 | * @return whether to call {@link #commitIfNecessary} on the given Session |
384 | 380 | */ |
385 | 381 | protected boolean shouldCommitAfterNoMessageReceived(Session session) { |
386 | | - if (this.commitAfterNoMessageReceived == null) { |
387 | | - Session target = ConnectionFactoryUtils.getTargetSession(session); |
388 | | - this.commitAfterNoMessageReceived = !target.getClass().getName().startsWith("com.tibco.tibjms."); |
389 | | - } |
390 | | - return this.commitAfterNoMessageReceived; |
| 382 | + return true; |
391 | 383 | } |
392 | 384 |
|
393 | 385 | /** |
|
0 commit comments