• Post Reply Bookmark Topic Watch Topic
  • New Topic

Understanding thread-safe usage of JMS Sessions

 
Tim Legg
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've read that JMS Sessions are not thread safe. I'm having trouble understanding what that means I should/shouldn't be doing with my sessions.

I anticipate several different threads invoking methods concurrently and am trying to figure out if that means I should be creating a new session every time the method is invoked? Is it unsafe to store the session in a field and create new producers/consumers from that session for every method call? I assume the answer is the same if I intend on creating new QueueRequestors for each method call?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!