Questions tagged [jms-session]

A Session object is a single-threaded context for producing and consuming messages. Although it may allocate provider resources outside the Java virtual machine (JVM), it is considered a lightweight JMS object.

A Session object is a single-threaded context for producing and consuming messages. Although it may allocate provider resources outside the Java virtual machine (JVM), it is considered a lightweight JMS object.

http://docs.oracle.com/javaee/7/api/javax/jms/Session.html

4 questions
2
votes
1 answer

How to duplicate javax.jms.TextMessage without Jms session object

I'm listening to MQ Q's using Spring JMS @JmsListener annotation. @JmsListener(destination = "${qNmae}", containerFactory = "jmsListenerContainerFactory2") public void processMessage(Message msg) throws…
user3817206
  • 315
  • 4
  • 14
2
votes
1 answer

How to use multiple sessions per connection in a multi-threaded application?

Suppose I have one connection c and many session objects s1, s2 .. sn, each working in different threads t1, t2 ... tn. c | …
Nawaz
  • 353,942
  • 115
  • 666
  • 851
1
vote
1 answer

Who manages a JMS session on the consumer side

If I have a JMS queue and I wish to put a message on the queue from a publishing client, I need to first open a session, get the queue from its jndi name and then send the message to the queue. But on the consumer side, how come I do not manually…
Victor
  • 16,609
  • 71
  • 229
  • 409
1
vote
1 answer

JMS: Is it OK to read via MessageConsumer.receive() on one thread, then call Session.commit() from another thread?

The spec for JMS sessions warns that Session objects/instances must only be used on the thread in which they are created when there are MessageListener instances registered to a Session. However, it doesn't say anything about being thread-un-safe,…
Roboprog
  • 3,054
  • 2
  • 28
  • 27