本文整理了Java中javax.jms.QueueSession.close
方法的一些代码示例,展示了QueueSession.close
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueueSession.close
方法的具体详情如下:
包路径:javax.jms.QueueSession
类名称:QueueSession
方法名:close
暂无
代码示例来源:origin: apache/activemq
@Override
public void close() throws JMSException {
next.close();
}
代码示例来源:origin: apache/activemq
public void stop() throws Exception {
super.stop();
if (consumerSession != null) {
consumerSession.close();
}
if (producerSession != null) {
producerSession.close();
}
}
代码示例来源:origin: wildfly/wildfly
/** Closes the {@code QueueRequestor} and its session.
*
* <P>Since a provider may allocate some resources on behalf of a
* {@code QueueRequestor} 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 QueueSession} object
* passed to the {@code QueueRequestor} constructor.
*
* @exception JMSException if the JMS provider fails to close the
* {@code QueueRequestor} due to some internal
* error.
*/
public void
close() throws JMSException {
// publisher and consumer created by constructor are implicitly closed.
session.close();
tempQueue.delete();
}
}
代码示例来源:origin: apache/activemq
protected void initializeInboundDestinationBridgesOutboundSide(QueueConnection connection) throws JMSException {
if (inboundQueueBridges != null) {
QueueSession outboundSession = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
for (InboundQueueBridge bridge : inboundQueueBridges) {
String queueName = bridge.getInboundQueueName();
Queue foreignQueue = createForeignQueue(outboundSession, queueName);
bridge.setConsumer(null);
bridge.setConsumerQueue(foreignQueue);
bridge.setConsumerConnection(connection);
bridge.setJmsConnector(this);
addInboundBridge(bridge);
}
outboundSession.close();
}
}
代码示例来源:origin: apache/activemq
protected void initializeOutboundDestinationBridgesLocalSide(QueueConnection connection) throws JMSException {
if (outboundQueueBridges != null) {
QueueSession localSession =
connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
for (OutboundQueueBridge bridge : outboundQueueBridges) {
String localQueueName = bridge.getLocalQueueName();
Queue activemqQueue = createActiveMQQueue(localSession, localQueueName);
bridge.setConsumer(null);
bridge.setConsumerQueue(activemqQueue);
bridge.setConsumerConnection(connection);
bridge.setJmsConnector(this);
addOutboundBridge(bridge);
}
localSession.close();
}
}
代码示例来源:origin: apache/activemq
protected void initializeOutboundDestinationBridgesOutboundSide(QueueConnection connection) throws JMSException {
if (outboundQueueBridges != null) {
QueueSession outboundSession = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
for (OutboundQueueBridge bridge : outboundQueueBridges) {
String queueName = bridge.getOutboundQueueName();
Queue foreignQueue = createForeignQueue(outboundSession, queueName);
bridge.setProducerQueue(foreignQueue);
bridge.setProducerConnection(connection);
if (bridge.getJmsMessageConvertor() == null) {
bridge.setJmsMessageConvertor(getOutboundMessageConvertor());
}
bridge.setJmsConnector(this);
addOutboundBridge(bridge);
}
outboundSession.close();
}
}
代码示例来源:origin: apache/activemq
protected void initializeInboundDestinationBridgesLocalSide(QueueConnection connection) throws JMSException {
if (inboundQueueBridges != null) {
QueueSession localSession = connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
for (InboundQueueBridge bridge : inboundQueueBridges) {
String localQueueName = bridge.getLocalQueueName();
Queue activemqQueue = createActiveMQQueue(localSession, localQueueName);
bridge.setProducerQueue(activemqQueue);
bridge.setProducerConnection(connection);
if (bridge.getJmsMessageConvertor() == null) {
bridge.setJmsMessageConvertor(getInboundMessageConvertor());
}
bridge.setJmsConnector(this);
addInboundBridge(bridge);
}
localSession.close();
}
}
代码示例来源:origin: apache/activemq
.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
Queue replyToConsumerQueue = replyToConsumerSession.createTemporaryQueue();
replyToConsumerSession.close();
bridge.setConsumerQueue(replyToConsumerQueue);
bridge.setProducerQueue(replyToProducerQueue);
.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
Queue replyToConsumerQueue = replyToConsumerSession.createTemporaryQueue();
replyToConsumerSession.close();
bridge.setConsumerQueue(replyToConsumerQueue);
bridge.setProducerQueue(replyToProducerQueue);
代码示例来源:origin: spring-projects/spring-framework
verify(txSession).close();
verify(nonTxSession).close();
verify(con).start();
verify(con).stop();
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* 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 (queueSession != null) {
queueSession.close();
}
if (queueConnection != null) {
queueConnection.close();
}
} catch (Exception e) {
addError("Error while closing JMSAppender [" + name + "].", e);
}
// Help garbage collection
queueSender = null;
queueSession = null;
queueConnection = null;
}
代码示例来源:origin: org.apache.geronimo.specs/geronimo-jms_1.1_spec
public void close() throws JMSException {
getSession().close();
getTemporaryQueue().delete();
}
代码示例来源:origin: ca.uhn.hapi/hapi-base
/**
* @see ca.uhn.hl7v2.protocol.JMSDestination#disconnect()
*/
public void disconnect() throws JMSException {
myIsConnected = false;
if (mySendingSession != null) {
mySendingSession.close();
}
if (myReceivingSession != null) {
myReceivingSession.close();
}
}
代码示例来源:origin: org.apache.activemq/activemq-all
public void stop() throws Exception {
super.stop();
if (consumerSession != null) {
consumerSession.close();
}
if (producerSession != null) {
producerSession.close();
}
}
代码示例来源:origin: org.apache.activemq/activemq-broker
public void stop() throws Exception {
super.stop();
if (consumerSession != null) {
consumerSession.close();
}
if (producerSession != null) {
producerSession.close();
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* Cleanup on shutdown
*/
public void dispose() throws JMSException {
producerSession.close();
cacheManager = null;
messageProducer.close();
getQueueSession.close();
shutdown = true;
}
代码示例来源:origin: net.sf.ehcache/ehcache-jmsreplication
/**
* Cleanup on shutdown
*/
public void dispose() throws JMSException {
producerSession.close();
cacheManager = null;
messageProducer.close();
getQueueSession.close();
shutdown = true;
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
public void stop() throws Exception {
super.stop();
if (consumerSession != null) {
consumerSession.close();
}
if (producerSession != null) {
producerSession.close();
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
@Destroy
public void destroy() throws JMSException
{
queueSession.close();
}
代码示例来源:origin: espertechinc/esper
public void stop()
throws JMSException {
conn.stop();
session.close();
conn.close();
}
代码示例来源:origin: espertechinc/esper
public void destroy() throws JMSException {
sender.close();
conn.stop();
session.close();
conn.close();
}
}
内容来源于网络,如有侵权,请联系作者删除!