/** * Creates a new producer connection context, reusing any existing connection that might have already been created. * The destination of the connection's session will be that of the given endpoint. * * @param endpoint where the producer will send messages * @return the new producer connection context fully populated * @throws JMSException any error */ public ProducerConnectionContext createProducerConnectionContext(Endpoint endpoint) throws JMSException { ProducerConnectionContext context = new ProducerConnectionContext(); createOrReuseConnection(context, true); createSession(context); createDestination(context, endpoint); createProducer(context); return context; }
/** * Creates a new producer connection context, reusing any existing connection that might have already been created. * The destination of the connection's session will be that of the given endpoint. * * @param endpoint where the producer will send messages * @return the new producer connection context fully populated * @throws JMSException any error */ public ProducerConnectionContext createProducerConnectionContext(Endpoint endpoint) throws JMSException { ProducerConnectionContext context = new ProducerConnectionContext(); createOrReuseConnection(context, true); createSession(context); createDestination(context, endpoint); createProducer(context); return context; }
/** * Creates a new consumer connection context, reusing any existing connection that might have * already been created. The destination of the connection's session will be that of the given endpoint. * The consumer will filter messages based on the given message selector expression (which may be * null in which case the consumer will consume all messages). * * @param endpoint where the consumer will listen for messages * @param messageSelector message consumer's message selector expression. * @return the new consumer connection context fully populated * @throws JMSException any error */ public ConsumerConnectionContext createConsumerConnectionContext(Endpoint endpoint, String messageSelector) throws JMSException { ConsumerConnectionContext context = new ConsumerConnectionContext(); createOrReuseConnection(context, true); createSession(context); createDestination(context, endpoint); createConsumer(context, messageSelector); return context; }
/** * Creates a new consumer connection context, reusing any existing connection that might have * already been created. The destination of the connection's session will be that of the given endpoint. * The consumer will filter messages based on the given message selector expression (which may be * null in which case the consumer will consume all messages). * * @param endpoint where the consumer will listen for messages * @param messageSelector message consumer's message selector expression. * @return the new consumer connection context fully populated * @throws JMSException any error */ public ConsumerConnectionContext createConsumerConnectionContext(Endpoint endpoint, String messageSelector) throws JMSException { ConsumerConnectionContext context = new ConsumerConnectionContext(); createOrReuseConnection(context, true); createSession(context); createDestination(context, endpoint); createConsumer(context, messageSelector); return context; }