/** * @throws JMSException */ public void close() throws JMSException { next.close(); }
/** Closes the {@code TopicRequestor} and its session. * * <P>Since a provider may allocate some resources on behalf of a * {@code TopicRequestor} outside the Java virtual machine, clients * should close them when they * are not needed. Relying on garbage collection to eventually reclaim * these resources may not be timely enough. * * <P>Note that this method closes the {@code TopicSession} object * passed to the {@code TopicRequestor} constructor. * * @exception JMSException if the JMS provider fails to close the * {@code TopicRequestor} due to some internal * error. */ public void close() throws JMSException { // publisher and consumer created by constructor are implicitly closed. session.close(); tempTopic.delete(); } }
/** Close this JMSAppender. Closing releases all resources used by the appender. A closed appender cannot be re-opened. */ public synchronized void close() { // The synchronized modifier avoids concurrent append and close operations if(this.closed) return; LogLog.debug("Closing appender ["+name+"]."); this.closed = true; try { if(topicSession != null) topicSession.close(); if(topicConnection != null) topicConnection.close(); } catch(JMSException e) { LogLog.error("Error while closing JMSAppender ["+name+"].", e); } catch(RuntimeException e) { LogLog.error("Error while closing JMSAppender ["+name+"].", e); } // Help garbage collection topicPublisher = null; topicSession = null; topicConnection = null; }
protected void initializeInboundDestinationBridgesOutboundSide(TopicConnection connection) throws JMSException { if (inboundTopicBridges != null) { TopicSession outboundSession = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); for (InboundTopicBridge bridge : inboundTopicBridges) { String TopicName = bridge.getInboundTopicName(); Topic foreignTopic = createForeignTopic(outboundSession, TopicName); bridge.setConsumer(null); bridge.setConsumerTopic(foreignTopic); bridge.setConsumerConnection(connection); bridge.setJmsConnector(this); addInboundBridge(bridge); } outboundSession.close(); } }
protected void initializeOutboundDestinationBridgesLocalSide(TopicConnection connection) throws JMSException { if (outboundTopicBridges != null) { TopicSession localSession = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); for (OutboundTopicBridge bridge : outboundTopicBridges) { String localTopicName = bridge.getLocalTopicName(); Topic activemqTopic = createActiveMQTopic(localSession, localTopicName); bridge.setConsumer(null); bridge.setConsumerTopic(activemqTopic); bridge.setConsumerConnection(connection); bridge.setJmsConnector(this); addOutboundBridge(bridge); } localSession.close(); } }
protected void initializeOutboundDestinationBridgesOutboundSide(TopicConnection connection) throws JMSException { if (outboundTopicBridges != null) { TopicSession outboundSession = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); for (OutboundTopicBridge bridge : outboundTopicBridges) { String topicName = bridge.getOutboundTopicName(); Topic foreignTopic = createForeignTopic(outboundSession, topicName); bridge.setProducerTopic(foreignTopic); bridge.setProducerConnection(connection); if (bridge.getJmsMessageConvertor() == null) { bridge.setJmsMessageConvertor(getOutboundMessageConvertor()); } bridge.setJmsConnector(this); addOutboundBridge(bridge); } outboundSession.close(); } }
protected void initializeInboundDestinationBridgesLocalSide(TopicConnection connection) throws JMSException { if (inboundTopicBridges != null) { TopicSession localSession = connection.createTopicSession(false,Session.AUTO_ACKNOWLEDGE); for (InboundTopicBridge bridge : inboundTopicBridges) { String localTopicName = bridge.getLocalTopicName(); Topic activemqTopic = createActiveMQTopic(localSession, localTopicName); bridge.setProducerTopic(activemqTopic); bridge.setProducerConnection(connection); if (bridge.getJmsMessageConvertor() == null) { bridge.setJmsMessageConvertor(getInboundMessageConvertor()); } bridge.setJmsConnector(this); addInboundBridge(bridge); } localSession.close(); } }
.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); Topic replyToConsumerTopic = replyToConsumerSession.createTemporaryTopic(); replyToConsumerSession.close(); bridge.setConsumerTopic(replyToConsumerTopic); bridge.setProducerTopic(replyToProducerTopic); .createTopicSession(false, Session.AUTO_ACKNOWLEDGE); Topic replyToConsumerTopic = replyToConsumerSession.createTemporaryTopic(); replyToConsumerSession.close(); bridge.setConsumerTopic(replyToConsumerTopic); bridge.setProducerTopic(replyToProducerTopic);
public void close() throws JMSException { getSession().close(); getTemporaryTopic().delete(); }
/** * Close this JMSAppender. Closing releases all resources used by the * appender. A closed appender cannot be re-opened. */ public synchronized void stop() { // The synchronized modifier avoids concurrent append and close operations if (!this.started) { return; } this.started = false; try { if (topicSession != null) { topicSession.close(); } if (topicConnection != null) { topicConnection.close(); } } catch (Exception e) { addError("Error while closing JMSAppender [" + name + "].", e); } // Help garbage collection topicPublisher = null; topicSession = null; topicConnection = null; }
/** Close this JMSAppender. Closing releases all resources used by the appender. A closed appender cannot be re-opened. */ public synchronized void close() { // The synchronized modifier avoids concurrent append and close operations if(this.closed) { return; } LogLog.debug("Closing appender ["+name+"]."); this.closed = true; try { if(topicSession != null) { topicSession.close(); } if(topicConnection != null) { topicConnection.close(); } } catch(JMSException e) { LogLog.error("Error while closing JMSAppender ["+name+"].", e); } catch(RuntimeException e) { LogLog.error("Error while closing JMSAppender ["+name+"].", e); } // Help garbage collection topicPublisher = null; topicSession = null; topicConnection = null; }
/** * @throws JMSException */ public void close() throws JMSException { next.close(); }
/** * @throws JMSException */ public void close() throws JMSException { next.close(); }
/** * @throws JMSException */ public void close() throws JMSException { next.close(); }
@Destroy public void destroy() throws JMSException { topicSession.close(); }
public void close() throws JMSException { getSession().close(); getTemporaryTopic().delete(); }