()
| 266 | } |
| 267 | |
| 268 | public void close() throws JMSException { |
| 269 | if (closed) return; |
| 270 | |
| 271 | logger.debug("Closing %s", this); |
| 272 | |
| 273 | for (MessageProducer producer: createdProducers) { |
| 274 | producer.close(); |
| 275 | } |
| 276 | |
| 277 | for (MessageConsumer consumer: createdConsumers) { |
| 278 | consumer.close(); |
| 279 | } |
| 280 | |
| 281 | executor.shutdown(); |
| 282 | |
| 283 | closed = true; |
| 284 | } |
| 285 | |
| 286 | public void checkClosed() { |
| 287 | if (closed) throw new IllegalStateException("This Session is closed."); |
no test coverage detected