How to use JMS in multi-threaded applications
The JMS specification states that only ConnectionFactory, Connection and Destinations (Queue and Topic) are thread-safe. The other classes, especially Session and the objects created by Session, can not be shared by threads without synchronization or other precautions.
Note that the onMessage method of the MessageListener interface will also run in its own thread. Thus it can use the Connection it has been created for, but it needs its own Session.