本文整理了Java中javax.jms.Connection.createConnectionConsumer()
方法的一些代码示例,展示了Connection.createConnectionConsumer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Connection.createConnectionConsumer()
方法的具体详情如下:
包路径:javax.jms.Connection
类名称:Connection
方法名:createConnectionConsumer
[英]Creates a connection consumer for this connection (optional operation) on the specific destination.
This is an expert facility not used by ordinary JMS clients.
This method must not be used in a Java EE web or EJB application. Doing so may cause a JMSException to be thrown though this is not guaranteed.
[中]在特定目标上为此连接创建连接使用者(可选操作)。
这是一个普通JMS客户机不使用的专家工具。
此方法不得用于JavaEEWeb或EJB应用程序中。这样做可能会导致抛出JMSException,但这并不能保证。
代码示例来源:origin: openzipkin/brave
@Override public ConnectionConsumer createConnectionConsumer(Destination destination,
String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
ConnectionConsumer cc =
delegate.createConnectionConsumer(destination, messageSelector, sessionPool, maxMessages);
return TracingConnectionConsumer.create(cc, jmsTracing);
}
代码示例来源:origin: apache/activemq
/**
* Creates a connection for a consumer.
*
* @param ssp - ServerSessionPool
* @return ConnectionConsumer
*/
public ConnectionConsumer createConnectionConsumer(Connection connection, Destination destination, ServerSessionPool ssp) throws JMSException {
return connection.createConnectionConsumer(destination, null, ssp, 1);
}
代码示例来源:origin: com.axway.ats.framework/ats-actionlibrary
@Override
public ConnectionConsumer createConnectionConsumer(
Destination destination,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages ) throws JMSException {
return connection.createConnectionConsumer(destination, messageSelector, sessionPool, maxMessages);
}
代码示例来源:origin: com.bbossgroups.rpc/bboss-rpc
public ConnectionConsumer createConnectionConsumer(Destination arg0, String arg1, ServerSessionPool arg2, int arg3)
throws JMSException
{
// TODO Auto-generated method stub
return con.createConnectionConsumer(arg0, arg1, arg2, arg3);
}
代码示例来源:origin: bitronix/btm
@Override
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool serverSessionPool, int maxMessages) throws JMSException {
return nonXaConnection.createConnectionConsumer(destination, messageSelector, serverSessionPool, maxMessages);
}
代码示例来源:origin: org.apache.openejb/openejb-core
@Override
public ConnectionConsumer createConnectionConsumer(final Destination destination, final String messageSelector, final ServerSessionPool sessionPool, final int maxMessages) throws JMSException {
return con.createConnectionConsumer(destination, messageSelector, sessionPool, maxMessages);
}
代码示例来源:origin: com.github.marcus-nl.btm/btm
@Override
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool serverSessionPool, int maxMessages) throws JMSException {
return nonXaConnection.createConnectionConsumer(destination, messageSelector, serverSessionPool, maxMessages);
}
代码示例来源:origin: org.codehaus.btm/btm
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool serverSessionPool, int maxMessages) throws JMSException {
return nonXaConnection.createConnectionConsumer(destination, messageSelector, serverSessionPool, maxMessages);
}
代码示例来源:origin: org.mule.btm/mule-btm
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool serverSessionPool, int maxMessages) throws JMSException {
return nonXaConnection.createConnectionConsumer(destination, messageSelector, serverSessionPool, maxMessages);
}
代码示例来源:origin: apache/activemq-artemis
/**
* Creates a connection for a consumer.
*
* @param ssp - ServerSessionPool
* @return ConnectionConsumer
*/
public ConnectionConsumer createConnectionConsumer(Connection connection,
Destination destination,
ServerSessionPool ssp) throws JMSException {
return connection.createConnectionConsumer(destination, null, ssp, 1);
}
代码示例来源:origin: org.apache.activemq/activemq-all
@Override
public ConnectionConsumer createConnectionConsumer(Topic topic, String s, ServerSessionPool serverSessionPool, int maxMessages) throws JMSException {
return getConnection().createConnectionConsumer(topic, s, serverSessionPool, maxMessages);
}
代码示例来源:origin: org.apache.activemq/activemq-jms-pool
@Override
public ConnectionConsumer createConnectionConsumer(Destination destination, String selector, ServerSessionPool serverSessionPool, int maxMessages) throws JMSException {
return getConnection().createConnectionConsumer(destination, selector, serverSessionPool, maxMessages);
}
代码示例来源:origin: org.apache.activemq/activemq-jms-pool
@Override
public ConnectionConsumer createConnectionConsumer(Queue queue, String selector, ServerSessionPool serverSessionPool, int maxMessages) throws JMSException {
return getConnection().createConnectionConsumer(queue, selector, serverSessionPool, maxMessages);
}
代码示例来源:origin: org.apache.activemq/activemq-all
@Override
public ConnectionConsumer createConnectionConsumer(Destination destination, String selector, ServerSessionPool serverSessionPool, int maxMessages) throws JMSException {
return getConnection().createConnectionConsumer(destination, selector, serverSessionPool, maxMessages);
}
代码示例来源:origin: org.apache.activemq/activemq-all
@Override
public ConnectionConsumer createConnectionConsumer(Queue queue, String selector, ServerSessionPool serverSessionPool, int maxMessages) throws JMSException {
return getConnection().createConnectionConsumer(queue, selector, serverSessionPool, maxMessages);
}
代码示例来源:origin: org.seedstack.addons.jms/jms-core
@Override
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
return getConnection().createConnectionConsumer(destination, messageSelector, sessionPool, maxMessages);
}
代码示例来源:origin: org.seedstack.addons.jms/jms
@Override
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
return getConnection().createConnectionConsumer(destination, messageSelector, sessionPool, maxMessages);
}
代码示例来源:origin: org.seedstack.seed/seed-jms-support-core
@Override
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
return getConnection().createConnectionConsumer(destination, messageSelector, sessionPool, maxMessages);
}
代码示例来源:origin: org.apache.activemq/activemq-jms-pool
@Override
public ConnectionConsumer createConnectionConsumer(Topic topic, String s, ServerSessionPool serverSessionPool, int maxMessages) throws JMSException {
return getConnection().createConnectionConsumer(topic, s, serverSessionPool, maxMessages);
}
代码示例来源:origin: org.jboss.jbossas/jboss-as-connector
/**
* Setup the connection consumer
*
* @throws Exeption for any error
*/
protected void setupConsumer() throws Exception
{
Connection connection = activation.getConnection();
JmsActivationSpec spec = activation.getActivationSpec();
String selector = spec.getMessageSelector();
int maxMessages = spec.getMaxMessagesInt();
if (activation.isTopic())
{
Topic topic = (Topic) activation.getDestination();
String subscriptionName = spec.getSubscriptionName();
if (spec.isDurable())
consumer = connection.createDurableConnectionConsumer(topic, subscriptionName, selector, this, maxMessages);
else
consumer = connection.createConnectionConsumer(topic, selector, this, maxMessages);
}
else
{
Queue queue = (Queue) activation.getDestination();
consumer = connection.createConnectionConsumer(queue, selector, this, maxMessages);
}
log.debug("Created consumer " + consumer);
}
内容来源于网络,如有侵权,请联系作者删除!