File tree 1 file changed +5
-2
lines changed
spring-jms/src/main/java/org/springframework/jms/connection
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2017 the original author or authors.
2
+ * Copyright 2002-2018 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.
@@ -325,7 +325,10 @@ else if (methodName.startsWith("create")) {
325
325
if (isCacheProducers () && (methodName .equals ("createProducer" ) ||
326
326
methodName .equals ("createSender" ) || methodName .equals ("createPublisher" ))) {
327
327
// Destination argument being null is ok for a producer
328
- return getCachedProducer ((Destination ) args [0 ]);
328
+ Destination dest = (Destination ) args [0 ];
329
+ if (!(dest instanceof TemporaryQueue || dest instanceof TemporaryTopic )) {
330
+ return getCachedProducer (dest );
331
+ }
329
332
}
330
333
else if (isCacheConsumers ()) {
331
334
// let raw JMS invocation throw an exception if Destination (i.e. args[0]) is null
You can’t perform that action at this time.
0 commit comments