|
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) {
|
@@ -347,7 +345,6 @@ protected boolean doReceiveAndExecute(
|
347 | 345 | }
|
348 | 346 | noMessageReceived(invoker, sessionToUse);
|
349 | 347 | // Nevertheless call commit, in order to reset the transaction timeout (if any).
|
350 |
| - // However, don't do this on Tibco since this may lead to a deadlock there. |
351 | 348 | if (shouldCommitAfterNoMessageReceived(sessionToUse)) {
|
352 | 349 | commitIfNecessary(sessionToUse, message);
|
353 | 350 | }
|
@@ -381,17 +378,12 @@ protected boolean isSessionLocallyTransacted(Session session) {
|
381 | 378 |
|
382 | 379 | /**
|
383 | 380 | * Determine whether to trigger a commit after no message has been received.
|
384 |
| - * This is a good idea on any JMS provider other than Tibco, which is what |
385 |
| - * this default implementation checks for. |
| 381 | + * This is a good idea on any modern-day JMS provider. |
386 | 382 | * @param session the current JMS Session which received no message
|
387 | 383 | * @return whether to call {@link #commitIfNecessary} on the given Session
|
388 | 384 | */
|
389 | 385 | protected boolean shouldCommitAfterNoMessageReceived(Session session) {
|
390 |
| - if (this.commitAfterNoMessageReceived == null) { |
391 |
| - Session target = ConnectionFactoryUtils.getTargetSession(session); |
392 |
| - this.commitAfterNoMessageReceived = !target.getClass().getName().startsWith("com.tibco.tibjms."); |
393 |
| - } |
394 |
| - return this.commitAfterNoMessageReceived; |
| 386 | + return true; |
395 | 387 | }
|
396 | 388 |
|
397 | 389 | /**
|
|
0 commit comments