Skip to content

Commit 83bd56c

Browse files
committed
JMS SingleConnectionFactory uses minimized number of start calls (for Oracle AQ; SPR-5987)
1 parent 6b824d9 commit 83bd56c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

org.springframework.jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,10 @@ else if (method.getName().equals("setExceptionListener")) {
510510
else if (method.getName().equals("start")) {
511511
// Handle start method: track started state.
512512
synchronized (connectionMonitor) {
513-
this.target.start();
514-
started = true;
513+
if (!started) {
514+
this.target.start();
515+
started = true;
516+
}
515517
}
516518
return null;
517519
}

0 commit comments

Comments
 (0)