antelder 2003/03/31 04:36:32
Modified: java/src/org/apache/wsif/util/jms WSIFJMSDestination.java
Log:
Fix bugzilla 18512 - be sure to close the JMS session
Revision Changes Path
1.17 +12 -2
xml-axis-wsif/java/src/org/apache/wsif/util/jms/WSIFJMSDestination.java
Index: WSIFJMSDestination.java
===================================================================
RCS file:
/home/cvs/xml-axis-wsif/java/src/org/apache/wsif/util/jms/WSIFJMSDestination.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- WSIFJMSDestination.java 31 Mar 2003 12:34:09 -0000 1.16
+++ WSIFJMSDestination.java 31 Mar 2003 12:36:32 -0000 1.17
@@ -294,8 +294,9 @@
boolean propsSet = true;
try {
- if (sender == null)
+ if (sender == null) {
sender = session.createSender(writeQ);
+ }
// Process replyTo queues separately since they are not
// ordinary JMS properties.
@@ -322,8 +323,17 @@
} finally {
// If properties were set, trash the sender so
// we get the default props next time.
- if (propsSet)
+ if (propsSet) {
+ try {
+ sender.close();
+ } catch (JMSException e) {
+ throw new WSIFException(
+ "JMSException closing sender: "
+ + e.getLinkedException(),
+ e);
+ }
sender = null;
+ }
inProps.clear();
}